Land #9822, Fix backgrounded aggressive exploits

4.x
Brent Cook 2018-04-09 09:36:12 -05:00 committed by Metasploit
parent 084e6b1db3
commit 876df392f1
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
2 changed files with 3 additions and 3 deletions

View File

@ -676,10 +676,10 @@ class Exploit < Msf::Module
end
#
# Returns if the exploit has a passive stance.
# Returns if the exploit has a passive stance. Aggressive exploits are always aggressive.
#
def passive?
stance.include?(Stance::Passive)
stance.include?(Stance::Passive) && !stance.include?(Stance::Aggressive)
end
#

View File

@ -131,7 +131,7 @@ class ExploitDriver
# If we are being instructed to run as a job then let's create that job
# like a good person.
if (use_job or exploit.stance == Msf::Exploit::Stance::Passive)
if (use_job or exploit.passive?)
# Since references to the exploit and payload will hang around for
# awhile in the job, make sure we copy them so further changes to
# the datastore don't alter settings in existing jobs