File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,7 @@ def cmd_findpids(*args)
290
290
if args . empty? or args . include? "-h"
291
291
print_line "You must supply one or more process name to search for"
292
292
print_line "e.g. findpids explorer.exe notepad.exe"
293
+ print_line "You may also pass Regular Expressions: findpids *.svc.* *.dll.*"
293
294
return true
294
295
end
295
296
processes = client . sys . process . get_processes
@@ -298,8 +299,11 @@ def cmd_findpids(*args)
298
299
else
299
300
searched_procs = Rex ::Post ::Meterpreter ::Extensions ::Stdapi ::Sys ::ProcessList . new
300
301
processes . each do |proc |
301
- if args . include? proc [ "name" ]
302
- searched_procs << proc
302
+ args . each do |arg |
303
+ if proc [ "name" ] . match ( /#{ arg } / )
304
+ searched_procs << proc
305
+ break
306
+ end
303
307
end
304
308
end
305
309
searched_procs . compact!
You can’t perform that action at this time.
0 commit comments