shares_info should only run if there's shares found

unstable
sinn3r 2013-07-11 13:36:26 -05:00
parent 14b3e6440c
commit 55dbfc9281
1 changed files with 1 additions and 1 deletions

View File

@ -359,10 +359,10 @@ class Metasploit3 < Msf::Auxiliary
os_info = get_os_info(ip, rport) os_info = get_os_info(ip, rport)
print_status("#{ip}:#{rport} - #{os_info}") if os_info print_status("#{ip}:#{rport} - #{os_info}") if os_info
shares_info = shares.map{|x| "#{x[0]} - #{x[2]} (#{x[1]})" }.join(", ")
if shares.empty? if shares.empty?
print_status("#{ip}:#{rport} - No shares collected") print_status("#{ip}:#{rport} - No shares collected")
else else
shares_info = shares.map{|x| "#{x[0]} - #{x[2]} (#{x[1]})" }.join(", ")
print_status("#{ip}:#{rport} - #{shares_info}") print_status("#{ip}:#{rport} - #{shares_info}")
report_note( report_note(
:host => ip, :host => ip,