1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Correct packet size testing in KNX scripts. Fixes #2727, fixes #2728

This commit is contained in:
nnposter
2023-11-12 23:02:33 +00:00
parent b4959d04f4
commit 6814bc4cdd
3 changed files with 4 additions and 2 deletions

View File

@@ -6,6 +6,8 @@ o Fixed an issue where TCP Connect scan (-sT) on Windows would fail to open any
o [NSE] Fixed DNS TXT record parsing which caused asn-query to fail in Nmap o [NSE] Fixed DNS TXT record parsing which caused asn-query to fail in Nmap
7.80 and later. [David Fifield, Mike Pattrick] 7.80 and later. [David Fifield, Mike Pattrick]
o [NSE][GH#2727][GH#2728] Fixed packet size testing in KNX scripts [f0rw4rd]
Nmap 7.94 [2023-05-19] Nmap 7.94 [2023-05-19]
o Zenmap and Ndiff now use Python 3! Thanks to the many contributors who made o Zenmap and Ndiff now use Python 3! Thanks to the many contributors who made

View File

@@ -93,7 +93,7 @@ local knxParseSearchResponse = function(ips, results, knxMessage)
end end
local message_format = '>B c1 c4 I2 BBB c1 I2 c2 c6 c4 c6 c30 BB' local message_format = '>B c1 c4 I2 BBB c1 I2 c2 c6 c4 c6 c30 BB'
if #knxMessage - pos + 1 < string.packlen(message_format) then if #knxMessage - pos + 1 < string.packsize(message_format) then
stdnse.debug1("Message too short for KNX message") stdnse.debug1("Message too short for KNX message")
return return
end end

View File

@@ -56,7 +56,7 @@ local knxParseDescriptionResponse = function(knxMessage)
end end
local message_format = '>BBB c1 I2 c2 c6 c4 c6 c30 BB' local message_format = '>BBB c1 I2 c2 c6 c4 c6 c30 BB'
if #knxMessage - pos + 1 < string.packlen(message_format) then if #knxMessage - pos + 1 < string.packsize(message_format) then
stdnse.debug1("Message too short for KNX message") stdnse.debug1("Message too short for KNX message")
return return
end end