add -h to credcollect

git-svn-id: file:///home/svn/framework3/trunk@7255 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
James Lee 2009-10-25 19:52:40 +00:00
parent 5fd8dc748a
commit e93995fdab
1 changed files with 21 additions and 1 deletions

View File

@ -1,6 +1,26 @@
# $Id: $
# credcollect - tebo[at]attackresearch.com
@@exec_opts = Rex::Parser::Arguments.new(
"-h" => [ false,"Help menu." ]
)
@@exec_opts.parse(args) { |opt, idx, val|
case opt
when "-h"
print_line("CredCollect -- harvest credentials found on the host and store them in the database")
print_line("USAGE: run credcollect")
puts @@exec_opts.usage
raise "Usage"
end
}
# No sense trying to grab creds if we don't have any place to put them
if !client.framework.db.active
raise "Database not connected. Run db_connect first."
end
# Make sure we're rockin Priv and Incognito
if not extensions.include?("priv"); client.core.use("priv") end
if not extensions.include?("incognito"); client.core.use("incognito") end