mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
fixed bad escape sequences
This commit is contained in:
@@ -70,7 +70,7 @@ action = function(host, port)
|
||||
end
|
||||
|
||||
-- Check for restricted access -- Parse daemon info
|
||||
if string.match(data, "Authorization needed\. If your client doesnt support this") then
|
||||
if string.match(data, "Authorization needed%. If your client doesnt support this") then
|
||||
|
||||
local version_match = string.match(data, "acarsd\t(.+)\t")
|
||||
if version_match then table.insert(result, string.format("Version: %s", version_match)) end
|
||||
@@ -96,7 +96,7 @@ action = function(host, port)
|
||||
}
|
||||
for _, var in ipairs(vars) do
|
||||
local tag = var[2]
|
||||
local var_match = string.match(data, string.format('<%s>(.+)<\/%s>', tag, tag))
|
||||
local var_match = string.match(data, string.format('<%s>(.+)</%s>', tag, tag))
|
||||
if var_match then table.insert(result, string.format("%s: %s", var[1], string.gsub(var_match, "&", "&"))) end
|
||||
end
|
||||
|
||||
|
||||
@@ -445,8 +445,8 @@ function nice_output( output, combined_records )
|
||||
for j=1,#output,1 do
|
||||
-- does everything after the first pipe match for i ~= j?
|
||||
if i ~= j and output[i]:match( "[^|]+|([^$]+$)" ) == output[j]:match( "[^|]+|([^$]+$)" ) then
|
||||
first = output[i]:match( "([%x%d:\.]+/%d+)%s|" ) -- the lastmost BGP before the pipe in i.
|
||||
second = output[j]:match( "([%x%d:\.]+/%d+)" ) -- first BGP in j
|
||||
first = output[i]:match( "([%x%d:%.]+/%d+)%s|" ) -- the lastmost BGP before the pipe in i.
|
||||
second = output[j]:match( "([%x%d:%.]+/%d+)" ) -- first BGP in j
|
||||
-- add in the new BGP from j and delete j
|
||||
if first and second then
|
||||
output[i] = output[i]:gsub( first, ("%s and %s"):format( first, second ) )
|
||||
|
||||
@@ -131,7 +131,7 @@ local ALEXA_DOMAINS = {
|
||||
-- Construct the default list of domains.
|
||||
for _, domain in ipairs(ALEXA_DOMAINS) do
|
||||
DOMAINS[#DOMAINS + 1] = domain
|
||||
if not string.match(domain, "^www\.") then
|
||||
if not string.match(domain, "^www%.") then
|
||||
DOMAINS[#DOMAINS + 1] = "www." .. domain
|
||||
end
|
||||
end
|
||||
|
||||
@@ -53,7 +53,7 @@ local function parseVersion( server_version )
|
||||
local hotfix = string.sub(server_version,8)
|
||||
server_version = major_version .. "." .. minor_version .. "." .. hotfix
|
||||
elseif( pfx == "CSS" ) then
|
||||
return server_version:match("%w+\/(.*)")
|
||||
return server_version:match("%w+/(.*)")
|
||||
end
|
||||
|
||||
return server_version
|
||||
@@ -78,7 +78,7 @@ action = function( host, port )
|
||||
helper:close()
|
||||
|
||||
-- Set port information
|
||||
if ( response.srvclass and response.srvclass:match("IDS\/") ) then
|
||||
if ( response.srvclass and response.srvclass:match("IDS/") ) then
|
||||
port.version.name = "drda"
|
||||
port.version.product = "IBM Informix Dynamic Server"
|
||||
port.version.name_confidence = 100
|
||||
|
||||
@@ -112,7 +112,7 @@ action = function( host, port )
|
||||
end
|
||||
|
||||
-- Parse daemon info
|
||||
if not string.match(data, "<\!DOCTYPE GANGLIA_XML") then
|
||||
if not string.match(data, "<!DOCTYPE GANGLIA_XML") then
|
||||
stdnse.print_debug(1, ("%s: %s:%s is not a Ganglia Daemon."):format(SCRIPT_NAME, host.targetname or host.ip, port.number))
|
||||
return
|
||||
elseif string.match(data, '<GANGLIA_XML VERSION="([^"]*)" SOURCE="gmond"') then
|
||||
|
||||
@@ -50,7 +50,7 @@ require 'stdnse'
|
||||
local AFFILIATE_PATTERNS = {
|
||||
["Google Analytics ID"] = "(?P<id>UA-[0-9]{6,9}-[0-9]{1,2})",
|
||||
["Google Adsense ID"] = "(?P<id>pub-[0-9]{16,16})",
|
||||
["Amazon Associates ID"] = "http://(www\.amazon\.com/[^\"']*[\\?&;]tag|rcm\.amazon\.com/[^\"']*[\\?&;]t)=(?P<id>\\w+-\\d+)",
|
||||
["Amazon Associates ID"] = "http://(www%.amazon%.com/[^\"']*[\\?&;]tag|rcm%.amazon%.com/[^\"']*[\\?&;]t)=(?P<id>\\w+-\\d+)",
|
||||
}
|
||||
|
||||
portrule = shortport.http
|
||||
|
||||
@@ -109,7 +109,7 @@ action = function(host, port)
|
||||
if data and data.status and tostring(data.status):match("200") and data.body and data.body ~= "" then
|
||||
|
||||
-- Check if the HTTP response contains a valid config file in MySQL database dump format
|
||||
if string.match(data.body, "DROP TABLE IF EXISTS config;") and string.match(data.body, "barracuda\.css") then
|
||||
if string.match(data.body, "DROP TABLE IF EXISTS config;") and string.match(data.body, "barracuda%.css") then
|
||||
config_file = data.body
|
||||
break
|
||||
end
|
||||
|
||||
@@ -160,7 +160,7 @@ end
|
||||
-- @param body the html content of the recieved page
|
||||
-- @return link to next page
|
||||
local function getPager( body )
|
||||
return body:match("<form.+action=\"(.+%?ReadForm)\&" )
|
||||
return body:match("<form.+action=\"(.+%?ReadForm)&" )
|
||||
end
|
||||
|
||||
--- Retrieves the username and passwords for a user
|
||||
@@ -253,7 +253,7 @@ action = function(host, port)
|
||||
pager = getPager( http_response.body )
|
||||
if ( not(pager) ) then
|
||||
if ( http_response.body and
|
||||
http_response.body:match(".*\<input type=\"submit\".* value=\"Sign In\"\>.*" ) ) then
|
||||
http_response.body:match(".*<input type=\"submit\".* value=\"Sign In\">.*" ) ) then
|
||||
return " \n ERROR: Failed to authenticate"
|
||||
else
|
||||
return " \n ERROR: Failed to process results"
|
||||
|
||||
@@ -99,7 +99,7 @@ action = function(host, port)
|
||||
|
||||
}
|
||||
for _, var in ipairs(vars) do
|
||||
local var_match = string.match(config_file, string.format('<%s><!.CDATA.(.+)..><\/%s>', var[2], var[2]))
|
||||
local var_match = string.match(config_file, string.format('<%s><!.CDATA.(.+)..></%s>', var[2], var[2]))
|
||||
if var_match then table.insert(result, string.format("%s: %s", var[1], var_match)) end
|
||||
end
|
||||
|
||||
|
||||
@@ -114,10 +114,10 @@ locale parameter]],
|
||||
end
|
||||
|
||||
local exploits = {
|
||||
['CFusionMX'] = '..\\..\\..\\..\\..\\..\\..\\..\\CFusionMX\\lib\\password.properties\%00en',
|
||||
['CFusionMX7'] = '..\\..\\..\\..\\..\\..\\..\\..\\CFusionMX7\\lib\\password.properties\%00en',
|
||||
['ColdFusion8'] = '..\\..\\..\\..\\..\\..\\..\\..\\ColdFusion8\\lib\\password.properties\%00en',
|
||||
['JRun4\\servers'] = '..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\JRun4\\servers\\cfusion\\cfusion-ear\\cfusion-war\\WEB-INF\\cfusion\\lib\\password.properties\%00en',
|
||||
['CFusionMX'] = '..\\..\\..\\..\\..\\..\\..\\..\\CFusionMX\\lib\\password.properties%00en',
|
||||
['CFusionMX7'] = '..\\..\\..\\..\\..\\..\\..\\..\\CFusionMX7\\lib\\password.properties%00en',
|
||||
['ColdFusion8'] = '..\\..\\..\\..\\..\\..\\..\\..\\ColdFusion8\\lib\\password.properties%00en',
|
||||
['JRun4\\servers'] = '..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\JRun4\\servers\\cfusion\\cfusion-ear\\cfusion-war\\WEB-INF\\cfusion\\lib\\password.properties%00en',
|
||||
}
|
||||
|
||||
local results = {}
|
||||
|
||||
@@ -79,8 +79,8 @@ local function createVerticalResults(db)
|
||||
table.insert(results, result_entries)
|
||||
table.sort(results,
|
||||
function(a,b)
|
||||
local a_port, a_proto = a.name:match("^(%d+)\/(%w*)")
|
||||
local b_port, b_proto = b.name:match("^(%d+)\/(%w*)")
|
||||
local a_port, a_proto = a.name:match("^(%d+)/(%w*)")
|
||||
local b_port, b_proto = b.name:match("^(%d+)/(%w*)")
|
||||
if ( a_proto == b_proto ) then
|
||||
return ( tonumber(a_port) ) < ( tonumber(b_port) )
|
||||
else
|
||||
@@ -116,8 +116,8 @@ local function createHorizontalResults(db)
|
||||
table.insert(results, str)
|
||||
table.sort(results,
|
||||
function(a,b)
|
||||
local a_port, a_proto = a:match("^(%d+)\/(%w*):")
|
||||
local b_port, b_proto = b:match("^(%d+)\/(%w*):")
|
||||
local a_port, a_proto = a:match("^(%d+)/(%w*):")
|
||||
local b_port, b_proto = b:match("^(%d+)/(%w*):")
|
||||
if ( a_proto == b_proto ) then
|
||||
return ( tonumber(a_port) ) < ( tonumber(b_port) )
|
||||
else
|
||||
|
||||
@@ -57,7 +57,7 @@ Driver = {
|
||||
|
||||
login = function(self, username, password)
|
||||
local cmd = "id"
|
||||
local data = ("\0%s\0%s\0\%s\0"):format(username, password, cmd)
|
||||
local data = ("\0%s\0%s\0%s\0"):format(username, password, cmd)
|
||||
|
||||
local status, err = self.socket:send(data)
|
||||
if ( not(status) ) then
|
||||
|
||||
@@ -63,7 +63,7 @@ action = function(host)
|
||||
|
||||
local result, username, domain = smb.get_account(host)
|
||||
if(result ~= false) then
|
||||
table.insert(response, string.format("Account that was used for smb scripts: %s\%s", domain, stdnse.string_or_blank(username, '<blank>')))
|
||||
table.insert(response, string.format("Account that was used for smb scripts: %s%s", domain, stdnse.string_or_blank(username, '<blank>')))
|
||||
end
|
||||
|
||||
-- User-level authentication or share-level authentication
|
||||
|
||||
@@ -113,7 +113,7 @@ function go(host, port)
|
||||
port.number)
|
||||
end
|
||||
|
||||
local srvname = string.match(response, "%d+%s([%w]+[%w\.\-]*)")
|
||||
local srvname = string.match(response, "%d+%s([%w]+[%w%.-]*)")
|
||||
|
||||
local status, response = smtp.ehlo(socket, domain)
|
||||
if not status then
|
||||
@@ -121,7 +121,7 @@ function go(host, port)
|
||||
end
|
||||
|
||||
if not srvname then
|
||||
srvname = string.match(response, "%d+%-([%w]+[%w\.\-]*)")
|
||||
srvname = string.match(response, "%d+%-([%w]+[%w%.-]*)")
|
||||
end
|
||||
|
||||
-- Antispam tests.
|
||||
|
||||
@@ -84,7 +84,7 @@ local function get_exim_banner(response)
|
||||
local banner, version
|
||||
banner = response:match("%d+%s(.+)")
|
||||
if banner then
|
||||
version = tonumber(banner:match("Exim%s([0-9\.]+)"))
|
||||
version = tonumber(banner:match("Exim%s([0-9%.]+)"))
|
||||
end
|
||||
return banner, version
|
||||
end
|
||||
|
||||
@@ -71,7 +71,7 @@ local function get_exim_banner(response)
|
||||
local banner, version
|
||||
banner = response:match("%d+%s(.+)")
|
||||
if banner and banner:match("Exim") then
|
||||
version = tonumber(banner:match("Exim%s([0-9\.]+)"))
|
||||
version = tonumber(banner:match("Exim%s([0-9%.]+)"))
|
||||
end
|
||||
return banner, version
|
||||
end
|
||||
|
||||
@@ -118,7 +118,7 @@ svn =
|
||||
return false, "error"
|
||||
end
|
||||
|
||||
challenge = msg:match("\<.+\>")
|
||||
challenge = msg:match("<.+>")
|
||||
|
||||
if ( not(challenge) ) then
|
||||
return false, "Failed to read challenge"
|
||||
|
||||
@@ -1361,8 +1361,8 @@ function script_init( )
|
||||
ob_netnum = {ob_start = "\r?\n?%s*[Ii]net6?num:%s*.-\r?\n",
|
||||
ob_end = "\r?\n%s*[Ss]ource:%s*.-\r?\n\r?\n",
|
||||
inetnum = "\r?\n%s*[Ii]net6?num:%s*(.-)\r?\n",
|
||||
netname = "\r?\n%s*[Nn]et[\-]-[Nn]ame:%s*(.-)\r?\n",
|
||||
nettype = "\r?\n%s*[Nn]et[\-]-[Tt]ype:%s*(.-)\r?\n",
|
||||
netname = "\r?\n%s*[Nn]et[-]-[Nn]ame:%s*(.-)\r?\n",
|
||||
nettype = "\r?\n%s*[Nn]et[-]-[Tt]ype:%s*(.-)\r?\n",
|
||||
descr = "[Dd]escr:[^\r?\n][%s]*(.-)\r?\n",
|
||||
country = "\r?\n%s*[Cc]ountry:%s*(.-)\r?\n",
|
||||
status = "\r?\n%s*[Ss]tatus:%s*(.-)\r?\n",
|
||||
@@ -1370,62 +1370,62 @@ function script_init( )
|
||||
ob_org = { ob_start = "\r?\n%s*[Oo]rgani[sz]ation:%s*.-\r?\n",
|
||||
ob_end = "\r?\n%s*[Ss]ource:%s*.-\r?\n\r?\n",
|
||||
organisation = "\r?\n%s*[Oo]rgani[sz]ation:%s*(.-)\r?\n",
|
||||
orgname = "\r?\n%s*[Oo]rg[\-]-[Nn]ame:%s*(.-)\r?\n",
|
||||
orgname = "\r?\n%s*[Oo]rg[-]-[Nn]ame:%s*(.-)\r?\n",
|
||||
descr = "[Dd]escr:[^\r?\n][%s]*(.-)\r?\n",
|
||||
email = "\r?\n%s*[Ee][\-]-[Mm]ail:%s*(.-)\r?\n"},
|
||||
email = "\r?\n%s*[Ee][-]-[Mm]ail:%s*(.-)\r?\n"},
|
||||
ob_role = { ob_start = "\r?\n%s*[Rr]ole:%s*.-\r?\n",
|
||||
ob_end = "\r?\n%s*[Ss]ource:%s*.-\r?\n\r?\n",
|
||||
role = "\r?\n%s*[Rr]ole:%s*(.-)\r?\n",
|
||||
email = "\r?\n%s*[Ee][\-]-[Mm]ail:%s*(.-)\r?\n"},
|
||||
email = "\r?\n%s*[Ee][-]-[Mm]ail:%s*(.-)\r?\n"},
|
||||
ob_persn = { ob_start = "\r?\n%s*[Pp]erson:%s*.-\r?\n",
|
||||
ob_end = "\r?\n%s*[Ss]ource:%s*.-\r?\n\r?\n",
|
||||
person = "\r?\n%s*[Pp]erson:%s*(.-)\r?\n",
|
||||
email = "\r?\n%s*[Ee][\-]-[Mm]ail:%s*(.-)\r?\n"} },
|
||||
email = "\r?\n%s*[Ee][-]-[Mm]ail:%s*(.-)\r?\n"} },
|
||||
arin = {
|
||||
ob_exist = "\r?\n%s*[Nn]et[\-]-[Rr]ange:.-\r?\n",
|
||||
ob_netnum = {ob_start = "\r?\n%s*[Nn]et[\-]-[Rr]ange:.-\r?\n",
|
||||
ob_exist = "\r?\n%s*[Nn]et[-]-[Rr]ange:.-\r?\n",
|
||||
ob_netnum = {ob_start = "\r?\n%s*[Nn]et[-]-[Rr]ange:.-\r?\n",
|
||||
ob_end = "\r?\n\r?\n",
|
||||
netrange = "\r?\n%s*[Nn]et[\-]-[Rr]ange:(.-)\r?\n",
|
||||
netname = "\r?\n%s*[Nn]et[\-]-[Nn]ame:(.-)\r?\n",
|
||||
nettype = "\r?\n%s*[Nn]et[\-]-[Tt]ype:(.-)\r?\n"},
|
||||
ob_org = {ob_start = "\r?\n%s*[Oo]rg[\-]-[Nn]ame:.-\r?\n",
|
||||
netrange = "\r?\n%s*[Nn]et[-]-[Rr]ange:(.-)\r?\n",
|
||||
netname = "\r?\n%s*[Nn]et[-]-[Nn]ame:(.-)\r?\n",
|
||||
nettype = "\r?\n%s*[Nn]et[-]-[Tt]ype:(.-)\r?\n"},
|
||||
ob_org = {ob_start = "\r?\n%s*[Oo]rg[-]-[Nn]ame:.-\r?\n",
|
||||
ob_end = "\r?\n\r?\n",
|
||||
orgname = "\r?\n%s*[Oo]rg[\-]-[Nn]ame:(.-)\r?\n",
|
||||
orgid = "\r?\n%s*[Oo]rg[\-]-[Ii][Dd]:(.-)\r?\n",
|
||||
stateprov = "\r?\n%s*[Ss]tate[\-]-[Pp]rov:(.-)\r?\n",
|
||||
orgname = "\r?\n%s*[Oo]rg[-]-[Nn]ame:(.-)\r?\n",
|
||||
orgid = "\r?\n%s*[Oo]rg[-]-[Ii][Dd]:(.-)\r?\n",
|
||||
stateprov = "\r?\n%s*[Ss]tate[-]-[Pp]rov:(.-)\r?\n",
|
||||
country = "\r?\n%s*[Cc]ountry:(.-)\r?\n"},
|
||||
ob_cust = {ob_start = "\r?\n%s*[Cc]ust[\-]-[Nn]ame:.-\r?\n",
|
||||
ob_cust = {ob_start = "\r?\n%s*[Cc]ust[-]-[Nn]ame:.-\r?\n",
|
||||
ob_end = "\r?\n\r?\n",
|
||||
custname = "\r?\n%s*[Cc]ust[\-]-[Nn]ame:(.-)\r?\n",
|
||||
stateprov = "\r?\n%s*[Ss]tate[\-]-[Pp]rov:(.-)\r?\n",
|
||||
custname = "\r?\n%s*[Cc]ust[-]-[Nn]ame:(.-)\r?\n",
|
||||
stateprov = "\r?\n%s*[Ss]tate[-]-[Pp]rov:(.-)\r?\n",
|
||||
country = "\r?\n%s*[Cc]ountry:(.-)\r?\n"},
|
||||
ob_persn = {ob_start = "\r?\n%s*[Oo]rg[\-]-[Tt]ech[\-]-[Nn]ame:.-\r?\n",
|
||||
ob_persn = {ob_start = "\r?\n%s*[Oo]rg[-]-[Tt]ech[-]-[Nn]ame:.-\r?\n",
|
||||
ob_end = "\r?\n\r?\n",
|
||||
orgtechname =
|
||||
"\r?\n%s*[Oo]rg[\-]-[Tt]ech[\-]-[Nn]ame:(.-)\r?\n",
|
||||
"\r?\n%s*[Oo]rg[-]-[Tt]ech[-]-[Nn]ame:(.-)\r?\n",
|
||||
orgtechemail =
|
||||
"\r?\n%s*[Oo]rg[\-]-[Tt]ech[\-]-[Ee][\-]-[Mm]ail:(.-)\r?\n"} },
|
||||
"\r?\n%s*[Oo]rg[-]-[Tt]ech[-]-[Ee][-]-[Mm]ail:(.-)\r?\n"} },
|
||||
lacnic = {
|
||||
ob_exist = "\r?\n%s*[Ii]net6?num:%s*.-\r?\n",
|
||||
ob_netnum = {ob_start = "\r?\n%s*[Ii]net6?num:%s*.-\r?\n",
|
||||
ob_end = "\r?\n\r?\n",
|
||||
inetnum = "\r?\n%s*[Ii]net6?num:%s*(.-)\r?\n",
|
||||
owner = "\r?\n%s*[Oo]wner:%s*(.-)\r?\n",
|
||||
ownerid = "\r?\n%s*[Oo]wner[\-]-[Ii][Dd]:%s*(.-)\r?\n",
|
||||
ownerid = "\r?\n%s*[Oo]wner[-]-[Ii][Dd]:%s*(.-)\r?\n",
|
||||
responsible = "\r?\n%s*[Rr]esponsible:%s*(.-)\r?\n",
|
||||
country = "\r?\n%s*[Cc]ountry:%s*(.-)\r?\n",
|
||||
source = "\r?\n%s*[Ss]ource:%s*(.-)\r?\n"},
|
||||
ob_persn = {ob_start = "\r?\n%s*[Pp]erson:%s*.-\r?\n",
|
||||
ob_end = "\r?\n\r?\n",
|
||||
person = "\r?\n%s*[Pp]erson:%s*(.-)\r?\n",
|
||||
email = "\r?\n%s*[Ee][\-]-[Mm]ail:%s*(.-)\r?\n"} },
|
||||
email = "\r?\n%s*[Ee][-]-[Mm]ail:%s*(.-)\r?\n"} },
|
||||
jpnic = {
|
||||
ob_exist = "\r?\n%s*[Nn]etwork%s-[Ii]nformation:%s*.-\r?\n",
|
||||
ob_netnum = {ob_start = "\[[Nn]etwork%s*[Nn]umber\]%s*.-\r?\n",
|
||||
ob_netnum = {ob_start = "[[Nn]etwork%s*[Nn]umber]%s*.-\r?\n",
|
||||
ob_end = "\r?\n\r?\n",
|
||||
inetnum = "\[[Nn]etwork%s*[Nn]umber\]%s*(.-)\r?\n",
|
||||
netname = "\[[Nn]etwork%s*[Nn]ame\]%s*(.-)\r?\n",
|
||||
orgname = "\[[Oo]rganization\]%s*(.-)\r?\n"} }
|
||||
inetnum = "[[Nn]etwork%s*[Nn]umber]%s*(.-)\r?\n",
|
||||
netname = "[[Nn]etwork%s*[Nn]ame]%s*(.-)\r?\n",
|
||||
orgname = "[[Oo]rganization]%s*(.-)\r?\n"} }
|
||||
}
|
||||
|
||||
---
|
||||
@@ -1578,7 +1578,7 @@ function script_init( )
|
||||
}
|
||||
|
||||
nmap.registry.whois.m_none = {
|
||||
"\n%s*([Nn]o match found for[%s\+]*$addr)",
|
||||
"\n%s*([Nn]o match found for[%s+]*$addr)",
|
||||
"\n%s*([Uu]nallocated resource:%s*$addr)",
|
||||
"\n%s*([Rr]eserved:%s*$addr)",
|
||||
"\n[^\n]*([Nn]ot%s[Aa]ssigned[^\n]*$addr)",
|
||||
@@ -1595,8 +1595,8 @@ function script_init( )
|
||||
{
|
||||
remote_resource = "http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.txt",
|
||||
local_resource = "ipv4-address-space",
|
||||
match_assignment = "^%s*([\.%d]+/%d+)",
|
||||
match_service = "whois\.(%w+)\.net"
|
||||
match_assignment = "^%s*([%.%d]+/%d+)",
|
||||
match_service = "whois%.(%w+)%.net"
|
||||
}
|
||||
}
|
||||
nmap.registry.whois.remote_assignments_files.ipv6 = {
|
||||
@@ -1610,7 +1610,7 @@ function script_init( )
|
||||
remote_resource = "http://www.iana.org/assignments/ipv6-unicast-address-assignments/ipv6-unicast-address-assignments.txt",
|
||||
local_resource = "ipv6-unicast-address-assignments",
|
||||
match_assignment = "^%s*([:%x]+/%d+)",
|
||||
match_service = "whois\.(%w+)\.net"
|
||||
match_service = "whois%.(%w+)%.net"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1773,7 +1773,7 @@ function get_local_assignments_data()
|
||||
-- update our file header with a new timestamp
|
||||
stdnse.print_debug( 1, "%s: %s is up-to-date.", SCRIPT_NAME, file )
|
||||
file_content = read_from_file( file )
|
||||
file_content[2] = file_content[2]:gsub("^<[\-\+]?%d+>(.*)$", "<" .. os.time() .. ">%1")
|
||||
file_content[2] = file_content[2]:gsub("^<[-+]?%d+>(.*)$", "<" .. os.time() .. ">%1")
|
||||
write_success, err = write_to_file( file, file_content )
|
||||
if err then
|
||||
stdnse.print_debug( 1, "%s: Error writing to %s: %s.", SCRIPT_NAME, file, err )
|
||||
@@ -1903,7 +1903,7 @@ function requires_updating( file )
|
||||
if not (
|
||||
mod:match( "%a%a%a,%s%d%d%s%a%a%a%s%d%d%d%d%s%d%d:%d%d:%d%d%s%u%u%u" )
|
||||
or
|
||||
mod:match( "%a*day,%d%d\-%a%a%a\-%d%d%s%d%d:%d%d:%d%d%s%u%u%u" )
|
||||
mod:match( "%a*day,%d%d-%a%a%a-%d%d%s%d%d:%d%d:%d%d%s%u%u%u" )
|
||||
or
|
||||
mod:match( "%a%a%a%s%a%a%a%s%d?%d%s%d%d:%d%d:%d%d%s%d%d%d%d" )
|
||||
) then
|
||||
@@ -2144,7 +2144,7 @@ end
|
||||
function get_period( period )
|
||||
|
||||
if type( period ) ~= string or ( period == "" ) then return nil end
|
||||
local quant, unit = period:match( "(\-?\+?%d*\.?%d*)([SsMmHhDd]?)" )
|
||||
local quant, unit = period:match( "(-?+?%d*%.?%d*)([SsMmHhDd]?)" )
|
||||
if not ( tonumber( quant ) ) then return nil end
|
||||
|
||||
if ( string.lower( unit ) == "m" ) then
|
||||
|
||||
@@ -323,7 +323,7 @@ local scan = function(host, port, server_name, tls, n)
|
||||
stdnse.print_debug("OK")
|
||||
--http://xmpp.org/extensions/xep-0198.html
|
||||
--sample: el-tramo.be
|
||||
local version = string.match(tag.attrs.xmlns, "^urn:xmpp:sm:(\.)")
|
||||
local version = string.match(tag.attrs.xmlns, "^urn:xmpp:sm:(%.)")
|
||||
table.insert(features_list[n], 'Stream management v' .. version)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user