Skip to content

Commit e89e2af

Browse files
changed to chomp
1 parent 3854d08 commit e89e2af

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/auxiliary/scanner/smb/smb_enumshares.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def eval_host(ip, share)
8080
read = write = false
8181

8282
# srvsvc adds a null byte that needs to be removed
83-
if datastore['USE_SRVSVC_ONLY']
84-
share = share[0..-2]
85-
end
83+
share = share.chomp("\x00")
8684

8785
return false,false,nil,nil if share == 'IPC$'
8886

0 commit comments

Comments
 (0)