modify cmd stager to take a raw payload string instead of a payload instance
git-svn-id: file:///home/svn/framework3/trunk@8805 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
9288f34fbf
commit
b6851b8ee4
|
@ -33,7 +33,7 @@ module Exploit::CmdStager
|
||||||
raise RuntimeError, "No platform restrictions were specified -- cannot generate cmdstager"
|
raise RuntimeError, "No platform restrictions were specified -- cannot generate cmdstager"
|
||||||
end
|
end
|
||||||
|
|
||||||
cmdstager = Rex::Exploitation::CmdStager.new(pl, framework, los, larch)
|
cmdstager = Rex::Exploitation::CmdStager.new(pl.encoded, framework, los, larch)
|
||||||
cmd_list = cmdstager.generate(opts, linelen)
|
cmd_list = cmdstager.generate(opts, linelen)
|
||||||
|
|
||||||
if (cmd_list.nil? or cmd_list.length < 1)
|
if (cmd_list.nil? or cmd_list.length < 1)
|
||||||
|
|
|
@ -13,7 +13,7 @@ module Exploitation
|
||||||
|
|
||||||
class CmdStager
|
class CmdStager
|
||||||
|
|
||||||
def initialize(payload, framework, platform, arch = nil)
|
def initialize(code, framework, platform, arch = nil)
|
||||||
@var_decoder = Rex::Text.rand_text_alpha(5)
|
@var_decoder = Rex::Text.rand_text_alpha(5)
|
||||||
@var_encoded = Rex::Text.rand_text_alpha(5)
|
@var_encoded = Rex::Text.rand_text_alpha(5)
|
||||||
@var_batch = Rex::Text.rand_text_alpha(5)
|
@var_batch = Rex::Text.rand_text_alpha(5)
|
||||||
|
@ -22,7 +22,7 @@ class CmdStager
|
||||||
@linelen = 2047 # covers most likely cases
|
@linelen = 2047 # covers most likely cases
|
||||||
|
|
||||||
# XXX: TODO: support multipl architectures/platforms
|
# XXX: TODO: support multipl architectures/platforms
|
||||||
@exe = Msf::Util::EXE.to_win32pe(@framework, payload.encoded)
|
@exe = Msf::Util::EXE.to_win32pe(@framework, code)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue