Address PR comments regarding command options

GSoC/Meterpreter_Web_Console
James Barnett 2018-01-19 15:46:24 -06:00
parent b8296a809c
commit 4f3ee6dd83
No known key found for this signature in database
GPG Key ID: 647983861A4EC5EA
2 changed files with 11 additions and 10 deletions

View File

@ -100,18 +100,19 @@ module Msf
def cmd_add_data_service(*args)
protocol = "http"
port = 80
while (arg = args.shift)
case arg
when '--help'
when '-h', '--help'
cmd_add_data_service_help
return
when '-h'
host = args.shift
when '-p'
port = args.shift
when '-s'
when '-s', '--ssl'
protocol = "https"
args.shift
else
host = arg
end
end
@ -127,12 +128,12 @@ module Msf
end
def cmd_add_data_service_help
print_line "Usage: add_data_service [ options ] -h <host IP or FQDN> -p <host port>"
print_line "Usage: add_data_service [ options ] [ Remote Address]"
print_line
print_line "OPTIONS:"
print_line " -h <IP/FQDN> The IP address or FQDN of the data service server."
print_line " -p <port> The port the data service is listening on."
print_line " -s Enable SSL. Required for HTTPS data services."
print_line " -h, --help Show this help information."
print_line " -p <port> The port the data service is listening on. Default is 80"
print_line " -s, --ssl Enable SSL. Required for HTTPS data services."
print_line
end

4
msfdb
View File

@ -45,11 +45,11 @@ def parse_args(args)
opts[:ssl] = true
end
opt.on('-c', '--cert <path/to/cert.pem>', String, 'Path to your SSL Certificate file') do |p|
opt.on('-c', '--cert <path/to/cert.pem>', String, 'Path to SSL Certificate file') do |p|
opts[:ssl_cert] = p
end
opt.on('-k', '--key <path/to/key.pem>', String, 'Path to your SSL Key file') do |p|
opt.on('-k', '--key <path/to/key.pem>', String, 'Path to SSL Key file') do |p|
opts[:ssl_key] = p
end