Skip to content

Commit 651f9b9

Browse files
committed
Use opts.usage instead of a Table
1 parent 4511dea commit 651f9b9

File tree

1 file changed

+7
-21
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+7
-21
lines changed

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

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ class Console::CommandDispatcher::Stdapi::Sys
4343
"-t" => [ true, "The registry value type (E.g. REG_SZ)." ],
4444
"-v" => [ true, "The registry value name (E.g. Stuff)." ],
4545
"-r" => [ true, "The remote machine name to connect to (with current process credentials" ],
46-
"-w" => [ false, "Set KEY_WOW64 flag, valid values [32|64]." ])
46+
"-w" => [ false, "Set KEY_WOW64 flag, valid values [32|64]." ])
4747

4848
@@ps_opts = Rex::Parser::Arguments.new(
49-
"-h" => [false, "Help menu."],
50-
"-S" => [true, "RegEx term to filter on process name with "],
51-
"-A" => [true, "Arch to filter on (x86 or x86_64"],
52-
"-s" =>[false, "Show only SYSTEM processes"],
53-
"-U" => [true, "RegEx term to filter on user name with"])
49+
"-h" => [ false, "Help menu." ],
50+
"-S" => [ true, "Filters processes on the process name using the supplied RegEx"],
51+
"-A" => [ true, "Filters processes on architecture (x86 or x86_64)" ],
52+
"-s" => [ false, "Show only SYSTEM processes" ],
53+
"-U" => [ true, "Filters processes on the user using the supplied RegEx" ])
5454

5555
#
5656
# List of supported commands.
@@ -343,21 +343,7 @@ def cmd_ps_help
343343
print_line "Use the command with no arguments to see all running processes."
344344
print_line "The following options can be used to filter those results:"
345345

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
346+
print_line @@ps_opts.usage
361347
end
362348

363349

0 commit comments

Comments
 (0)