Skip to content

Commit 0b5da60

Browse files
committed
Added nil check + formatting edits
1 parent 9a5ab60 commit 0b5da60

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

modules/auxiliary/scanner/http/epmp1000_dump_hashes.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,15 @@ def is_app_epmp1000?
103103

104104
if good_response
105105
get_epmp_ver = res.body.match(/"sw_version">([^<]*)/)
106-
epmp_ver = get_epmp_ver[1]
107-
print_good("#{rhost}:#{rport} - Running Cambium ePMP 1000 version #{epmp_ver}...")
108-
109-
if "#{epmp_ver}" >= '2.5'
110-
print_error('This ePMP version is not vulnerable. Module will not continue.')
111-
return false
112-
else
113-
return true
106+
if !get_epmp_ver.nil?
107+
epmp_ver = get_epmp_ver[1]
108+
if !epmp_ver.nil?
109+
print_good("#{rhost}:#{rport} - Running Cambium ePMP 1000 version #{epmp_ver}...")
110+
return true
111+
else
112+
print_good("#{rhost}:#{rport} - Running Cambium ePMP 1000...")
113+
return true
114+
end
114115
end
115116
else
116117
print_error("#{rhost}:#{rport} - Application does not appear to be Cambium ePMP 1000. Module will not continue.")

0 commit comments

Comments
 (0)