1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-22 22:29:03 +00:00

1-line fix from Jah:

The attached fixes an error in ipOps.ip_to_bin() when a string is passed
to stdnse.tohex().  This should always be (and should always have been)
a number.
This commit is contained in:
fyodor
2008-10-07 02:17:08 +00:00
parent 9e4772dc50
commit 84bb81d6ee

View File

@@ -387,7 +387,7 @@ ip_to_bin = function( ip )
if not ip:match( ":" ) then
-- ipv4 string
for octet in string.gfind( ip, "%d+" ) do
t[#t+1] = stdnse.tohex( octet )
t[#t+1] = stdnse.tohex( tonumber(octet) )
end
mask = "00"
else