Skip to content

Commit ad2e7c3

Browse files
committed
print header only if there are results...
1 parent 7e6e154 commit ad2e7c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/auxiliary/scanner/sap/sap_mgmt_con_instanceproperties.rb

Lines changed: 4 additions & 2 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
240239
webmethods_output << webm unless protectedweb_arr && protectedweb_arr.include?(webm)
241240
end
242-
print_status("#{webmethods_output.join(',')}") if webmethods_output
241+
if webmethods_output
242+
print_good("#{rhost}:#{rport} [SAP] Unprotected Webmethods :::")
243+
print_status("#{webmethods_output.join(',')}")
244+
end
243245
report_note(:host => rhost,
244246
:proto => 'tcp',
245247
:port => rport,

0 commit comments

Comments
 (0)