Land #3171, Fix NameError for "r" in Msf::Auxiliary::Nmap

bug/bundler_fix
Christian Mehlmauer 2014-03-29 00:01:03 +01:00
commit ba03890004
No known key found for this signature in database
GPG Key ID: BCFF4FA966BC32C7
1 changed files with 2 additions and 7 deletions

View File

@ -184,7 +184,6 @@ def nmap_validate_rports
if datastore['RPORT'] && (datastore['RPORT'].kind_of?(Fixnum) || !datastore['RPORT'].empty?)
return true
end
bad_port = false
if rports.nil? || rports.empty?
print_error "Missing RPORTS"
return false
@ -193,14 +192,10 @@ def nmap_validate_rports
if r =~ /^([TU]:)?[0-9]*-?[0-9]*$/
next
else
bad_port = true
break
print_error "Malformed nmap port: #{r}"
return false
end
end
if bad_port
print_error "Malformed nmap port: #{r}"
return false
end
print_status "Using RPORTS range #{datastore['RPORTS']}"
return true
end