Skip to content

Commit 4511dea

Browse files
David MaloneyDavid Maloney
authored andcommitted
Fix up the ps help
1 parent 5738d80 commit 4511dea

File tree

1 file changed

+17
-6
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+17
-6
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,23 @@ def cmd_ps(*args)
341341

342342
def cmd_ps_help
343343
print_line "Use the command with no arguments to see all running processes."
344-
print_line "You may supply a search term to filter the results:"
345-
print_line "\t ps -S explorer.exe"
346-
print_line "\t Would return any processes named explorer.exe"
347-
print_line "You may also pass Regular Expressions:"
348-
print_line "\tps -S *.svc.* "
349-
print_line "Would return any processes with 'svc' in the name"
344+
print_line "The following options can be used to filter those results:"
345+
346+
tbl = Rex::Ui::Text::Table.new(
347+
'Header' => "Options List",
348+
'Indent' => 1,
349+
'Columns' =>
350+
[
351+
"Option",
352+
"Details"
353+
]
354+
)
355+
356+
tbl << ["-s", "Display only SYSTEM processes"]
357+
tbl << ["-S <RegEx>", "Filters processes on the process name using the supplied RegEx"]
358+
tbl << ["-A <arch>", "Filters processes on the arch. (x86, x86_64)"]
359+
tbl << ["-U <username>", "Filters processes on the user using the supplied RegEx"]
360+
print_line tbl.to_s
350361
end
351362

352363

0 commit comments

Comments
 (0)