mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Don't let UDP decoding bugs kill broadcast-listener main thread
This commit is contained in:
@@ -153,10 +153,12 @@ sniffInterface = function(iface, Decoders, decodertab)
|
|||||||
|
|
||||||
-- if we have an UDP-based broadcast, we should have a proper packet
|
-- if we have an UDP-based broadcast, we should have a proper packet
|
||||||
if ( p and p.udp_dport and ( decodertab.udp[p.udp_dport] or Decoders.udp[p.udp_dport] ) ) then
|
if ( p and p.udp_dport and ( decodertab.udp[p.udp_dport] or Decoders.udp[p.udp_dport] ) ) then
|
||||||
if ( not(decodertab.udp[p.udp_dport]) ) then
|
local uport = p.udp_dport
|
||||||
decodertab.udp[p.udp_dport] = Decoders.udp[p.udp_dport]:new()
|
if ( not(decodertab.udp[uport]) ) then
|
||||||
|
decodertab.udp[uport] = Decoders.udp[uport]:new()
|
||||||
end
|
end
|
||||||
decodertab.udp[p.udp_dport]:process(data)
|
stdnse.new_thread(decodertab.udp[uport].process, decodertab.udp[uport], data)
|
||||||
|
decoded = true
|
||||||
-- The packet was decoded successfully but we don't have a valid decoder
|
-- The packet was decoded successfully but we don't have a valid decoder
|
||||||
-- Report this
|
-- Report this
|
||||||
elseif ( p and p.udp_dport ) then
|
elseif ( p and p.udp_dport ) then
|
||||||
|
|||||||
Reference in New Issue
Block a user