more hot -h action

git-svn-id: file:///home/svn/framework3/trunk@7351 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2009-11-04 16:35:51 +00:00
parent bec5fd192f
commit 56f18687c5
2 changed files with 16 additions and 2 deletions

View File

@ -9,12 +9,11 @@ session = client
)
@@exec_opts.parse(args) { |opt, idx, val|
p opt
case opt
when "-h"
print_line("CheckVM -- Check various attributes on the target for evidence that it is a virtual machine")
print_line("USAGE: run checkvm")
print_status(@@exec_opts.usage)
print_line(@@exec_opts.usage)
raise Rex::Script::Completed
end
}

View File

@ -4,6 +4,21 @@
# This is meant as an illustration.
#
opts = Rex::Parser::Arguments.new(
"-h" => [ false,"Help menu." ]
)
opts.parse(args) { |opt, idx, val|
case opt
when "-h"
print_line("")
print_line("USAGE: run migrate [process name]")
print_line("EXAMPLE: run migrate explorer.exe")
print_line(opts.usage)
raise Rex::Script::Completed
end
}
# Get the target process name
target = args[0] || "lsass.exe"