mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
Handle too-short response in s7-info. See #2117
This commit is contained in:
parent
d3f47863ee
commit
e278afa57d
1 changed files with 4 additions and 0 deletions
|
|
@ -128,6 +128,10 @@ local function second_parse_response(response, output)
|
|||
-- change offset to 4, this is where most of valid PLCs will fall
|
||||
offset = 4
|
||||
end
|
||||
if #response < 142 + offset then
|
||||
stdnse.debug1("Short response cannot be parsed.")
|
||||
return nil
|
||||
end
|
||||
-- parse system name
|
||||
output["System Name"] = string.unpack("z", response, 40 + offset)
|
||||
-- parse module type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue