1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +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

@@ -159,7 +159,7 @@ end
--- Pcap check
-- @return Destination and source IP addresses and TCP ports
local function check (size, layer2, layer3)
local check = function(layer3)
local ip = packet.Packet:new(layer3, layer3:len())
return bin.pack('AA=S=S', ip.ip_bin_dst, ip.ip_bin_src, ip.tcp_dport, ip.tcp_sport)
end
@@ -459,9 +459,9 @@ action = function(host)
stats[j].sent = stats[j].sent + 1
local test = bin.pack('AA=S=S', tcp.ip_bin_src, tcp.ip_bin_dst, tcp.tcp_sport, tcp.tcp_dport)
local status, length, layer2, layer3, stop = pcap:pcap_receive()
while status and test ~= check(length, layer2, layer3) do
status, length, layer2, layer3, stop = pcap:pcap_receive()
local status, length, _, layer3, stop = pcap:pcap_receive()
while status and test ~= check(layer3) do
status, length, _, layer3, stop = pcap:pcap_receive()
end
if not stop then