Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
slsh /
[ HOME SHELL ]
Name
Size
Permission
Action
cmaps
[ DIR ]
drwxr-xr-x
help
[ DIR ]
drwxr-xr-x
rline
[ DIR ]
drwxr-xr-x
scripts
[ DIR ]
drwxr-xr-x
arrayfuns.sl
1.85
KB
-rw-r--r--
autoload.sl
460
B
-rw-r--r--
base64.sl
19
B
-rw-r--r--
chksum.sl
1.58
KB
-rw-r--r--
cmdopt.sl
7.58
KB
-rw-r--r--
csv.sl
16.35
KB
-rw-r--r--
fcntl.sl
35
B
-rw-r--r--
fork.sl
17
B
-rw-r--r--
fswalk.sl
2.36
KB
-rw-r--r--
glob.sl
2.42
KB
-rw-r--r--
histogram.sl
2.98
KB
-rw-r--r--
iconv.sl
35
B
-rw-r--r--
json.sl
5.97
KB
-rw-r--r--
listfuns.sl
3.04
KB
-rw-r--r--
onig.sl
17
B
-rw-r--r--
pcre.sl
1.21
KB
-rw-r--r--
png.sl
4.02
KB
-rw-r--r--
print.sl
7.61
KB
-rw-r--r--
process.sl
9.83
KB
-rw-r--r--
profile.sl
19.88
KB
-rw-r--r--
rand.sl
4.28
KB
-rw-r--r--
readascii.sl
5.24
KB
-rw-r--r--
require.sl
1.27
KB
-rw-r--r--
select.sl
37
B
-rw-r--r--
setfuns.sl
4.8
KB
-rw-r--r--
sldb.sl
2.11
KB
-rw-r--r--
sldbcore.sl
18.1
KB
-rw-r--r--
sldbsock.sl
7.43
KB
-rw-r--r--
slshhelp.sl
536
B
-rw-r--r--
slshrl.sl
9.23
KB
-rw-r--r--
slsmg.sl
35
B
-rw-r--r--
socket.sl
151
B
-rw-r--r--
stats.sl
15.07
KB
-rw-r--r--
stkcheck.sl
2.62
KB
-rw-r--r--
structfuns.sl
2.05
KB
-rw-r--r--
sysconf.sl
20
B
-rw-r--r--
termios.sl
39
B
-rw-r--r--
varray.sl
37
B
-rw-r--r--
zlib.sl
2.93
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : json.sl
% -*- mode: slang; mode: fold -*- import("json"); %{{{ Type Handlers for json_encode private variable Type_Map = Ref_Type[0]; private define add_type_handler () { variable func = (); loop (_NARGS-1) { variable type = (); variable idx = __class_id (type); variable n = length (Type_Map); if (idx >= n) { variable new_map = Ref_Type[idx+1]; new_map[[0:n-1]] = Type_Map; Type_Map = new_map; } Type_Map[idx] = func; } } private define get_encode_func (type) { try { variable func = Type_Map[__class_id (type)]; if (func == NULL) throw IndexError; return func; } catch IndexError: throw Json_Invalid_Json_Error, "$type does not represent a JSON data structure"$; } %}}} private define json_encode_string (indent, q, data) %{{{ { return _json_encode_string (data); } add_type_handler (String_Type, BString_Type, &json_encode_string); %}}} private define json_encode_boolean (indent, q, data) %{{{ { if (data == 1) return "true"B; if (data == 0) return "false"B; throw Json_Invalid_Json_Error, sprintf (`invalid boolean value '\%03o'; only '\000' and '\001' are allowed`, data); } add_type_handler (UChar_Type, &json_encode_boolean); %}}} private define json_encode_null (indent, q, data) %{{{ { return "null"B; } add_type_handler (Null_Type, &json_encode_null); %}}} private define json_encode_number (indent, q, data) %{{{ { return string (data); } add_type_handler ( Char_Type, % UChar_Type, Short_Type, UShort_Type, Int_Type, UInt_Type, Long_Type, ULong_Type, #ifexists LLong_Type LLong_Type, ULLong_Type, #endif Float_Type, Double_Type, &json_encode_number); %}}} private define json_encode_object (indent, q, object) %{{{ { variable json = "{"B; variable keys = get_struct_field_names (object); variable n_values = length (keys); if (n_values) { % pvs indent KEY nsep VAL vsep pvs indent KEY nsep VAL vsep % ... pvs indent KEY nsep VAL pvs variable new_indent = bstrcat (indent, q.indent); variable sep = bstrcat (q.vsep, q.post_vsep, new_indent); variable nsep = q.nsep; variable key = keys[0]; variable val = get_struct_field(object, key); variable type = typeof (val); variable func = get_encode_func (type); json = bstrcat (__tmp(json), q.post_vsep, new_indent, _json_encode_string (key), nsep, (@func)(new_indent, q, val)); variable i; _for i (1, n_values-1) { key = keys[i]; val = get_struct_field(object, key); variable next_type = typeof (val); if (next_type == String_Type) { json = bstrcat (__tmp(json), sep, _json_encode_string (key), nsep, _json_encode_string (val)); continue; } if (next_type != type) (type, func) = (next_type, get_encode_func (next_type)); json = bstrcat (__tmp(json), sep, _json_encode_string (key), nsep, (@func)(new_indent, q, val)); } json = bstrcat (__tmp(json), q.post_vsep); } return bstrcat (__tmp(json), indent, "}"); } add_type_handler (Struct_Type, &json_encode_object); %}}} private define json_encode_array (indent, q, array) %{{{ { variable json = "["B; variable n_values = length (array); if (n_values) { % pvs, new_indent, VALUE, vsep, pvs, new_indent, VALUE, vsep, pvs, ..., new_indent, VALUE, pvs variable new_indent = bstrcat (indent, q.indent); variable sep = bstrcat (q.vsep, q.post_vsep, new_indent); variable i = 0; variable a = array[i]; variable type = typeof (a); variable func = get_encode_func (type); json = bstrcat (__tmp(json), q.post_vsep, new_indent, (@func)(new_indent, q, a)); if ((typeof (array) == Array_Type) && not any (_isnull (array))) { if (type == String_Type) _for i (1, n_values-1) json = bstrcat (__tmp(json), sep, _json_encode_string (array[i])); else _for i (1, n_values-1) json = bstrcat (__tmp(json), sep, (@func)(new_indent, q, array[i])); } else _for i (1, n_values-1) { a = array[i]; variable next_type = typeof (a); if (next_type == String_Type) { json = bstrcat (__tmp(json), sep, _json_encode_string (a)); continue; } if (next_type != type) (type, func) = (next_type, get_encode_func (next_type)); json = bstrcat (__tmp(json), sep, (@func)(new_indent, q, a)); } json = bstrcat (__tmp(json), q.post_vsep); } return bstrcat (__tmp(json), indent, "]"); } add_type_handler (List_Type, Array_Type, &json_encode_array); %}}} private define default_handler (indent, q, data) %{{{ { if (0 < __is_numeric (data) < 3) return json_encode_number (data); if (is_struct_type (data)) return json_encode_object (data); variable type = _typeof (data); throw Json_Invalid_Json_Error, "$type does not represent a JSON data structure"$; } Type_Map[where (_isnull (Type_Map))] = &default_handler; %}}} % process_qualifiers %{{{ private define split_post_vsep (post_vsep) %{{{ { variable indent = ""; variable parts = strchop (post_vsep, '\n', 0); if (length (parts) > 1) { indent = parts[-1]; parts[-1] = ""; post_vsep = strjoin (parts, "\n"); } return (indent, post_vsep); } %}}} private define only_whitespace (s) { return ""B + str_delete_chars (s, "^ \t\n\r"); } private define process_qualifiers () { variable post_vsep = split_post_vsep (qualifier ("post_vsep", "")); variable indent = (); % other return value from split_post_vsep variable q = struct { pre_nsep = only_whitespace (qualifier ("pre_nsep", "")), post_nsep = only_whitespace (qualifier ("post_nsep", "")), pre_vsep = only_whitespace (qualifier ("pre_vsep", "")), post_vsep = only_whitespace (post_vsep), indent = only_whitespace (indent), }; return struct { nsep = q.pre_nsep + ":" + q.post_nsep, vsep = q.pre_vsep + ",", @q }; } %}}} define json_encode (data) { variable q = process_qualifiers (;; __qualifiers); variable func = get_encode_func (typeof (data)); variable json = (@func)(""B, q, data); return typecast (json, String_Type); }
Close