From a1a106defe39f8fc960f027876b98a2c32526698 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 24 Feb 2013 04:55:40 +0000 Subject: [PATCH] Allow CRLF line endings in upnp.lua Only LF was supported before. Reported by kaito. http://seclists.org/nmap-dev/2013/q1/221 --- nselib/upnp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/upnp.lua b/nselib/upnp.lua index 62949a8c2..e62b74331 100644 --- a/nselib/upnp.lua +++ b/nselib/upnp.lua @@ -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 )