Skip to content

Commit 55dbfc9

Browse files
committed
shares_info should only run if there's shares found
1 parent 14b3e64 commit 55dbfc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/auxiliary/scanner/smb/smb_enumshares.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ def run_host(ip)
359359
os_info = get_os_info(ip, rport)
360360
print_status("#{ip}:#{rport} - #{os_info}") if os_info
361361

362-
shares_info = shares.map{|x| "#{x[0]} - #{x[2]} (#{x[1]})" }.join(", ")
363362
if shares.empty?
364363
print_status("#{ip}:#{rport} - No shares collected")
365364
else
365+
shares_info = shares.map{|x| "#{x[0]} - #{x[2]} (#{x[1]})" }.join(", ")
366366
print_status("#{ip}:#{rport} - #{shares_info}")
367367
report_note(
368368
:host => ip,

0 commit comments

Comments
 (0)