Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.217.105
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nmap /
nselib /
Delete
Unzip
Name
Size
Permission
Date
Action
data
[ DIR ]
drwxr-xr-x
2024-08-29 14:21
afp.lua
71.48
KB
-rw-r--r--
2023-01-13 02:40
ajp.lua
16.77
KB
-rw-r--r--
2023-01-13 02:40
amqp.lua
10.41
KB
-rw-r--r--
2023-01-13 02:40
anyconnect.lua
4.31
KB
-rw-r--r--
2023-01-13 02:40
asn1.lua
14.57
KB
-rw-r--r--
2023-01-13 02:40
base32.lua
7.36
KB
-rw-r--r--
2023-01-13 02:40
base64.lua
5.83
KB
-rw-r--r--
2023-01-13 02:40
bin.lua
12.99
KB
-rw-r--r--
2023-01-13 02:40
bitcoin.lua
18.25
KB
-rw-r--r--
2023-01-13 02:40
bits.lua
2.54
KB
-rw-r--r--
2023-01-13 02:40
bittorrent.lua
35.76
KB
-rw-r--r--
2023-01-13 02:40
bjnp.lua
9.55
KB
-rw-r--r--
2023-01-13 02:40
brute.lua
50.64
KB
-rw-r--r--
2023-01-13 02:40
cassandra.lua
5.48
KB
-rw-r--r--
2023-01-13 02:40
citrixxml.lua
16
KB
-rw-r--r--
2023-01-13 02:40
coap.lua
75.1
KB
-rw-r--r--
2023-01-13 02:40
comm.lua
11.03
KB
-rw-r--r--
2023-01-13 02:40
creds.lua
18.26
KB
-rw-r--r--
2023-01-13 02:40
cvs.lua
3.05
KB
-rw-r--r--
2023-01-13 02:40
datafiles.lua
11.05
KB
-rw-r--r--
2023-01-13 02:40
datetime.lua
7.5
KB
-rw-r--r--
2023-01-13 02:40
dhcp.lua
28.57
KB
-rw-r--r--
2023-01-13 02:40
dhcp6.lua
19.86
KB
-rw-r--r--
2023-01-13 02:40
dns.lua
51.07
KB
-rw-r--r--
2023-01-13 02:40
dnsbl.lua
19.01
KB
-rw-r--r--
2023-01-13 02:40
dnssd.lua
12.61
KB
-rw-r--r--
2023-01-13 02:40
drda.lua
24.08
KB
-rw-r--r--
2023-01-13 02:40
eap.lua
7.54
KB
-rw-r--r--
2023-01-13 02:40
eigrp.lua
12.98
KB
-rw-r--r--
2023-01-13 02:40
formulas.lua
5.68
KB
-rw-r--r--
2023-01-13 02:40
ftp.lua
9.03
KB
-rw-r--r--
2023-01-13 02:40
geoip.lua
1.71
KB
-rw-r--r--
2023-01-13 02:40
giop.lua
18.42
KB
-rw-r--r--
2023-01-13 02:40
gps.lua
3.38
KB
-rw-r--r--
2023-01-13 02:40
http.lua
117.07
KB
-rw-r--r--
2023-01-13 02:40
httpspider.lua
36.65
KB
-rw-r--r--
2023-01-13 02:40
iax2.lua
9.58
KB
-rw-r--r--
2023-01-13 02:40
idna.lua
17.14
KB
-rw-r--r--
2023-01-13 02:40
ike.lua
14.63
KB
-rw-r--r--
2023-01-13 02:40
imap.lua
9.59
KB
-rw-r--r--
2023-01-13 02:40
informix.lua
39.93
KB
-rw-r--r--
2023-01-13 02:40
ipOps.lua
29.06
KB
-rw-r--r--
2023-01-13 02:40
ipmi.lua
8.08
KB
-rw-r--r--
2023-01-13 02:40
ipp.lua
12.57
KB
-rw-r--r--
2023-01-13 02:40
irc.lua
757
B
-rw-r--r--
2023-01-13 02:40
iscsi.lua
21.38
KB
-rw-r--r--
2023-01-13 02:40
isns.lua
14.98
KB
-rw-r--r--
2023-01-13 02:40
jdwp.lua
43.52
KB
-rw-r--r--
2023-01-13 02:40
json.lua
11.62
KB
-rw-r--r--
2023-01-13 02:40
knx.lua
2.42
KB
-rw-r--r--
2023-01-13 02:40
ldap.lua
31.94
KB
-rw-r--r--
2023-01-13 02:40
lfs.luadoc
1.68
KB
-rw-r--r--
2023-01-13 02:40
libssh2-utility.lua
4.69
KB
-rw-r--r--
2023-01-13 02:40
libssh2.luadoc
4.75
KB
-rw-r--r--
2023-01-13 02:40
listop.lua
4.66
KB
-rw-r--r--
2023-01-13 02:40
lpeg-utility.lua
5.64
KB
-rw-r--r--
2023-01-13 02:40
lpeg.luadoc
351
B
-rw-r--r--
2023-01-13 02:40
ls.lua
10.96
KB
-rw-r--r--
2023-01-13 02:40
match.lua
2.05
KB
-rw-r--r--
2023-01-13 02:40
membase.lua
9.93
KB
-rw-r--r--
2023-01-13 02:40
mobileme.lua
8.46
KB
-rw-r--r--
2023-01-13 02:40
mongodb.lua
21.3
KB
-rw-r--r--
2023-01-13 02:40
mqtt.lua
28.86
KB
-rw-r--r--
2023-01-13 02:40
msrpc.lua
190.07
KB
-rw-r--r--
2023-01-13 02:40
msrpcperformance.lua
29.65
KB
-rw-r--r--
2023-01-13 02:40
msrpctypes.lua
168.52
KB
-rw-r--r--
2023-01-13 02:40
mssql.lua
109.43
KB
-rw-r--r--
2023-01-13 02:40
multicast.lua
5.97
KB
-rw-r--r--
2023-01-13 02:40
mysql.lua
16.03
KB
-rw-r--r--
2023-01-13 02:40
natpmp.lua
5.11
KB
-rw-r--r--
2023-01-13 02:40
nbd.lua
16.04
KB
-rw-r--r--
2023-01-13 02:40
ncp.lua
35.64
KB
-rw-r--r--
2023-01-13 02:40
ndmp.lua
11.43
KB
-rw-r--r--
2023-01-13 02:40
netbios.lua
14.44
KB
-rw-r--r--
2023-01-13 02:40
nmap.luadoc
40.34
KB
-rw-r--r--
2023-01-13 02:40
nrpc.lua
4.46
KB
-rw-r--r--
2023-01-13 02:40
nsedebug.lua
3.49
KB
-rw-r--r--
2023-01-13 02:40
omp2.lua
4.78
KB
-rw-r--r--
2023-01-13 02:40
oops.lua
3.61
KB
-rw-r--r--
2023-01-13 02:40
openssl.luadoc
7.5
KB
-rw-r--r--
2023-01-13 02:40
ospf.lua
15.29
KB
-rw-r--r--
2023-01-13 02:40
packet.lua
36.18
KB
-rw-r--r--
2023-01-13 02:40
pcre.luadoc
6.79
KB
-rw-r--r--
2023-01-13 02:40
pgsql.lua
20.6
KB
-rw-r--r--
2023-01-13 02:40
pop3.lua
5.74
KB
-rw-r--r--
2023-01-13 02:40
pppoe.lua
29.42
KB
-rw-r--r--
2023-01-13 02:40
proxy.lua
11.37
KB
-rw-r--r--
2023-01-13 02:40
punycode.lua
11.5
KB
-rw-r--r--
2023-01-13 02:40
rand.lua
2.7
KB
-rw-r--r--
2023-01-13 02:40
rdp.lua
14.73
KB
-rw-r--r--
2023-01-13 02:40
re.lua
8.22
KB
-rw-r--r--
2023-01-13 02:40
redis.lua
3.61
KB
-rw-r--r--
2023-01-13 02:40
rmi.lua
47.77
KB
-rw-r--r--
2023-01-13 02:40
rpc.lua
107.64
KB
-rw-r--r--
2023-01-13 02:40
rpcap.lua
11.08
KB
-rw-r--r--
2023-01-13 02:40
rsync.lua
5.22
KB
-rw-r--r--
2023-01-13 02:40
rtsp.lua
8.62
KB
-rw-r--r--
2023-01-13 02:40
sasl.lua
16.51
KB
-rw-r--r--
2023-01-13 02:40
shortport.lua
11.99
KB
-rw-r--r--
2023-01-13 02:40
sip.lua
30.07
KB
-rw-r--r--
2023-01-13 02:40
slaxml.lua
17.9
KB
-rw-r--r--
2023-01-13 02:40
smb.lua
173.22
KB
-rw-r--r--
2023-01-13 02:40
smb2.lua
15.34
KB
-rw-r--r--
2023-01-13 02:40
smbauth.lua
37.33
KB
-rw-r--r--
2023-01-13 02:40
smtp.lua
19.85
KB
-rw-r--r--
2023-01-13 02:40
snmp.lua
16
KB
-rw-r--r--
2023-01-13 02:40
socks.lua
8.25
KB
-rw-r--r--
2023-01-13 02:40
srvloc.lua
10.99
KB
-rw-r--r--
2023-01-13 02:40
ssh1.lua
9.15
KB
-rw-r--r--
2023-01-13 02:40
ssh2.lua
11.73
KB
-rw-r--r--
2023-01-13 02:40
sslcert.lua
33.35
KB
-rw-r--r--
2023-01-13 02:40
sslv2.lua
9.68
KB
-rw-r--r--
2023-01-13 02:40
stdnse.lua
32.64
KB
-rw-r--r--
2023-01-13 02:40
strbuf.lua
4.52
KB
-rw-r--r--
2023-01-13 02:40
strict.lua
2.53
KB
-rw-r--r--
2023-01-13 02:40
stringaux.lua
4.32
KB
-rw-r--r--
2023-01-13 02:40
stun.lua
11.08
KB
-rw-r--r--
2023-01-13 02:40
tab.lua
3.35
KB
-rw-r--r--
2023-01-13 02:40
tableaux.lua
2.06
KB
-rw-r--r--
2023-01-13 02:40
target.lua
3.93
KB
-rw-r--r--
2023-01-13 02:40
tftp.lua
9.41
KB
-rw-r--r--
2023-01-13 02:40
tls.lua
58.05
KB
-rw-r--r--
2023-01-13 02:40
tn3270.lua
46.99
KB
-rw-r--r--
2023-01-13 02:40
tns.lua
64.16
KB
-rw-r--r--
2023-01-13 02:40
unicode.lua
14.23
KB
-rw-r--r--
2023-01-13 02:40
unittest.lua
12.41
KB
-rw-r--r--
2023-01-13 02:40
unpwdb.lua
10.42
KB
-rw-r--r--
2023-01-13 02:40
upnp.lua
11.18
KB
-rw-r--r--
2023-01-13 02:40
url.lua
16.7
KB
-rw-r--r--
2023-01-13 02:40
versant.lua
8.58
KB
-rw-r--r--
2023-01-13 02:40
vnc.lua
25.54
KB
-rw-r--r--
2023-01-13 02:40
vulns.lua
76.45
KB
-rw-r--r--
2023-01-13 02:40
vuzedht.lua
16.21
KB
-rw-r--r--
2023-01-13 02:40
wsdd.lua
11.98
KB
-rw-r--r--
2023-01-13 02:40
xdmcp.lua
12.09
KB
-rw-r--r--
2023-01-13 02:40
xmpp.lua
15.91
KB
-rw-r--r--
2023-01-13 02:40
zlib.luadoc
4.88
KB
-rw-r--r--
2023-01-13 02:40
Save
Rename
--- -- Library methods for handling JSON data. It handles JSON encoding and -- decoding according to RFC 4627. -- -- There is a straightforward mapping between JSON and Lua data types. One -- exception is JSON <code>NULL</code>, which is not the same as Lua -- <code>nil</code>. (A better match for Lua <code>nil</code> is JavaScript -- <code>undefined</code>.) <code>NULL</code> values in JSON are represented by -- the special value <code>json.NULL</code>. -- -- @author Martin Holst Swende -- @author David Fifield -- @author Patrick Donnelly -- @copyright Same as Nmap--See https://nmap.org/book/man-legal.html -- Version 0.4 -- Created 01/25/2010 - v0.1 - created by Martin Holst Swende <martin@swende.se> -- Heavily modified 02/22/2010 - v0.3. Rewrote the parser into an OO-form, to not have to handle -- all kinds of state with parameters and return values. -- Modified 02/27/2010 - v0.4 Added unicode handling (written by David Fifield). Renamed toJson -- and fromJson into generate() and parse(), implemented more proper numeric parsing and added some more error checking. local stdnse = require "stdnse" local string = require "string" local table = require "table" local unicode = require "unicode" local unittest = require "unittest" _ENV = stdnse.module("json", stdnse.seeall) local lpeg = require "lpeg"; local locale = lpeg.locale; local P = lpeg.P; local R = lpeg.R; local S = lpeg.S; local V = lpeg.V; local C = lpeg.C; local Cb = lpeg.Cb; local Cc = lpeg.Cc; local Cf = lpeg.Cf; local Cg = lpeg.Cg; local Cp = lpeg.Cp; local Cs = lpeg.Cs; local Ct = lpeg.Ct; local Cmt = lpeg.Cmt; -- case sensitive keyword local function K (a) return P(a) * -(locale().alnum + "_"); end local NULL = {}; _M.NULL = NULL; --- Makes a table be treated as a JSON Array when generating JSON -- -- A table treated as an Array has all non-number indices ignored. -- @param t a table to be treated as an array function make_array(t) local mt = getmetatable(t) or {} mt["json"] = "array" setmetatable(t, mt) return t end --- Makes a table be treated as a JSON Object when generating JSON -- -- @param t a table to be treated as an object function make_object(t) local mt = getmetatable(t) or {} mt["json"] = "object" setmetatable(t, mt) return t end -- Decode a Unicode escape, assuming that self.pos starts just after the -- initial \u. May consume an additional escape in the case of a UTF-16 -- surrogate pair. See RFC 2781 for UTF-16. local unicode_esc = P [[\u]] * C(locale().xdigit * locale().xdigit * locale().xdigit * locale().xdigit); local function unicode16 (subject, position, hex) local cp = assert(tonumber(hex, 16)); if cp < 0xD800 or cp > 0xDFFF then return position, unicode.utf8_enc(cp); elseif cp >= 0xDC00 and cp <= 0xDFFF then error(("Not a Unicode character: U+%04X"):format(cp)); end -- Beginning of a UTF-16 surrogate. local lowhex = unicode_esc:match(subject, position); if not lowhex then error(("Bad unicode escape \\u%s (missing low surrogate)"):format(hex)) else local cp2 = assert(tonumber(lowhex, 16)); if not (cp2 >= 0xDC00 and cp2 <= 0xDFFF) then error(("Bad unicode escape \\u%s\\u%s (bad low surrogate)"):format(hex, lowhex)) end position = position+6 -- consume '\uXXXX' cp = 0x10000 + (cp & 0x3FF) * 0x400 + (cp2 & 0x3FF) return position, unicode.utf8_enc(cp); end end -- call lpeg.locale on the grammar to add V "space" local json = locale { V "json"; json = V "space"^0 * V "value" * V "space"^0 * P(-1); -- FIXME should be 'V "object" + V "array"' instead of 'V "value"' ? value = V "string" + V "number" + V "object" + V "array" + K "true" * Cc(true)+ K "false" * Cc(false)+ K "null" * Cc(NULL); object = Cf(Ct "" * P "{" * V "space"^0 * (V "members")^-1 * V "space"^0 * P "}", rawset) / make_object; members = V "pair" * (V "space"^0 * P "," * V "space"^0 * V "pair")^0; pair = Cg(V "string" * V "space"^0 * P ":" * V "space"^0 * V "value"); array = Ct(P "[" * V "space"^0 * (V "elements")^-1 * V "space"^0 * P "]") / make_array; elements = V "value" * V "space"^0 * (P "," * V "space"^0 * V "value")^0; string = Ct(P [["]] * (V "char")^0 * P [["]]) / table.concat; char = P [[\"]] * Cc [["]] + P [[\\]] * Cc [[\]] + P [[\b]] * Cc "\b" + P [[\f]] * Cc "\f" + P [[\n]] * Cc "\n" + P [[\r]] * Cc "\r" + P [[\t]] * Cc "\t" + P [[\u]] * Cmt(C(V "xdigit" * V "xdigit" * V "xdigit" * V "xdigit"), unicode16) + P [[\]] * C(1) + (C(1) - P [["]]); number = C((P "-")^-1 * V "space"^0 * (V "hexadecimal" + V "floating" + V "integer")) / function (a) return assert(tonumber(a)) end; hexadecimal = P "0x" * V "xdigit"^1; floating = (V "digit"^1 * P "." * V "digit"^0 + V "digit"^0 * P "." * V "digit"^1) * (V "exponent")^-1; integer = V "digit"^1 * (V "exponent")^-1; exponent = S "eE" * (S "-+")^-1 * V "digit"^1; }; json = P(json); -- compile the grammar --- Parses JSON data into a Lua object. -- -- This is the method you probably want to use if you use this library from a -- script. --@param data a json string --@return status true if ok, false if bad --@return an object representing the json, or error message function parse (data) local status, object = pcall(json.match, json, data); if not status then return false, object; elseif object then return true, object; else return false, "syntax error"; end end --Some local shortcuts local function dbg(str,...) stdnse.debug1("Json:"..str, ...) end -- See section 2.5 for escapes. -- For convenience, ESCAPE_TABLE maps to escape sequences complete with -- backslash, and REVERSE_ESCAPE_TABLE maps from single escape characters -- (no backslash). local ESCAPE_TABLE = {} local REVERSE_ESCAPE_TABLE = {} do local escapes = { ["\x22"] = "\"", ["\x5C"] = "\\", ["\x2F"] = "/", ["\x08"] = "b", ["\x0C"] = "f", ["\x0A"] = "n", ["\x0D"] = "r", ["\x09"] = "t", } for k, v in pairs(escapes) do ESCAPE_TABLE[k] = "\\" .. v REVERSE_ESCAPE_TABLE[v] = k end end -- Escapes a string --@param str the string --@return a string where the special chars have been escaped local function escape(str) return "\"" .. string.gsub(str, ".", ESCAPE_TABLE) .. "\"" end --- Checks what JSON type a variable will be treated as when generating JSON -- @param var a variable to inspect -- @return a string containing the JSON type. Valid values are "array", -- "object", "number", "string", "boolean", and "null" function typeof(var) local t = type(var) if var == NULL then return "null" elseif t == "table" then local mtval = rawget(getmetatable(var) or {}, "json") if mtval == "array" or (mtval ~= "object" and #var > 0) then return "array" else return "object" end else return t end error("Unknown data type in typeof") end --- Creates json data from an object --@param obj a table containing data --@return a string containing valid json function generate(obj) -- NULL-check must be performed before -- checking type == table, since the NULL-object -- is a table if obj == NULL then return "null" elseif obj == false then return "false" elseif obj == true then return "true" elseif type(obj) == "number" then return tostring(obj) elseif type(obj) == "string" then return escape(obj) elseif type(obj) == "table" then local k, v, elems, jtype elems = {} jtype = typeof(obj) if jtype == "array" then for _, v in ipairs(obj) do elems[#elems + 1] = generate(v) end return "[" .. table.concat(elems, ", ") .. "]" elseif jtype == "object" then for k, v in pairs(obj) do elems[#elems + 1] = escape(k) .. ": " .. generate(v) end return "{" .. table.concat(elems, ", ") .. "}" end end error("Unknown data type in generate") end if not unittest.testing() then return _ENV end ---------------------------------------------------------------------------------- -- Test-code for debugging purposes below ---------------------------------------------------------------------------------- local TESTS = { { '{"a":1}', generates = '{"a": 1}', is = "object", test = function(o) return o["a"] == 1 end }, { '{"a":true}', generates = '{"a": true}', is = "object", test = function(o) return o["a"] == true end }, { '{"a": false}', generates = '{"a": false}', is = "object", test = function(o) return o["a"] == false end }, { '{"a": null \r\n, \t "b" \f:"ehlo"}', is = "object", test = function(o) return o["a"] == NULL end }, { '{"a\\"a":"a\\"b\\"c\\"d"}', generates = '{"a\\"a": "a\\"b\\"c\\"d"}', is = "object", test = function(o) return o['a"a'] == 'a"b"c"d' end }, { '{"foo":"gaz\\"onk", "pi":3.14159,"hello":{ "wo":"rl\\td"}}', is = "object", test = function(o) return ( o["foo"] == 'gaz"onk' and o["pi"] == 3.14159 and o["hello"]["wo"] == "rl\td" ) end }, { '{"a":1, "b":2}', is = "object", test = function(o) local j = generate(o) return ( -- order is random j == '{"a": 1, "b": 2}' or j == '{"b": 2, "a": 1}' ) end }, { '[1,2,3,4,5,null,false,true,"\195\164\195\165\195\182\195\177","bar"]', generates = '[1, 2, 3, 4, 5, null, false, true, "\195\164\195\165\195\182\195\177", "bar"]', is = "array", test = function(o) return #o == 10 end }, { '[]', generates = '[]', is = "array", test = function(o) return not next(o) end }, { '{}', generates = '{}', is = "object", test = function(o) return not next(o) end }, {'', valid=false}, {'null', valid=false}, -- error {'"abc"', valid=false}, -- error {'{a":1}', valid=false}, -- error {'{"a" bad :1}', valid=false}, -- error { '["a\\\\t"]', generates = '["a\\\\t"]', is = "array", test = function(o) return o[1] == "a\\t" end }, -- Should become Lua {"a\\t"} {'[0.0.0]', valid=false}, -- error { '[-1]', generates = '[-1]', is = "array", }, { '[-1.123e-2]', generates = '[-0.01123]', is = "array", }, { '[5e3]', generates = '[5000]', is = "array", }, { '[5e+3]', generates = '[5000]', is = "array", }, { '[5E-3]', generates = '[0.005]', is = "array", }, { '[5.5e3]', generates = '[5500]', is = "array", }, { '["a\\\\"]', generates = '["a\\\\"]', is = "array", }, -- Should become Lua {"a\\"} { ' {"a}": 1} ', generates = '{"a}": 1}', is = "object", test = function(o) return o["a}"] == 1 end }, -- Should become Lua {"a}" = 1} {'["key": "value"]', valid=false}, -- error { '["\\u0041"]', generates = '["A"]', is = "array", }, -- Should become Lua {"A"} {'["\\uD800"]', valid=false}, -- error { '["\\uD834\\uDD1EX"]', generates = '["\240\157\132\158X"]', is = "array", }, -- Should become Lua {"\240\157\132\158X"} } test_suite = unittest.TestSuite:new() local equal = unittest.equal local is_false = unittest.is_false local is_true = unittest.is_true for _, test in ipairs(TESTS) do local status, val = parse(test[1]) if test.valid == false then test_suite:add_test(is_false(status), "Syntax error status is false") test_suite:add_test(equal(val, "syntax error"), "Syntax error") break end if test.generates then test_suite:add_test(equal(generate(val), test.generates), "Generate") end if test.is then test_suite:add_test(equal(typeof(val), test.is), "JSON type") end if test.test then test_suite:add_test(is_true(test.test(val)), "Extra test") end end return _ENV;