Land #3171, Fix NameError for "r" in Msf::Auxiliary::Nmap
commit
ba03890004
|
@ -184,7 +184,6 @@ def nmap_validate_rports
|
||||||
if datastore['RPORT'] && (datastore['RPORT'].kind_of?(Fixnum) || !datastore['RPORT'].empty?)
|
if datastore['RPORT'] && (datastore['RPORT'].kind_of?(Fixnum) || !datastore['RPORT'].empty?)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
bad_port = false
|
|
||||||
if rports.nil? || rports.empty?
|
if rports.nil? || rports.empty?
|
||||||
print_error "Missing RPORTS"
|
print_error "Missing RPORTS"
|
||||||
return false
|
return false
|
||||||
|
@ -193,14 +192,10 @@ def nmap_validate_rports
|
||||||
if r =~ /^([TU]:)?[0-9]*-?[0-9]*$/
|
if r =~ /^([TU]:)?[0-9]*-?[0-9]*$/
|
||||||
next
|
next
|
||||||
else
|
else
|
||||||
bad_port = true
|
print_error "Malformed nmap port: #{r}"
|
||||||
break
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if bad_port
|
|
||||||
print_error "Malformed nmap port: #{r}"
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
print_status "Using RPORTS range #{datastore['RPORTS']}"
|
print_status "Using RPORTS range #{datastore['RPORTS']}"
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue