1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 05:09:14 +00:00

Remove unused and newly unrequired arguments to the pcap check functions (which

replace the old callbacks) in scripts
This commit is contained in:
kris
2010-09-19 02:15:19 +00:00
parent de4ba536de
commit fa858e041b
5 changed files with 19 additions and 19 deletions

View File

@@ -269,7 +269,7 @@ end
--- pcap check function
-- @return destination ip address, the ip protocol and icmp type
local function check (size, layer2, layer3)
local function check (layer3)
local ip = packet.Packet:new(layer3, layer3:len())
return bin.pack('ACC', ip.ip_bin_dst, ip.ip_p, ip.icmp_type)
end
@@ -309,10 +309,10 @@ action = function(host)
while retry < MAX_RETRIES do
try(sock:ip_send(pkt.buf))
local status, length, layer2, layer3 = pcap:pcap_receive();
local status, length, _, layer3 = pcap:pcap_receive();
local test = bin.pack('ACC', pkt.ip_bin_src, packet.IPPROTO_ICMP, ICMP_TIME_EXCEEDED);
while status and test ~= check(length, layer2, layer3) do
status, length, layer2, layer3 = pcap:pcap_receive();
while status and test ~= check(layer3) do
status, length, _, layer3 = pcap:pcap_receive();
end
if status then