mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Avoid a crash when the IP contains a colon but no hextets
This commit is contained in:
@@ -381,6 +381,9 @@ expand_ip = function( ip, family )
|
|||||||
for hdt in string.gmatch( ip, "[%.z%x]+" ) do
|
for hdt in string.gmatch( ip, "[%.z%x]+" ) do
|
||||||
hexadectets[#hexadectets+1] = hdt
|
hexadectets[#hexadectets+1] = hdt
|
||||||
end
|
end
|
||||||
|
if #hexadectets == 0 then
|
||||||
|
return nil, ( err4:gsub( "IPv4", "IPv6" ) )
|
||||||
|
end
|
||||||
|
|
||||||
-- deal with IPv4in6 (last hexadectet only)
|
-- deal with IPv4in6 (last hexadectet only)
|
||||||
local t = {}
|
local t = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user