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.
#
def generate_egghunter
os = target['Platform']
arch = target.arch
# Prefer the target's platform/architecture information, but use
# the module's if no target specific information exists
los = target_platform
larch = target_arch || ARCH_X86
arch ||= ARCH_X86
os ||= 'win'
# If we found a platform list, then take the first platform
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)
if (bunny.nil?)