diff --git a/nselib/data/http-devframework-fingerprints.lua b/nselib/data/http-devframework-fingerprints.lua index 09179bd82..e5836040b 100644 --- a/nselib/data/http-devframework-fingerprints.lua +++ b/nselib/data/http-devframework-fingerprints.lua @@ -232,7 +232,7 @@ tools = { Django = { rapidDetect = function(host, port) consumingDetect = function(page, path) if page then if string.find(page, "content=[\"']WordPress") or - string.find(page, "wp-content") then + string.find(page, "wp%-content") then return "Wordpress detected. Found common traces on " .. page end end diff --git a/nselib/ftp.lua b/nselib/ftp.lua index f8bfe92b2..f962af06c 100644 --- a/nselib/ftp.lua +++ b/nselib/ftp.lua @@ -57,7 +57,7 @@ function read_reply(buffer) end -- Multi-line response? - _, p, code, message = string.find(line, "^(%d%d%d)-(.*)$") + _, p, code, message = string.find(line, "^(%d%d%d)%-(.*)$") if p then while true do line, err = buffer() diff --git a/nselib/msrpctypes.lua b/nselib/msrpctypes.lua index b9a692c9e..a93334a27 100644 --- a/nselib/msrpctypes.lua +++ b/nselib/msrpctypes.lua @@ -1571,11 +1571,11 @@ function marshall_dom_sid2(sid) stdnse.print_debug(4, string.format("MSRPC: Entering marshall_dom_sid2()")) - if(string.find(sid, "^S-") == nil) then + if(string.find(sid, "^S%-") == nil) then stdnse.print_debug(1, "MSRPC: ERROR: Invalid SID encountered: %s\n", sid) return nil end - if(string.find(sid, "-%d+$") == nil) then + if(string.find(sid, "%-%d+$") == nil) then stdnse.print_debug(1, "MSRPC: ERROR: Invalid SID encountered: %s\n", sid) return nil end diff --git a/scripts/http-waf-fingerprint.nse b/scripts/http-waf-fingerprint.nse index 2c6bb7d0b..05b2455b3 100644 --- a/scripts/http-waf-fingerprint.nse +++ b/scripts/http-waf-fingerprint.nse @@ -334,7 +334,7 @@ netscaler = { -- TODO Check for other version detection possibilities -- based on fingerprint difference - if response.header.via and string.find(response.header.via, 'NS-CACHE') then -- + if response.header.via and string.find(response.header.via, 'NS%-CACHE') then -- stdnse.print_debug("%s Citrix Netscaler detected through Via Header.", SCRIPT_NAME) netscaler.version = string.sub(response.header.via, 10, 12) netscaler.detected = true diff --git a/scripts/smb-enum-sessions.nse b/scripts/smb-enum-sessions.nse index e3310864f..5de76c844 100644 --- a/scripts/smb-enum-sessions.nse +++ b/scripts/smb-enum-sessions.nse @@ -215,7 +215,7 @@ local function winreg_enum_rids(host) for i = 1, #elements, 1 do if(elements[i]['name'] ~= nil) then local sid = elements[i]['name'] - if(string.find(sid, "^S-") ~= nil and string.find(sid, "-%d+$") ~= nil) then + if(string.find(sid, "^S%-") ~= nil and string.find(sid, "%-%d+$") ~= nil) then -- The rid is the last digits before the end of the string local rid = string.sub(sid, string.find(sid, "%d+$"))