add advanced option to control exiting after a session is created
git-svn-id: file:///home/svn/framework3/trunk@4488 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
ac84768d8b
commit
99f9fb5353
|
@ -1,5 +1,5 @@
|
||||||
##
|
##
|
||||||
# $Id:$
|
# $Id$
|
||||||
##
|
##
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -43,11 +43,18 @@ class Exploits::Multi::Handler < Msf::Exploit::Remote
|
||||||
'Targets' => [ [ 'Wildcard Target', { } ] ],
|
'Targets' => [ [ 'Wildcard Target', { } ] ],
|
||||||
'DefaultTarget' => 0
|
'DefaultTarget' => 0
|
||||||
))
|
))
|
||||||
|
|
||||||
|
register_advanced_options(
|
||||||
|
[
|
||||||
|
OptBool.new("ExitOnSession", [ true, "Return from the exploit after a session has been created", true ])
|
||||||
|
], self.class)
|
||||||
end
|
end
|
||||||
|
|
||||||
def exploit
|
def exploit
|
||||||
print_status "Starting the payload handler..."
|
print_status "Starting the payload handler..."
|
||||||
while(true)
|
while(true)
|
||||||
|
break if session_created? and datastore['ExitOnSession']
|
||||||
|
|
||||||
sleep(1)
|
sleep(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue