mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
adc09f4aa1
git-svn-id: file:///home/svn/incoming/trunk@3069 4d416f70-5f16-0410-b530-b9f4589650da
36 lines
874 B
Ruby
Executable File
36 lines
874 B
Ruby
Executable File
#!/usr/bin/ruby
|
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '../lib'))
|
|
|
|
require 'rex'
|
|
require 'msf/ui'
|
|
|
|
# Declare the argument parser for msfweb
|
|
arguments = Rex::Parser::Arguments.new(
|
|
"-a" => [ true, "Bind to this IP address instead of loopback" ],
|
|
"-p" => [ true, "Bind to this port instead of 55555" ],
|
|
"-v" => [ true, "A number between 0 and 3 that controls log verbosity" ],
|
|
"-h" => [ false, "Help banner" ])
|
|
|
|
opts = {}
|
|
|
|
# Parse command line arguments.
|
|
arguments.parse(ARGV) { |opt, idx, val|
|
|
case opt
|
|
when "-a"
|
|
opts['ServerHost'] = val
|
|
when "-p"
|
|
opts['ServerPort'] = val
|
|
when "-v"
|
|
opts['LogLevel'] = val
|
|
when "-h"
|
|
print(
|
|
"\nUsage: msfweb <options>\n" +
|
|
arguments.usage)
|
|
exit
|
|
end
|
|
}
|
|
|
|
# Create the driver instance and run it.
|
|
Msf::Ui::Web::Driver.new(opts).run
|