mirror of
https://github.com/nmap/nmap.git
synced 2026-01-06 22:49:02 +00:00
Remove unnecessarily-specific 'port.number' from comm.lua calls
This commit is contained in:
@@ -146,7 +146,7 @@ end
|
||||
portrule = shortport.version_port_or_service({1258,2126,3123,12444,13200,23196,26000,27138,27244,27777,28138}, "allseeingeye", "udp")
|
||||
|
||||
action = function(host, port)
|
||||
local status, data = comm.exchange(host, port.number, "s", { proto = "udp", timeout = 3000 })
|
||||
local status, data = comm.exchange(host, port, "s", { timeout = 3000 })
|
||||
if not status then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -65,9 +65,8 @@ function grab_banner(host, port)
|
||||
local opts = {}
|
||||
opts.timeout = stdnse.parse_timespec(stdnse.get_script_args(SCRIPT_NAME .. ".timeout"))
|
||||
opts.timeout = (opts.timeout or 5) * 1000
|
||||
opts.proto = port.protocol
|
||||
|
||||
local status, response = comm.get_banner(host.ip, port.number, opts)
|
||||
local status, response = comm.get_banner(host, port, opts)
|
||||
|
||||
if not status then
|
||||
local errlvl = { ["EOF"]=3,["TIMEOUT"]=3,["ERROR"]=2 }
|
||||
|
||||
@@ -52,9 +52,9 @@ categories = { "default", "discovery", "safe", "version" }
|
||||
portrule = shortport.version_port_or_service({2302}, "freelancer", "udp")
|
||||
|
||||
action = function(host, port)
|
||||
local status, data = comm.exchange(host, port.number,
|
||||
local status, data = comm.exchange(host, port,
|
||||
"\x00\x02\xf1\x26\x01\x26\xf0\x90\xa6\xf0\x26\x57\x4e\xac\xa0\xec\xf8\x68\xe4\x8d\x21",
|
||||
{ proto = "udp", timeout = 3000 })
|
||||
{ timeout = 3000 })
|
||||
if not status then
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user