Skip to content

Commit d99d819

Browse files
committed
Added nil check + formatting edits
1 parent 62b0efd commit d99d819

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

modules/auxiliary/scanner/http/epmp1000_dump_config.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,16 @@ def is_app_epmp1000?
102102

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

0 commit comments

Comments
 (0)