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?) 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