Make fix easier to read
parent
4653c27167
commit
62dd82e653
|
@ -61,8 +61,8 @@ class Metasploit3 < Msf::Post
|
||||||
def get_pid(proc_name)
|
def get_pid(proc_name)
|
||||||
processes = client.sys.process.get_processes
|
processes = client.sys.process.get_processes
|
||||||
processes.each do |proc|
|
processes.each do |proc|
|
||||||
if proc['name'] == proc_name
|
if proc['name'] == proc_name && proc['user'] != ""
|
||||||
return proc['pid'] if proc['user'] != ""
|
return proc['pid']
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue