Land #5483 : Use the correct help output for the ps command

bug/bundler_fix
OJ 2015-06-05 07:30:15 +10:00
commit 26785b34f1
No known key found for this signature in database
GPG Key ID: D5DC61FB93260597
1 changed files with 11 additions and 17 deletions

View File

@ -436,13 +436,8 @@ class Console::CommandDispatcher::Stdapi::Sys
return true
end
when '-h'
print_line "Usage: ps [ options ]"
print_line
print_line "OPTIONS:"
print_line " -S Search string to filter by"
print_line " -h This help menu"
print_line
return 0
cmd_ps_help
return true
when "-A"
print_line "Filtering on arch..."
searched_procs = Rex::Post::Meterpreter::Extensions::Stdapi::Sys::ProcessList.new
@ -491,7 +486,6 @@ class Console::CommandDispatcher::Stdapi::Sys
'SearchTerm' => search_term)
processes.each { |ent|
session = ent['session'] == 0xFFFFFFFF ? '' : ent['session'].to_s
arch = ent['arch']
@ -503,8 +497,6 @@ class Console::CommandDispatcher::Stdapi::Sys
row = [ ent['pid'].to_s, ent['name'], arch, session, ent['user'], ent['path'] ]
tbl << row #if (search_term.nil? or row.join(' ').to_s.match(search_term))
}
if (processes.length == 0)
@ -518,6 +510,8 @@ class Console::CommandDispatcher::Stdapi::Sys
end
def cmd_ps_help
print_line "Usage: ps [ options ]"
print_line
print_line "Use the command with no arguments to see all running processes."
print_line "The following options can be used to filter those results:"