Fix boneheaded mistake

bug/bundler_fix
David Maloney 2012-12-12 09:18:03 -06:00
parent e448431c8a
commit 5e8b9a20a4
1 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class Metasploit3 < Msf::Exploit::Remote
OptString.new( 'DECODERSTUB', [ true, 'The VBS base64 file decoder stub to use.',
File.join(Msf::Config.install_root, "data", "exploits", "cmdstager", "vbs_b64_sleep")]),
], self.class)
@compat_mode = false
end
def check
@ -177,6 +177,7 @@ class Metasploit3 < Msf::Exploit::Remote
when "x64"
unless datastore['PAYLOAD'].include? "x64"
print_error "You selected an x86 payload for an x64 target...trying to run in compat mode"
@compat_mode = true
return false
end
when "x86"
@ -218,7 +219,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
return false unless correct_payload_arch? or @target_arch == "x64"
if @target_arch == "x64"
if @compat_mode == true
@invoke_powershell = "%SYSTEMROOT%\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe"
else
@invoke_powershell = "powershell"