We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2972220 commit 8fd4f50Copy full SHA for 8fd4f50
lib/msf/core/auxiliary/nmap.rb
@@ -184,7 +184,6 @@ def nmap_validate_rports
184
if datastore['RPORT'] && (datastore['RPORT'].kind_of?(Fixnum) || !datastore['RPORT'].empty?)
185
return true
186
end
187
- bad_port = false
188
if rports.nil? || rports.empty?
189
print_error "Missing RPORTS"
190
return false
@@ -193,14 +192,10 @@ def nmap_validate_rports
193
192
if r =~ /^([TU]:)?[0-9]*-?[0-9]*$/
194
next
195
else
196
- bad_port = true
197
- break
+ print_error "Malformed nmap port: #{r}"
+ return false
198
199
200
- if bad_port
201
- print_error "Malformed nmap port: #{r}"
202
- return false
203
- end
204
print_status "Using RPORTS range #{datastore['RPORTS']}"
205
206
0 commit comments