1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00

Change calls in these forms:

socket:connect(host.ip, port.number)
socket:connect(host.ip, port.number, port.protocol)

to this:

socket:connect(host, port)

connect can take host and port tables now, and the default protocol is
taken from the port table if possible.
This commit is contained in:
david
2010-08-16 18:59:30 +00:00
parent bfffa53616
commit 3c89e089fc
55 changed files with 63 additions and 63 deletions

View File

@@ -368,7 +368,7 @@ local function check_smbv2_dos(host)
return false, "Couldn't create socket"
end
status, result = socket:connect(host.ip, 445)
status, result = socket:connect(host, 445)
if(status == false) then
socket:close()
return false, "Couldn't connect to host: " .. result
@@ -396,7 +396,7 @@ local function check_smbv2_dos(host)
-- Try and do something simple
stdnse.print_debug(1, "smb-check-vulns: Attempting to connect to the host")
socket:set_timeout(5000)
status, result = socket:connect(host.ip, 445)
status, result = socket:connect(host, 445)
-- Check the result
if(status == false or status == nil) then