Skip to content

Commit 0a9c1bc

Browse files
committed
Too verbose by default drives users nuts, go easy on that.
1 parent 55dbfc9 commit 0a9c1bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/auxiliary/scanner/smb/smb_enumshares.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def eval_host(ip, share)
8787
device_type = self.simple.client.queryfs_fs_device['device_type']
8888

8989
unless device_type
90-
print_error("\\\\#{ip}\\#{share}: Error querying filesystem device type")
90+
vprint_error("\\\\#{ip}\\#{share}: Error querying filesystem device type")
9191
return false,false,nil,nil
9292
end
9393

@@ -106,7 +106,7 @@ def eval_host(ip, share)
106106
# 0x0006002 = bad network name, 0x0030001 Directory not found
107107
return false,false,nil,nil
108108
else
109-
print_error("\\\\#{ip}\\#{share}: Error querying filesystem device type")
109+
vprint_error("\\\\#{ip}\\#{share}: Error querying filesystem device type")
110110
return false,false,nil,nil
111111
end
112112
end
@@ -218,7 +218,7 @@ def srvsvc_netshareenum(ip)
218218
begin
219219
dcerpc_bind(handle)
220220
rescue Rex::Proto::SMB::Exceptions::ErrorCode => e
221-
print_error("#{ip} : #{e.message}")
221+
vprint_error("#{ip} : #{e.message}")
222222
return []
223223
end
224224

@@ -392,7 +392,7 @@ def run_host(ip)
392392
::Rex::Proto::SMB::Exceptions::InvalidCommand,
393393
::Rex::Proto::SMB::Exceptions::InvalidWordCount,
394394
::Rex::Proto::SMB::Exceptions::NoReply => e
395-
print_error(e.message)
395+
vprint_error(e.message)
396396
next if not shares.empty? and rport == 139 # no results, try again
397397
rescue Errno::ENOPROTOOPT
398398
print_status("Wait 5 seconds before retrying...")

0 commit comments

Comments
 (0)