mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +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:
parent
03110e7e89
commit
e2bfa97920
6 changed files with 11 additions and 15 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue