mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 10:59:02 +00:00
Allow CRLF line endings in upnp.lua
Only LF was supported before. Reported by kaito. http://seclists.org/nmap-dev/2013/q1/221
This commit is contained in:
@@ -181,9 +181,9 @@ Comm = {
|
||||
-- We should get a response back that has contains one line for the server, and one line for the xml file location
|
||||
-- these match any combination of upper and lower case responses
|
||||
local server, location
|
||||
server = string.match(response, "[Ss][Ee][Rr][Vv][Ee][Rr]:%s*(.-)\010")
|
||||
server = string.match(response, "[Ss][Ee][Rr][Vv][Ee][Rr]:%s*(.-)\r?\n")
|
||||
if server ~= nil then table.insert(output, "Server: " .. server ) end
|
||||
location = string.match(response, "[Ll][Oo][Cc][Aa][Tt][Ii][Oo][Nn]:%s*(.-)\010")
|
||||
location = string.match(response, "[Ll][Oo][Cc][Aa][Tt][Ii][Oo][Nn]:%s*(.-)\r?\n")
|
||||
if location ~= nil then
|
||||
table.insert(output, "Location: " .. location )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user