mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Replace some print calls with proper debug functions. See #1774
This commit is contained in:
@@ -542,9 +542,10 @@ UrlQueue = {
|
||||
end,
|
||||
|
||||
-- dumps the contents of the UrlQueue
|
||||
dump = function(self)
|
||||
dump = function(self, printer)
|
||||
printer = printer or print
|
||||
for _, url in ipairs(self.urls) do
|
||||
print("url:", url)
|
||||
printer("url:", url)
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
@@ -74,8 +74,7 @@ IAX2 = {
|
||||
local header = IAX2.Header:new()
|
||||
local frame_type, pos = string.unpack("B", data)
|
||||
if ( (frame_type & 0x80) == 0 ) then
|
||||
print("frame_type", stdnse.tohex(frame_type))
|
||||
stdnse.debug2("Frametype not supported")
|
||||
stdnse.debug2("Frametype %x not supported", frame_type)
|
||||
return
|
||||
end
|
||||
header.type = IAX2.PacketType.FULL
|
||||
|
||||
@@ -563,13 +563,13 @@ end
|
||||
function Packet:ip_parse(force_continue)
|
||||
self.ip_offset = 0
|
||||
if #self.buf < 20 then -- too short
|
||||
print("too short")
|
||||
stdnse.debug2("Packet.ip_parse: too short")
|
||||
return false
|
||||
end
|
||||
self.ip_v = (self:u8(self.ip_offset + 0) & 0xF0) >> 4
|
||||
self.ip_hl = (self:u8(self.ip_offset + 0) & 0x0F) -- header_length or data_offset
|
||||
if self.ip_v ~= 4 then -- not ip
|
||||
print("not v4")
|
||||
stdnse.debug2("Packet.ip_parse: Not IPv4")
|
||||
return false
|
||||
end
|
||||
self.ip = true
|
||||
|
||||
Reference in New Issue
Block a user