mirror of
https://github.com/nmap/nmap.git
synced 2026-06-25 02:27:59 +00:00
ospf.lua: Corrected header tostring for null authentication packets.
This commit is contained in:
parent
93a54ee8b1
commit
7864c3cb08
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue