1
0
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:
dmiller
2015-02-05 04:18:10 +00:00
parent 40652f215b
commit afc9f6f301
3 changed files with 4 additions and 5 deletions

View File

@@ -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

View File

@@ -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 }

View File

@@ -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