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

@@ -93,7 +93,7 @@ local knxParseSearchResponse = function(ips, results, knxMessage)
end
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")
return
end

View File

@@ -56,7 +56,7 @@ local knxParseDescriptionResponse = function(knxMessage)
end
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")
return
end