1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-27 08:39:02 +00:00

Fix some bad patterns with excessive backtracking

This commit is contained in:
dmiller
2016-09-21 03:55:11 +00:00
parent da594ae5b8
commit d1fb502144
5 changed files with 10 additions and 7 deletions

View File

@@ -135,15 +135,15 @@ Decoders = {
local response = {}
-- extracts the messagid, so we can check if we already got a response
response.msgid = data:match("<.*:MessageID>urn:uuid:(.*)</.*:MessageID>")
response.msgid = data:match("<[^:]*:MessageID>urn:uuid:([^<]*)</[^:]*:MessageID>")
-- if unable to parse msgid return nil
if ( not(response.msgid) ) then
return false, "No message id was found"
end
response.xaddrs = data:match("<.*:*XAddrs>(.*)</.*:*XAddrs>")
response.types = data:match("<.*:Types>[wsdp:]*(.*)</.*:Types>")
response.xaddrs = data:match("<[^:]*:*XAddrs>(.*)</[^:]*:*XAddrs>")
response.types = data:match("<[^:]*:Types>[wsdp:]*(.*)</[^:]*:Types>")
return true, response
end,