File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
lib/msf/ui/console/command_dispatcher Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -100,18 +100,19 @@ def cmd_list_data_services()
100
100
101
101
def cmd_add_data_service ( *args )
102
102
protocol = "http"
103
+ port = 80
103
104
while ( arg = args . shift )
104
105
case arg
105
- when '--help'
106
+ when '-h' , '- -help'
106
107
cmd_add_data_service_help
107
108
return
108
- when '-h'
109
- host = args . shift
110
109
when '-p'
111
110
port = args . shift
112
- when '-s'
111
+ when '-s' , '--ssl'
113
112
protocol = "https"
114
113
args . shift
114
+ else
115
+ host = arg
115
116
end
116
117
end
117
118
@@ -127,12 +128,12 @@ def cmd_add_data_service(*args)
127
128
end
128
129
129
130
def cmd_add_data_service_help
130
- print_line "Usage: add_data_service [ options ] -h <host IP or FQDN> -p <host port> "
131
+ print_line "Usage: add_data_service [ options ] [ Remote Address] "
131
132
print_line
132
133
print_line "OPTIONS:"
133
- print_line " -h <IP/FQDN> The IP address or FQDN of the data service server ."
134
- print_line " -p <port> The port the data service is listening on."
135
- print_line " -s Enable SSL. Required for HTTPS data services."
134
+ print_line " -h, --help Show this help information ."
135
+ print_line " -p <port> The port the data service is listening on. Default is 80 "
136
+ print_line " -s, --ssl Enable SSL. Required for HTTPS data services."
136
137
print_line
137
138
end
138
139
Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ def parse_args(args)
45
45
opts [ :ssl ] = true
46
46
end
47
47
48
- opt . on ( '-c' , '--cert <path/to/cert.pem>' , String , 'Path to your SSL Certificate file' ) do |p |
48
+ opt . on ( '-c' , '--cert <path/to/cert.pem>' , String , 'Path to SSL Certificate file' ) do |p |
49
49
opts [ :ssl_cert ] = p
50
50
end
51
51
52
- opt . on ( '-k' , '--key <path/to/key.pem>' , String , 'Path to your SSL Key file' ) do |p |
52
+ opt . on ( '-k' , '--key <path/to/key.pem>' , String , 'Path to SSL Key file' ) do |p |
53
53
opts [ :ssl_key ] = p
54
54
end
55
55
You can’t perform that action at this time.
0 commit comments