1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 03:39:02 +00:00

Fix more Lua patterns with '-', see r32566

This commit is contained in:
dmiller
2013-12-19 20:34:46 +00:00
parent 45cd8091a4
commit 771a6a0793
5 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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+$"))