1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Removed packet.hextobin and packet.bintohex. Both are unnecessary

with the struct (bin) library available:

function hextobin(str) return bin.pack("H", str) end
function bintohex(str) return bin.unpack("H", str) end

Also removed a commented copy that was in the sniffer-detect.nse script.
This commit is contained in:
batrick
2009-05-28 03:59:02 +00:00
parent d337e05f7f
commit 3eba69f9f8
2 changed files with 0 additions and 50 deletions

View File

@@ -24,16 +24,6 @@ hostrule = function(host, port)
nmap.get_interface_link(host.interface) == 'ethernet'
end
--[[
function bintohex(str)
local b = ""
for c in string.gmatch(str, ".") do
b = string.format('%s%02x',b, string.byte(c))
end
return b
end
--]]
callback = function(packetsz, layer2, layer3)
return string.sub(layer2, 0, 12)
end