Permalink
Browse files

Fix up the ps help

  • Loading branch information...
1 parent 5738d80 commit 4511dead8843ee37e945239b29454fd41698a026 David Maloney committed Sep 21, 2012
Showing with 17 additions and 6 deletions.
  1. +17 −6 lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb
@@ -341,12 +341,23 @@ def cmd_ps(*args)
def cmd_ps_help
print_line "Use the command with no arguments to see all running processes."
- print_line "You may supply a search term to filter the results:"
- print_line "\t ps -S explorer.exe"
- print_line "\t Would return any processes named explorer.exe"
- print_line "You may also pass Regular Expressions:"
- print_line "\tps -S *.svc.* "
- print_line "Would return any processes with 'svc' in the name"
+ print_line "The following options can be used to filter those results:"
+
+ tbl = Rex::Ui::Text::Table.new(
+ 'Header' => "Options List",
+ 'Indent' => 1,
+ 'Columns' =>
+ [
+ "Option",
+ "Details"
+ ]
+ )
+
+ tbl << ["-s", "Display only SYSTEM processes"]
+ tbl << ["-S <RegEx>", "Filters processes on the process name using the supplied RegEx"]
+ tbl << ["-A <arch>", "Filters processes on the arch. (x86, x86_64)"]
+ tbl << ["-U <username>", "Filters processes on the user using the supplied RegEx"]
+ print_line tbl.to_s
end

0 comments on commit 4511dea

Please sign in to comment.