git-svn-id: file:///home/svn/framework3/trunk@4435 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2007-02-18 12:08:11 +00:00
parent 8a70cb35ca
commit d4a739f85a
1 changed files with 11 additions and 5 deletions

View File

@ -23,13 +23,19 @@ module Exploit::Egghunter
# and operating system. # and operating system.
# #
def generate_egghunter def generate_egghunter
os = target['Platform'] # Prefer the target's platform/architecture information, but use
arch = target.arch # the module's if no target specific information exists
los = target_platform
larch = target_arch || ARCH_X86
arch ||= ARCH_X86 # If we found a platform list, then take the first platform
os ||= 'win' los = los.names[0] if (los.kind_of?(Msf::Module::PlatformList))
if los.nil?
raise RuntimeError, "No platform restrictions were specified -- cannot select egghunter"
end
egg = Rex::Exploitation::Egghunter.new(os, arch) egg = Rex::Exploitation::Egghunter.new(los, larch)
bunny = egg.generate(payload_badchars) bunny = egg.generate(payload_badchars)
if (bunny.nil?) if (bunny.nil?)