mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
fixes #1
git-svn-id: file:///home/svn/framework3/trunk@4435 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
8a70cb35ca
commit
d4a739f85a
@ -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?)
|
||||
|
Loading…
Reference in New Issue
Block a user