Added nil check + formatting edits

bug/bundler_fix
juushya 2017-03-07 02:16:01 +05:30
parent 62b0efd99d
commit d99d81992f
1 changed files with 10 additions and 3 deletions

View File

@ -102,9 +102,16 @@ class MetasploitModule < Msf::Auxiliary
if good_response if good_response
get_epmp_ver = res.body.match(/"sw_version">([^<]*)/) get_epmp_ver = res.body.match(/"sw_version">([^<]*)/)
if !get_epmp_ver.nil?
epmp_ver = get_epmp_ver[1] epmp_ver = get_epmp_ver[1]
if !epmp_ver.nil?
print_good("#{rhost}:#{rport} - Running Cambium ePMP 1000 version #{epmp_ver}...") print_good("#{rhost}:#{rport} - Running Cambium ePMP 1000 version #{epmp_ver}...")
return true return true
else
print_good("#{rhost}:#{rport} - Running Cambium ePMP 1000...")
return true
end
end
else else
print_error("#{rhost}:#{rport} - Application does not appear to be Cambium ePMP 1000. Module will not continue.") print_error("#{rhost}:#{rport} - Application does not appear to be Cambium ePMP 1000. Module will not continue.")
return false return false