mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 02:49:01 +00:00
ospf.lua: Corrected header tostring for null authentication packets.
This commit is contained in:
@@ -100,7 +100,9 @@ OSPF = {
|
||||
__tostring = function(self)
|
||||
local hdr = bin.pack(">CCS", self.ver, self.type, self.length )
|
||||
hdr = hdr .. bin.pack(">IISS", self.router_id, self.area_id, self.chksum, self.auth_type)
|
||||
if self.auth_type == 0x01 then
|
||||
if self.auth_type == 0x00 then
|
||||
hdr = hdr .. bin.pack(">L", 0x00)
|
||||
elseif self.auth_type == 0x01 then
|
||||
hdr = hdr .. bin.pack(">A8", self.auth_data.password)
|
||||
elseif self.auth_type == 0x02 then
|
||||
hdr = hdr .. bin.pack(">A".. self.auth_data.length, self.auth_data.hash)
|
||||
|
||||
Reference in New Issue
Block a user