dunno why i never thought of this before. clean up spawned exploits when stopping browser_autopwn
git-svn-id: file:///home/svn/framework3/trunk@10197 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
561c861a3a
commit
94aac0c517
|
@ -408,6 +408,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
end
|
||||
end
|
||||
end
|
||||
@handler_job_ids = []
|
||||
# start handlers for each type of payload
|
||||
[@win_lport, @lin_lport, @osx_lport, @gen_lport, @java_lport].each do |lport|
|
||||
if (lport and @payloads[lport])
|
||||
|
@ -428,6 +429,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
'LocalOutput' => self.user_output,
|
||||
'Payload' => @payloads[lport],
|
||||
'RunAsJob' => true)
|
||||
@handler_job_ids.push(multihandler.job_id)
|
||||
end
|
||||
end
|
||||
# let the handlers get set up
|
||||
|
@ -839,5 +841,16 @@ class Metasploit3 < Msf::Auxiliary
|
|||
return ""
|
||||
end
|
||||
|
||||
def cleanup
|
||||
print_status("Cleaning up exploits...")
|
||||
@exploits.each_pair do |name, mod|
|
||||
framework.jobs[mod.job_id.to_s].stop if framework.jobs[mod.job_id.to_s]
|
||||
end
|
||||
@handler_job_ids.each do |id|
|
||||
framework.jobs[id.to_s].stop if framework.jobs[id.to_s]
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue