Skip to content

Commit 58502f1

Browse files
committed
Updated.
1 parent d0cd5cf commit 58502f1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/auxiliary/scanner/smb/smb_enumshares.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def initialize(info={})
4848
OptBool.new('SpiderShares', [false, 'Spider shares recursively', false]),
4949
OptBool.new('VERBOSE', [true, 'Show detailed information when spidering', true]),
5050
OptBool.new('SpiderProfiles', [false, 'Spider only user profiles when share = C$', true]),
51-
OptInt.new('LogSpider', [false, '1 = CSV, 2 = table (txt), 3 = one liner (txt)', 3]),
51+
OptEnum.new('LogSpider', [false, '0 = disabled, 1 = CSV, 2 = table (txt), 3 = one liner (txt)', 3, [0,1,2,3]]),
5252
OptInt.new('MaxDepth', [true, 'Max number of subdirectories to spider', 999]),
5353
OptBool.new('USE_SRVSVC_ONLY', [true, 'List shares only with SRVSVC', false ])
5454
], self.class)
@@ -80,7 +80,7 @@ def to_unix_time(thi, tlo)
8080
t.strftime("%m-%d-%Y %H:%M:%S")
8181
end
8282

83-
def eval_host(ip, share, subdir="")
83+
def eval_host(ip, share, subdir = "")
8484
read = write = false
8585

8686
# srvsvc adds a null byte that needs to be removed
@@ -417,13 +417,13 @@ def get_files_info(ip, rport, shares, info)
417417
print_status("#{ip}:#{rport} - Spider #{x} complete.") unless datastore['VERBOSE'] == true
418418
end
419419
unless detailed_tbl.rows.empty?
420-
if datastore['LogSpider'] == 1
420+
if datastore['LogSpider'] == '1'
421421
p = store_loot('smb.enumshares', 'text/csv', ip, detailed_tbl.to_csv)
422422
print_good("#{ip} - info saved in: #{p.to_s}")
423-
elsif datastore['LogSpider'] == 2
423+
elsif datastore['LogSpider'] == '2'
424424
p = store_loot('smb.enumshares', 'text', ip, detailed_tbl)
425425
print_good("#{ip} - info saved in: #{p.to_s}")
426-
elsif datastore['LogSpider'] == 3
426+
elsif datastore['LogSpider'] == '3'
427427
p = store_loot('smb.enumshares', 'text', ip, logdata)
428428
print_good("#{ip} - info saved in: #{p.to_s}")
429429
end

0 commit comments

Comments
 (0)