1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 06:59:01 +00:00

Backported a couple minor bugfixes from my experimental branch

This commit is contained in:
ron
2009-02-04 22:08:20 +00:00
parent 20b753f16f
commit 5ec608507a
2 changed files with 5 additions and 5 deletions

View File

@@ -1827,7 +1827,7 @@ function winreg_enumkey(smbstate, handle, index, name)
-- [in,out,ref] winreg_StringBuf *name,
-- NOTE: if the 'name' parameter here is set to 'nil', the service on a fully patched Windows 2000 system
-- may crash.
arguments = arguments .. msrpctypes.marshall_winreg_StringBuf({name=name}, 520)
arguments = arguments .. msrpctypes.marshall_winreg_StringBuf({name=nil}, 520)
-- [in,out,unique] winreg_StringBuf *keyclass,
arguments = arguments .. msrpctypes.marshall_winreg_StringBuf_ptr({name=nil})

View File

@@ -161,7 +161,7 @@ function check_shares(host, shares)
share = share .. string.sub(set, random, random)
end
share = string.format("\\\\%s\\%s", host.ip, share)
share = string.format("%s", share)
stdnse.print_debug(2, "EnumShares: Trying a random share to see if server responds properly: %s", share)
status, err = smb.tree_connect(smbstate, share)
if(status == false) then
@@ -179,7 +179,7 @@ function check_shares(host, shares)
for i = 1, #shares, 1 do
-- Change the share to the '\\ip\share' format
local share = string.format("\\\\%s\\%s", host.ip, shares[i])
local share = string.format("%s", shares[i])
-- Try connecting to the tree
stdnse.print_debug(3, "EnumShares: Testing share %s", share)
@@ -192,8 +192,8 @@ function check_shares(host, shares)
denied_shares[#denied_shares + 1] = shares[i]
else
-- If we're here, an error that we weren't prepared for came up.
smb.stop(smbstate)
return false, string.format("Error while checking shares: %s", err)
-- smb.stop(smbstate)
-- return false, string.format("Error while checking shares: %s", err)
end
else
-- Add it to allowed shares