mirror of
https://github.com/nmap/nmap.git
synced 2026-02-08 14:36:33 +00:00
Replace instances of bin.pack('A', x), which is equivalent to tostring(x), and a no-op on strings
This commit is contained in:
@@ -154,7 +154,7 @@ end
|
||||
-- different hosts
|
||||
local check = function(layer3)
|
||||
local ip = packet.Packet:new(layer3, layer3:len())
|
||||
return bin.pack('A', ip.ip_bin_dst)
|
||||
return ip.ip_bin_dst
|
||||
end
|
||||
|
||||
-- Updates a packet's info and calculates checksum
|
||||
@@ -341,7 +341,7 @@ action = function(host)
|
||||
end
|
||||
end
|
||||
|
||||
local test = bin.pack('A', pkt.ip_bin_src)
|
||||
local test = pkt.ip_bin_src
|
||||
local status, length, _, layer3 = pcap:pcap_receive()
|
||||
while status and test ~= check(layer3) do
|
||||
status, length, _, layer3 = pcap:pcap_receive()
|
||||
|
||||
Reference in New Issue
Block a user