Skip to content

Commit 942112d

Browse files
author
Tod Beardsley
committed
Land rapid7#3538, SAP fix from @jvazquez-r7
This looks good to me, the whole print statement is enclosed in a check for results.
2 parents c59d72b + ad2e7c3 commit 942112d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/auxiliary/scanner/sap/sap_mgmt_con_instanceproperties.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,14 @@ def enum_instance(rhost)
234234
if webmethods
235235
webmethods_output = [] # create empty webmethods array
236236
webmethods_arr = webmethods.split(",")
237-
print_good("#{rhost}:#{rport} [SAP] Unprotected Webmethods :::")
238237
webmethods_arr.each do | webm |
239238
# Only add webmethods not found in protectedweb_arr
240-
webmethods_output << webm if not protectedweb_arr.include?(webm)
239+
webmethods_output << webm unless protectedweb_arr && protectedweb_arr.include?(webm)
240+
end
241+
if webmethods_output
242+
print_good("#{rhost}:#{rport} [SAP] Unprotected Webmethods :::")
243+
print_status("#{webmethods_output.join(',')}")
241244
end
242-
print_status("#{webmethods_output.join(',')}") if webmethods_output
243245
report_note(:host => rhost,
244246
:proto => 'tcp',
245247
:port => rport,

0 commit comments

Comments
 (0)