Update wmi to use generated powershell command line

bug/bundler_fix
Meatballs 2013-11-22 23:18:22 +00:00
parent 9835649858
commit 622a1dccda
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 5 additions and 1 deletions

View File

@ -93,7 +93,11 @@ class Metasploit3 < Msf::Exploit::Local
end end
x = rand_text_alpha(rand(3)+3) x = rand_text_alpha(rand(3)+3)
exec_cmd = "powershell.exe -nop -w hidden -c $#{x} = ''" exec_cmd = generate__psh_command_line({
:noprofile => true,
:windowstyle => 'hidden',
:command => "$#{x} = ''"
})
env_vars.each do |env| env_vars.each do |env|
exec_cmd << "+$env:#{env}" exec_cmd << "+$env:#{env}"
end end