1
0
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:
dmiller
2015-03-03 04:48:18 +00:00
parent 03110e7e89
commit e2bfa97920
6 changed files with 11 additions and 15 deletions

View File

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