File tree Expand file tree Collapse file tree 4 files changed +8
-10
lines changed
lib/msf/ui/console/command_dispatcher Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def cmd_run(*args)
96
96
}
97
97
98
98
# Always run passive modules in the background
99
- if ( mod . passive or mod . passive_action? ( action ) )
99
+ if ( mod . passive || mod . passive_action? ( action || mod . default_action ) )
100
100
jobify = true
101
101
end
102
102
@@ -131,8 +131,8 @@ def cmd_run(*args)
131
131
return false
132
132
end
133
133
134
- if ( jobify )
135
- print_status ( "Auxiliary module running as background job" )
134
+ if ( jobify && mod . job_id )
135
+ print_status ( "Auxiliary module running as background job #{ mod . job_id } . " )
136
136
else
137
137
print_status ( "Auxiliary module execution completed" )
138
138
end
Original file line number Diff line number Diff line change @@ -145,10 +145,8 @@ def cmd_exploit(*args)
145
145
end
146
146
# If we ran the exploit as a job, indicate such so the user doesn't
147
147
# wonder what's up.
148
- elsif ( jobify )
149
- if mod . job_id
150
- print_status ( "Exploit running as background job #{ mod . job_id } ." )
151
- end
148
+ elsif ( jobify && mod . job_id )
149
+ print_status ( "Exploit running as background job #{ mod . job_id } ." )
152
150
# Worst case, the exploit ran but we got no session, bummer.
153
151
else
154
152
# If we didn't run a payload handler for this exploit it doesn't
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ def cmd_handler(*args)
339
339
framework . jobs [ job_id . to_s ] . send ( :name= , job_name )
340
340
end
341
341
342
- print_status "Payload Handler Started as Job #{ job_id } "
342
+ print_status "Payload handler running as background job #{ job_id } . "
343
343
end
344
344
end
345
345
end
Original file line number Diff line number Diff line change @@ -131,8 +131,8 @@ def cmd_run(*args)
131
131
return false
132
132
end
133
133
134
- if ( jobify )
135
- print_status ( "Post module running as background job" )
134
+ if ( jobify && mod . job_id )
135
+ print_status ( "Post module running as background job #{ mod . job_id } . " )
136
136
else
137
137
print_status ( "Post module execution completed" )
138
138
end
You can’t perform that action at this time.
0 commit comments