mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19: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:
@@ -492,7 +492,7 @@ function start_raw(host, port)
|
||||
local socket = nmap.new_socket()
|
||||
|
||||
socket:set_timeout(TIMEOUT)
|
||||
status, err = socket:connect(host.ip, port, "tcp")
|
||||
status, err = socket:connect(host, port, "tcp")
|
||||
|
||||
if(status == false) then
|
||||
return false, "SMB: Failed to connect to host: " .. err
|
||||
@@ -599,7 +599,7 @@ function start_netbios(host, port, name)
|
||||
|
||||
stdnse.print_debug(3, "SMB: Connecting to %s", host.ip)
|
||||
socket:set_timeout(TIMEOUT)
|
||||
status, err = socket:connect(host.ip, port, "tcp")
|
||||
status, err = socket:connect(host, port, "tcp")
|
||||
if(status == false) then
|
||||
socket:close()
|
||||
return false, "SMB: Failed to connect: " .. err
|
||||
|
||||
Reference in New Issue
Block a user