local gg = gg local os = os local io = io local math = math local table = table local string = string local function Class(base) local _ctor local c = { } if type(base) == 'function' then _ctor = base base = nil end c.__index = c local mt = { } mt.__call = function (class_tbl, ... ) local obj = { } setmetatable(obj, c) if c._ctor then c._ctor(obj, ... ) end return obj end c._ctor = _ctor setmetatable(c, mt) return c end local FuncState = Class( function (this) this.f = nil this.prev = nil this.ls = nil this.bl = nil this.firstlocal = 0 this.nlocvars = 0 this.nactvar = 0 this.nups = 0 function this.removevars(tolevel) this.ls.dyd.n_actvar = this.ls.dyd.n_actvar - (this.nactvar - tolevel) while (this.nactvar > tolevel) do this.nactvar = this.nactvar - 1 end end function this.searchupvalue(name) local up = this.f.upvalues for i = 0, this.nups - 1 do if up[i] == name then return i end end return -1 end function this.newupvalue(name) this.f.upvalues[this.nups] = name this.nups = this.nups + 1 end function this.searchvar(n) for i = this.nactvar - 1, 0, -1 do if n == this.f.locvars[this.ls.dyd.actvar[this.firstlocal + i]] then return i end end return -1 end function this.markupval(level) local bl = this.bl while (bl.nactvar > level) do bl = bl.previous end end function this.singlevaraux(fs, n, base) if fs == nil then return 0 end local v = fs.searchvar(n) if (v >= 0) then if (base == 0) then fs.markupval(v) end return 7 else local idx = fs.searchupvalue(n) if (idx < 0) then if (this.singlevaraux(fs.prev, n, 0) == 0) then fs.newupvalue(n) end end if fs.prev == nil then return 0 else return this.singlevaraux(fs.prev, n, base) end end end function this.enterblock(bl) bl.nactvar = this.nactvar bl.previous = this.bl this.bl = bl end function this.leaveblock() local bl = this.bl this.bl = bl.previous this.removevars(bl.nactvar) end end) local LexState = Class( function (this) this.tokennum = 0 this.alltoken = { } this.current = -1 this.t = {seminfo = { } } this.lookaheadx = {seminfo = { } } this.fs = nil this.buff = { } this.nbuff = 0 this.dyd = {n_actvar = 0} this.comment = false this.luaX_tokens = { [0] = "and", "break", "do", "else", "elseif", "end", "false", "for", "function", "goto", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while", "//", "..", "...", "==", ">=", "<=", "~=", "<<", ">>", "::", "", "", "", "", "", "", "+=", "-=", "*=", "/=", "%=", "^=", "//=", "&=", "|=", "..=", "<<=", ">>=", "->" } this.RESER = { ["and"] = 257, ["break"] = 258, ["do"] = 259, ["else"] = 260, ["elseif"] = 261, ["end"] = 262, ["false"] = 263, ["for"] = 264, ["function"] = 265, ["goto"] = 266, ["if"] = 267, ["in"] = 268, ["local"] = 269, ["nil"] = 270, ["not"] = 271, ["or"] = 272, ["repeat"] = 273, ["return"] = 274, ["then"] = 275, ["true"] = 276, ["until"] = 277, ["while"] = 278 } this.isalnum = { [100] = true, [101] = true, [102] = true, [103] = true, [104] = true, [105] = true, [106] = true, [107] = true, [108] = true, [109] = true, [110] = true, [111] = true, [112] = true, [113] = true, [114] = true, [115] = true, [116] = true, [117] = true, [118] = true, [119] = true, [120] = true, [121] = true, [122] = true, [36] = true, [48] = true, [49] = true, [50] = true, [51] = true, [52] = true, [53] = true, [54] = true, [55] = true, [56] = true, [57] = true, [65] = true, [66] = true, [67] = true, [68] = true, [69] = true, [70] = true, [71] = true, [72] = true, [73] = true, [74] = true, [75] = true, [76] = true, [77] = true, [78] = true, [79] = true, [80] = true, [81] = true, [82] = true, [83] = true, [84] = true, [85] = true, [86] = true, [87] = true, [88] = true, [89] = true, [90] = true, [95] = true, [97] = true, [98] = true, [99] = true, } this.isalpha = { [100] = true, [101] = true, [102] = true, [103] = true, [104] = true, [105] = true, [106] = true, [107] = true, [108] = true, [109] = true, [110] = true, [111] = true, [112] = true, [113] = true, [114] = true, [115] = true, [116] = true, [117] = true, [118] = true, [119] = true, [120] = true, [121] = true, [122] = true, [36] = true, [65] = true, [66] = true, [67] = true, [68] = true, [69] = true, [70] = true, [71] = true, [72] = true, [73] = true, [74] = true, [75] = true, [76] = true, [77] = true, [78] = true, [79] = true, [80] = true, [81] = true, [82] = true, [83] = true, [84] = true, [85] = true, [86] = true, [87] = true, [88] = true, [89] = true, [90] = true, [97] = true, [98] = true, [99] = true, } this.isdigit = { [48] = true, [49] = true, [50] = true, [51] = true, [52] = true, [53] = true, [54] = true, [55] = true, [56] = true, [57] = true, } this.isxdigit = { [100] = true, [101] = true, [102] = true, [48] = true, [49] = true, [50] = true, [51] = true, [52] = true, [53] = true, [54] = true, [55] = true, [56] = true, [57] = true, [65] = true, [66] = true, [67] = true, [68] = true, [69] = true, [70] = true, [97] = true, [98] = true, [99] = true, } this.isnum = { [48] = true, [49] = true, [50] = true, [51] = true, [52] = true, [53] = true, [54] = true, [55] = true, [56] = true, [57] = true } function this.save_and_next() this.buff[this.nbuff] = this.current this.nbuff = this.nbuff + 1 this.current = this.z.read() end function this.token2str(token) if (token < 257) then return (token < 32 and "char(" .. (token) .. ")") or string.char(token) else return this.luaX_tokens[token - 257] end end function this.txtToken(token) if token == 291 or token == 293 or token == 290 then return this.z.source:sub(this.z.pos - this.nbuff, this.z.pos - 1) elseif token == 292 then return this.t.seminfo.ts elseif token < 257 then return (token < 32 or token == 255) and "char(" .. token .. ")" or string.char(token) else return this.luaX_tokens[token - 257] end end function this.setinput(stream) this.lookaheadx.token = 289 this.z = { source = stream, z = {string.byte(stream, 1, #stream) }, pos = 0, read = function () this.z.pos = this.z.pos + 1 return this.z.z[this.z.pos] or -1 end } this.fs = nil this.nbuff = 0 this.current = this.z.read() if (this.current == 35) then while (( not (this.current == 10 or this.current == 13)) and this.current ~= -1) do this.current = this.z.read() end end end function this.check_next(c) if this.current ~= c then return false end this.save_and_next() return true end function this.read_numeral(seminfo) local expo = {[69] = true, [101] = true } local first = this.current this.current = this.z.read() if first == 48 and (this.current == 120 or this.current == 88) then this.nbuff = this.nbuff + 1 this.current = this.z.read() expo = {[80] = true, [112] = true } end local startn = this.z.pos while ( true ) do if (expo[this.current]) then this.current = this.z.read() if this.current == 43 or this.current == 45 then this.current = this.z.read() end end if (this.isxdigit[this.current] or this.current == 46) then this.current = this.z.read() else break end end this.nbuff = this.nbuff + this.z.pos - startn + 1 end function this.skip_sep() local count = 0 local s = this.current this.current = this.z.read() while (this.current == 61) do this.current = this.z.read() count = count + 1 end this.nbuff = this.nbuff + count + 1 return (this.current == s) and count or ( -count) - 1 end function this.read_long_string(seminfo, sep) local cont = 0 this.nbuff = this.nbuff + 1 this.current = this.z.read() if (this.current == 10 or this.current == 13) then local old = this.current this.current = this.z.read() this.nbuff = this.nbuff + 1 if ((this.current == 10 or this.current == 13) and this.current ~= old) then this.current = this.z.read() this.nbuff = this.nbuff + 1 end end local endloop = false while ( not endloop) do if this.current == 91 then if (this.skip_sep() == sep) then this.nbuff = this.nbuff + 1 this.current = this.z.read() cont = cont + 1 end elseif this.current == 93 then if (this.skip_sep() == sep) then this.nbuff = this.nbuff + 1 this.current = this.z.read() endloop = true end elseif this.current == 10 or this.current == 13 then this.nbuff = this.nbuff + 1 local old = this.current this.current = this.z.read() if ((this.current == 10 or this.current == 13) and this.current ~= old) then this.current = this.z.read() this.nbuff = this.nbuff + 1 end if not seminfo then this.nbuff = 0 end else this.nbuff = this.nbuff + 1 this.current = this.z.read() end end if seminfo then seminfo.ts = this.z.source:sub(this.z.pos - this.nbuff + 2 + sep, this.z.pos - 3 - sep) end end function this.read_string(del, seminfo) local nstart = this.z.pos this.current = this.z.read() while (this.current ~= del) do if this.current == 92 then this.z.pos = this.z.pos + 2 else this.z.pos = this.z.pos + 1 end this.current = this.z.z[this.z.pos] or -1 end this.current = this.z.read() seminfo.ts = this.z.source:sub(nstart, this.z.pos - 1) end function this.llex(seminfo) this.nbuff = 0 while true do if this.current == 10 or this.current == 13 then local old = this.current this.current = this.z.read() if ((this.current == 10 or this.current == 13) and this.current ~= old) then this.current = this.z.read() end elseif this.current == 32 or this.current == 12 or this.current == 9 or this.current == 0x0B then this.current = this.z.read() elseif this.current == 43 then this.current = this.z.read() if this.current ~= 61 then return 43 else this.current = this.z.read() return 295 end elseif this.current == 42 then this.current = this.z.read() if this.current ~= 61 then return 42 else this.current = this.z.read() return 297 end elseif this.current == 45 then this.current = this.z.read() if this.current == 61 then this.current = this.z.read() return 296 elseif this.current == 62 then this.current = this.z.read() return 311 elseif this.current ~= 45 then return 45 end this.current = this.z.read() local oldpos = this.z.pos if this.current == 91 then local sep = this.skip_sep() this.nbuff = 0 if sep >= 0 then this.read_long_string( nil, sep) this.nbuff = 0 if this.comment == true then this.tokennum = this.tokennum + 1 this.alltoken[this.tokennum] = { 666, "--" .. this.z.source:sub(oldpos, this.z.pos - 1), style = "comment" } end goto switch_llex; end end if this.comment == true then local zsbuff = { } while (( not (this.current == 10 or this.current == 13)) and this.current ~= -1) do table.insert(zsbuff, this.current & 255) this.current = this.z.read() end this.tokennum = this.tokennum + 1 this.alltoken[this.tokennum] = { 666, "--" .. string.char(table.unpack(zsbuff)), style = "comment" } else while (( not (this.current == 10 or this.current == 13)) and this.current ~= -1) do this.current = this.z.read() end end elseif this.current == 91 then local sep = this.skip_sep() if sep >= 0 then this.read_long_string(seminfo, sep) return 293 elseif sep == -1 then return 91 end elseif this.current == 61 then this.current = this.z.read() if this.current ~= 61 then return 61 else this.current = this.z.read() return 282 end elseif this.current == 60 then this.current = this.z.read() if (this.current == 60) then this.current = this.z.read() if this.current == 61 then this.current = this.z.read(); return 305 else return 286 end elseif this.current == 61 then this.current = this.z.read() return 284 else return 60 end elseif this.current == 37 then this.current = this.z.read() if this.current ~= 61 then return 37 else this.current = this.z.read() return 299 end elseif this.current == 38 then this.current = this.z.read() if this.current ~= 61 then return 38 else this.current = this.z.read() return 302 end elseif this.current == 124 then this.current = this.z.read() if this.current ~= 61 then return 124 else this.current = this.z.read() return 303 end elseif this.current == 62 then this.current = this.z.read() if this.current == 62 then this.current = this.z.read() if this.current == 61 then this.current = this.z.read() return 306 else return 287 end elseif this.current == 61 then this.current = this.z.read() return 283 else return 62 end elseif this.current == 47 then this.current = this.z.read() if this.current == 61 then this.current = this.z.read() return 298 elseif this.current == 47 then this.current = this.z.read() if this.current ~= 61 then return 279 else this.current = this.z.read() return 301 end else return 47 end elseif this.current == 126 then this.current = this.z.read() if this.current ~= 61 then return 126 else this.current = this.z.read() return 285 end elseif this.current == 94 then this.current = this.z.read() if this.current ~= 61 then return 94 else this.current = this.z.read() return 300 end elseif this.current == 58 then this.current = this.z.read() if this.current ~= 58 then return 58 else this.current = this.z.read() return 288 end elseif this.current == 34 or this.current == 39 then this.read_string(this.current, seminfo) return 292 elseif this.current == 46 then this.save_and_next() if this.check_next(46) then if this.check_next(46) then return 281 elseif this.check_next(61) then return 304 else return 280 end elseif ( not this.isdigit[this.current]) then return 46 else this.read_numeral(seminfo) return 290 end elseif this.isnum[this.current] then this.read_numeral(seminfo) return 290 elseif this.current == -1 then return 289 else if ((this.isalpha[this.current] or this.current == 95) or this.current >= 128) then repeat this.save_and_next() until ( not (this.isalnum[this.current] or this.current >= 128)) local ts = string.char(table.unpack(this.buff, 0, this.nbuff - 1)) if (this.RESER[ts]) then if ts ~= nil then local c = this.RESER[ts] if c ~= nil then return c end end else seminfo.ts = ts return 291 end else local c2 = this.current this.current = this.z.read() return c2 end end ::switch_llex:: end end function this.next() if (this.lookaheadx.token ~= 289) then this.t.token = this.lookaheadx.token this.t.seminfo.ts = this.lookaheadx.seminfo.ts this.lookaheadx.token = 289 else this.t.token = this.llex(this.t.seminfo) end this.tokennum = this.tokennum + 1 this.alltoken[this.tokennum] = { this.t.token, this.txtToken(this.t.token) } end function this.testnext(c) if (this.t.token == c) then this.next() return true else return false end end function this.testnext_in_table(c) if (this.t.token == c) then this.alltoken[this.tokennum].type = "separator" this.next() return true else return false end end function this.registerlocalvar(varname) local fs = this.fs local f = fs.f f.locvars = f.locvars or { } f.locvars[fs.nlocvars] = varname fs.nlocvars = fs.nlocvars + 1 return fs.nlocvars - 1 end function this.new_localvar(name) local reg = this.registerlocalvar(name) this.dyd.actvar = this.dyd.actvar or { } this.dyd.actvar[this.dyd.n_actvar] = reg this.dyd.n_actvar = this.dyd.n_actvar + 1 end function this.singlevar() local varname = this.t.seminfo.ts this.next() local fs = this.fs local vv = fs.singlevaraux(fs, varname, 1) if (vv == 0) then vv = fs.singlevaraux(fs, "_ENV", 1) end return vv end function this.open_func(fs, bl) fs.prev = this.fs fs.ls = this this.fs = fs fs.nups = 0 fs.nlocvars = 0 fs.nactvar = 0 fs.firstlocal = this.dyd.n_actvar fs.bl = nil fs.enterblock(bl) end function this.close_func() local fs = this.fs local f = fs.f fs.leaveblock() this.fs = fs.prev end function this.fieldsel() this.next() this.alltoken[this.tokennum].style = "function Table:Name(Args)||Table.Name" this.next() end function this.yindex() this.next() this.subexpr(0) this.next() end function this.recfield() if (this.t.token == 291) then this.next() else this.yindex() end this.next() this.subexpr(0) end function this.constructor() local temp = this.tokennum this.next() repeat if (this.t.token == 125) then break end if this.t.token == 291 then this.lookaheadx.token = this.llex(this.lookaheadx.seminfo) if (this.lookaheadx.token ~= 61) then this.alltoken[this.tokennum].style = "{NAME 不为=的Op}" this.subexpr(0) else this.alltoken[this.tokennum].style = "{NAME=}" this.recfield() end elseif this.t.token == 91 then this.alltoken[this.tokennum].style = "{[NAME]=}" this.recfield() else this.subexpr(0) end until ( not (this.testnext_in_table(44) or this.testnext_in_table(59))) local currentTokenNum = this.tokennum if currentTokenNum - temp < 15 then this.alltoken[currentTokenNum].style = "shortTableRight" this.alltoken[temp].style = "shortTableLeft" end this.testnext(125) end function this.parlist() local fs = this.fs local f = fs.f local nparams = 0 local is_vararg = 0 if (this.t.token ~= 41) then repeat if this.t.token == 291 then this.alltoken[this.tokennum].type = "local" local ts = this.t.seminfo.ts this.next() this.new_localvar(ts) nparams = nparams + 1 elseif this.t.token == 281 then this.next() is_vararg = 1 end until ( not ((is_vararg == 0) and this.testnext(44))) end this.fs.nactvar = (this.fs.nactvar + nparams) end function this.body(needself) local new_fs = FuncState() local bl = { } new_fs.f = {upvalues = { }, locvars = { } } this.open_func(new_fs, bl) this.next() if (needself) then this.new_localvar("self") this.fs.nactvar = (this.fs.nactvar + 1) end this.parlist() this.next() this.statlist() this.testnext(262) this.close_func() end function this.explist() this.subexpr(0) while (this.testnext(44)) do this.subexpr(0) end end function this.funcargs() if this.t.token == 40 then this.next() if (this.t.token ~= 41) then this.explist() end this.testnext(41) elseif this.t.token == 123 then this.constructor() elseif this.t.token == 292 or this.t.token == 293 then this.next() end end function this.primaryexp() if this.t.token == 40 then this.next() this.subexpr(0) this.testnext(41) return elseif this.t.token == 291 then local vv = this.singlevar() local types = "local" if vv == 0 then types = "global" end this.alltoken[this.tokennum - 1].type = types return else this.next() end end function this.suffixedexp() this.primaryexp() while true do if this.t.token == 46 then this.fieldsel() elseif this.t.token == 91 then this.yindex() elseif this.t.token == 58 then this.next() this.alltoken[this.tokennum].style = "Var:Name(Args)" this.next() this.funcargs() elseif this.t.token == 40 or this.t.token == 292 or this.t.token == 293 or this.t.token == 123 then this.funcargs() else return end end end function this.simpleexp() if this.t.token == 290 or this.t.token == 292 or this.t.token == 293 or this.t.token == 270 or this.t.token == 276 or this.t.token == 263 or this.t.token == 281 then this.next() elseif this.t.token == 123 then this.constructor() elseif this.t.token == 265 then this.next() this.body(false ) else this.suffixedexp() end end this.getunopr = { [271] = 1, [45] = 0, [35] = 2, [126] = 4, } this.getbinopr = { [43] = 0, [45] = 1, [42] = 2, [47] = 5, [37] = 3, [94] = 4, [280] = 12, [285] = 16, [282] = 13, [60] = 14, [284] = 15, [62] = 17, [283] = 18, [257] = 19, [272] = 20, [279] = 6, [38] = 7, [124] = 8, [126] = 9, [286] = 10, [287] = 11 } this.priority = { [0] = {10, 10}, {10, 10}, {11, 11}, {11, 11}, {14, 13}, {11, 11}, {11, 11}, {6, 6}, {4, 4}, {5, 5}, {7, 7}, {7, 7}, {9, 8}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {2, 2}, {1, 1}, {1, 1} } function this.subexpr(limit) local op = nil local uop = nil uop = this.getunopr[this.t.token] or 3 if (uop ~= 3) then this.alltoken[this.tokennum].type = "unopr" this.next() this.subexpr(14) else this.simpleexp() end op = this.getbinopr[this.t.token] or 21 while (op ~= 21 and this.priority[op][1] > limit) do this.next() op = this.subexpr(this.priority[op][2]) end return op end this.following_t = { [260] = true, [261] = true, [262] = true, [289] = true, } function this.block_follow(withuntil) this.following_t[277] = withuntil return this.following_t[this.t.token] end function this.block() local fs = this.fs local bl = { } fs.enterblock(bl) this.statlist() fs.leaveblock() end function this.assignment() if (this.testnext(44)) then this.suffixedexp() this.assignment() else this.next() this.explist() end end function this.gotostat() if (this.testnext(266)) then this.alltoken[this.tokennum - 1].style = "goto Name" this.next() else this.next() end end function this.skipnoopstat() while (this.t.token == 59 or this.t.token == 288) do this.statement() end end function this.labelstat() this.next() this.skipnoopstat() end function this.whilestat() local fs = this.fs local bl = { } this.next() this.subexpr(0) fs.enterblock(bl) this.next() this.block() this.testnext(262) fs.leaveblock() end function this.repeatstat() local fs = this.fs local bl1 = { } local bl2 = { } fs.enterblock(bl1) fs.enterblock(bl2) this.next() this.statlist() this.testnext(277) this.subexpr(0) fs.leaveblock() fs.leaveblock() end function this.forbody(nvars) local bl = { } local fs = this.fs this.fs.nactvar = (this.fs.nactvar + 3) this.next() fs.enterblock(bl) this.fs.nactvar = (this.fs.nactvar + nvars) this.block() fs.leaveblock() end function this.fornum(varname) this.new_localvar("(for index)") this.new_localvar("(for limit)") this.new_localvar("(for step)") this.new_localvar(varname) this.alltoken[this.tokennum - 1].type = "local" this.next() this.subexpr(0) this.next() this.subexpr(0) if (this.testnext(44)) then this.subexpr(0) end this.forbody(1) end function this.forlist(indexname) local nvars = 4 this.new_localvar("(for generator)") this.new_localvar("(for state)") this.new_localvar("(for control)") this.new_localvar(indexname) this.alltoken[this.tokennum - 1].type = "local" while (this.testnext(44)) do local ts = this.t.seminfo.ts this.next() this.new_localvar(ts) this.alltoken[this.tokennum - 1].type = "local" nvars = nvars + 1 end this.next() this.explist() this.forbody(nvars - 3) end function this.forstat() local fs = this.fs local bl = { } fs.enterblock(bl) this.next() local varname = this.t.seminfo.ts this.next() if this.t.token == 61 then this.fornum(varname) elseif this.t.token == 44 or this.t.token == 268 then this.forlist(varname) end this.testnext(262) fs.leaveblock() end function this.test_then_block() local bl = { } this.next() this.subexpr(0) this.next() if (this.t.token == 266 or this.t.token == 258) then this.fs.enterblock(bl) this.gotostat() this.skipnoopstat() if (this.block_follow(false )) then this.fs.leaveblock() return end else this.fs.enterblock(bl) end this.statlist() this.fs.leaveblock() end function this.ifstat() this.test_then_block() while (this.t.token == 261) do this.test_then_block() end if (this.testnext(260)) then this.block() end this.testnext(262) end function this.localfunc() local ts = this.t.seminfo.ts this.next() this.new_localvar(ts) this.alltoken[this.tokennum - 1].type = "local" this.fs.nactvar = (this.fs.nactvar + 1) this.body(false ) end function this.localstat() local nvars = 0 repeat local ts = this.t.seminfo.ts this.next() this.new_localvar(ts) this.alltoken[this.tokennum - 1].type = "local" nvars = nvars + 1 until ( not (this.testnext(44))) if (this.testnext(61)) then this.explist() end this.fs.nactvar = (this.fs.nactvar + nvars) end function this.funcname() local ismethod = false local vv = this.singlevar() local types = "local" if vv == 0 then types = "global" end this.alltoken[this.tokennum - 1].type = types while (this.t.token == 46) do this.fieldsel() end if (this.t.token == 58) then ismethod = true this.fieldsel() end return ismethod end function this.funcstat() this.next() this.body(this.funcname()) end function this.exprstat() this.suffixedexp() if (this.t.token == 61 or this.t.token == 44) then this.assignment() end end function this.retstat() if ( not (this.block_follow( true ) or this.t.token == 59)) then this.explist() end this.testnext(59) end function this.statement() if this.t.token == 59 then this.next() elseif this.t.token == 267 then this.ifstat() elseif this.t.token == 278 then this.whilestat() elseif this.t.token == 259 then this.next() this.block() this.testnext(262) elseif this.t.token == 264 then this.forstat() elseif this.t.token == 273 then this.repeatstat() elseif this.t.token == 265 then this.funcstat() elseif this.t.token == 269 then this.next() if (this.testnext(265)) then this.localfunc() else this.localstat() end elseif this.t.token == 288 then this.alltoken[this.tokennum].type = "dbcolon" this.next() this.alltoken[this.tokennum].style = "::Name::" this.next() this.labelstat() elseif this.t.token == 274 then this.next() this.retstat() elseif this.t.token == 258 or this.t.token == 266 then this.gotostat() else this.exprstat() end end function this.statlist() while ( not this.block_follow( true )) do if (this.t.token == 274) then this.statement() return end this.statement() end end function this.mainfunc(funcstate) this.open_func(funcstate, { }) this.fs.newupvalue("_ENV") this.next() this.statlist() this.close_func() for n = #this.alltoken, 1, -1 do if this.alltoken[n][1] == -1 or this.alltoken[n][1] == 289 or this.alltoken[n][1] == 293 + 1 then this.alltoken[n] = nil else break end end end end) local function Llex(z) local lexstate = LexState() local funcstate = FuncState() lexstate.fs = funcstate lexstate.comment = true lexstate.setinput(z) funcstate.f = {upvalues = { }, locvars = { } } lexstate.mainfunc(funcstate) return lexstate end local RESERVED = { [257] = "and", [258] = "break", [259] = "do", [260] = "else", [261] = "elseif", [262] = "end", [263] = "false", [264] = "for", [265] = "function", [266] = "goto", [267] = "if", [268] = "in", [269] = "local", [270] = "nil", [271] = "not", [272] = "or", [273] = "repeat", [274] = "return", [275] = "then", [276] = "true", [277] = "until", [278] = "while", [279] = "//", [280] = "..", [281] = "...", [282] = "==", [283] = ">=", [284] = "<=", [285] = "~=", [286] = "<<", [287] = ">>", [288] = "::", [289] = "", [290] = "", [291] = "", [292] = "", [293] = "", [294] = "", [295] = "+=", [296] = "-=", [297] = "*=", [298] = "/=", [299] = "%=", [300] = "^=", [301] = "//=", [302] = "&=", [303] = "|=", [304] = "..=", [305] = "<<=", [306] = ">>=", [307] = "->" } local i = 0 local If = { } local tab = { } local r, rs = { }, { } local file = { ['read'] = function (v1) local v2 = io.open(v1, 'r'):read('*a') if v2 then return v2 else return nil end end, ['write'] = function (v1, v2) local v3 = io.open(v1, 'w+') if v3 then v3:write(v2) else gg.alert('无法创建:\n' .. v2) end end } local function str_enc(s) return s:gsub(".",function (c) return string.format('\\x%02X', c:byte()) end ) end local function RandomName(len) local len = math.random(10, 20) local res = { } for i = 1, len do table.insert(res, string.char(math.random(128, 255))) end return table.concat(res) end local u1 = {'选择文件', '开始加密', '设置配置', '退出加密'} local u2, v3, v4, v5 = nil, nil, nil, { true } local u3 = "/storage/emulated/0/" function 生成运算(目标值) local 随机数1 = math.random(100, 999) local 随机数2 = math.random(100, 999) local 随机数4 = math.random(100, 999) local 运算符集合 = {'+', '-'} local 运算符1 = 运算符集合[math.random(1, 2)] local 运算符2 = 运算符集合[math.random(1, 2)] local 运算符3 = 运算符集合[math.random(1, 2)] local 运算符4 = 运算符集合[math.random(1, 2)] local 随机数3 = 目标值 - 随机数1 local 步骤1 = 运算符1 == '+' and (随机数3 + 随机数2) or (随机数3 - 随机数2) local 步骤2 = 运算符2 == '+' and (步骤1 + 随机数4) or (步骤1 - 随机数4) local 步骤3 = 运算符3 == '+' and (步骤2 + 随机数1) or (步骤2 - 随机数1) local 当前值 = load("return " .. string.format("(%d %s %d %s %d %s %d)", 随机数3, 运算符1, 随机数2, 运算符2, 随机数4, 运算符3, 随机数1))() local 随机数5 = 运算符4 == '+' and (目标值 - 当前值) or (当前值 - 目标值) return { 随机数1 = 随机数1, 随机数2 = 随机数2, 随机数3 = 随机数3, 随机数4 = 随机数4, 随机数5 = 随机数5, 运算1 = (运算符1), 运算2 = (运算符2), 运算3 = (运算符3), 运算4 = (运算符4), } end local 开始 = 0 local indkey = math.random(127, 255) local Dakey = math.random(1, 126) local info = { } local Rand = { } local Danr = { } local Code = { } local vTrue = true local Tokey = { } local Toind = { } local Res = { "ۖ", "ۗ", "ۘ", "ۙ", "ۚ", "ۛ", "ۜ", "۟", "۠", "ۡ", "ۢ", "ۣ", "ۤ", "ۥ", "ۦ", "ۧ", "ۨ", "ۭ" } local Let={} Let.Ran_str = function(len) if not len then len = math.random(4, 6) end local res = "" for i = 1, len do local choice = math.random(1, 2) if choice == 1 then res = res .. string.char(math.random(65, 90)) elseif choice == 2 then res = res .. string.char(math.random(97, 122)) end end return res end local debris = function(txt) return txt end local txt_Tab_set={} local tab_txt={} local tab_txt2={} local tab_num = 0 local tab_num2 = 0 function Table_Rand(t) local tRet = {} local Total = #t while Total > 0 do local i = math.random(1,Total) table.insert(tRet,t[i]) t[i] = t[Total] Total = Total-1 end return tRet end--打乱table local tab_ran_16 = {} local Let_know = function(num) local zl = {} if not num then num = math.random(4, 8) end for x = 1, num do zl[#zl+1] = "\\x"..string.format("%02x",math.random(130, 190)) end zl = table.concat(zl) if tab_ran_16[zl] then Let_know() end tab_ran_16[zl] = true return zl end--生成破损字符 local any_byte = function(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl+1] = string.char(math.random(0, 255)) end zl = table.concat(zl) if tab_ran_16[zl] then any_byte() end tab_ran_16[zl] = true return zl end--生成16进制字符 local function WlCon(nr)--while写法 local func_Name = Let.Ran_str() local Key = math.random(10000,999999) local Main_Key = Key for i,k in pairs(nr) do if i==#nr then nr[i]="if " .. func_Name .. "==" .. debris(Key) .. " then\n" .. nr[i] .. "\nbreak\nend\n" else nr[i]="if " .. func_Name.."==" .. debris(Key) .. " then\n" .. nr[i] Key = math.random(10000,999999) nr[i]=nr[i] .. "\n" .. func_Name .. "=" .. Key .. "\nend\n" end end return "local " .. func_Name .."=" .. Main_Key .. "\nwhile true do\n" .. table.concat(Table_Rand(nr)).."\nend\n" end local function WlConGoto(nr)--goto写法 local func_Name = Let.Ran_str() local S = Let.Ran_str() local Key = math.random(10000,999999) local Main_Key = Key local s=0 for i,k in pairs(nr) do if i==#nr then nr[i]="::"..S.."" .. s .. "::\nif " .. func_Name .. "==" .. debris(Key) .. " then\n" .. nr[i] .. "\nend\ngoto "..S.."" .. (s + 1) .. "\n" else nr[i]="::"..S.."" .. s .. "::\nif " .. func_Name.."==" .. debris(Key) .. " then\n" .. nr[i] Key = math.random(10000,999999) nr[i]=nr[i] .. "\n" .. func_Name .. "=" .. Key .. "\nend\ngoto "..S.."" .. (s + 1) .. "\n" s=s+1 end end return "local " .. func_Name .."=" .. Main_Key .. "\ngoto "..S.."0\n" .. table.concat(Table_Rand(nr)) .. "::"..S.."" .. (s + 1) .. "::\n" end local True = str_enc(string.char(math.random(1, 127), math.random(128, 255))) local False = str_enc(string.char(math.random(128, 255), math.random(1, 127))) local function log(message) print(os.date("%Y/%m/%d %H:%M:%S") .. "\t\t" .. message) end local function oneLine(ls, bool) local x = ls.alltoken local ts = #x local codeTable = { } local curr = -1 local later_t = -1 for k, v in ipairs(x) do local content = v[2] curr = v[1] if curr == 292 then if content == "''" then content = "''" goto String -- 不进行任何处理 end if content == '""' then content = "''" goto String -- 不进行任何处理 end local cakey = math.random(127, 255) local o = #content local c = load("return "..content)()--content:sub(2, o - 1):gsub('\\\\', '\\'):gsub("\\n", "\n") local e = Tokey[c] local Tent = c:gsub('.',function(c) return str_enc(string.char(c:byte() ~ cakey)) end ) local index = Toind[c] if not e then local 运算数据 = 生成运算(Dakey) local v1, v2, v3, v4, v5, v6, v7, v8, v9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local 运算数据 = 生成运算( #c) local k1, k2, k3, k4, k5, k6, k7, k8, k9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local 运算数据 = 生成运算(cakey) local r1, r2, r3, r4, r5, r6, r7, r8, r9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 e = RandomName() index = RandomName() Tokey[c] = e Toind[c] = index Code[ #Code + 1] = str_enc(Tokey[c]) Code[ #Code + 1] = Tent local v = "VM['" .. str_enc(index) .. "']=Setmetatable({},{[Index]=function(t,code) local v={} local x={" .. v1 .. "," .. v3 .. "," .. v5 .. "," .. v7 .. "," .. v9 .. ",} local i=n ::label_12:: if i<=5 then v[i]=x[i] i=i+n goto label_12 else v[#v]=v[n]" .. v2 .. " v[2]" .. v4 .. " v[3]" .. v6 .. " v[4]" .. v8 .. " v[5] end local Page={} local sult={} local i=n local j=n ::label_13:: if j~=n then return Concat(sult) end if i~=n then local Cess=Concat(Page) local a,b=find(Code[n],Cess) if a then local data v={} x={" .. k1 .. "," .. k3 .. "," .. k5 .. "," .. k7 .. "," .. k9 .. ",} local i=n ::label_14:: if i<=5 then v[i]=x[i] i=i+n goto label_14 else v[#v]=v[n]" .. k2 .. " v[2]" .. k4 .. " v[3]" .. k6 .. " v[4]" .. k8 .. " v[5] data=sub(Code[n],b+j,b+v[#v]) end local v={" .. r1 .. "," .. r3 .. "," .. r5 .. "," .. r7 .. "," .. r9 .. "} local ops={TabCode[" .. string.byte(r2) .. "],TabCode[" .. string.byte(r4) .. "],TabCode[" .. string.byte(r6) .. "],TabCode[" .. string.byte(r8) .. "]} local res=v[n] local i=n ::label_1:: if i<=4 then if ops[i]==TabCode[43] then res=res+v[i+n] goto label_2 else res=res-v[i+n] goto label_2 end ::label_2:: i=i+n goto label_1 end ::label_15:: if j<=#data then sult[j]=TabCode[Bytes(data,j)~res] j=j+n goto label_15 end goto label_13 end end ::label_16:: if i<=#code then Page[i]=TabCode[Bytes(code,i)~v[#v]] i=i+n goto label_16 else i=0 end if i~=n then goto label_13 end end})" --v = "if not " .. Res[math.random(1, #Res)] .. " then " .. v .. " end " if vTrue == true then Rand[ #Rand + 1] = v vTrue = false else Danr[ #Danr + 1] = v vTrue = true end end index = index:gsub('.',function(c) return str_enc(string.char(c:byte() ~ indkey)) end ) e = Tokey[c] e = e:gsub('.',function(c) return str_enc(string.char(c:byte() ~ Dakey)) end ) content = "(TabVM['" .. index .. "']['" .. e .. "'])" ::String:: end if curr == 293 then local c = content:match("%[=*%[(.*)%]=*%]") if c then local cakey = math.random(127, 255) local e = Tokey[c] local Tent = c:gsub('.', function (c) return str_enc(string.char(c:byte() ~ cakey)) end ) local index = Toind[c] if not e then local 运算数据 = 生成运算(Dakey) local v1, v2, v3, v4, v5, v6, v7, v8, v9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local 运算数据 = 生成运算( #c) local k1, k2, k3, k4, k5, k6, k7, k8, k9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local 运算数据 = 生成运算(cakey) local r1, r2, r3, r4, r5, r6, r7, r8, r9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 e = RandomName() index = RandomName() Tokey[c] = e Toind[c] = index Code[ #Code + 1] = str_enc(Tokey[c]) Code[ #Code + 1] = Tent local v = "VM['" .. str_enc(index) .. "']=Setmetatable({},{[Index]=function(t,code) local v={} local x={" .. v1 .. "," .. v3 .. "," .. v5 .. "," .. v7 .. "," .. v9 .. ",} local i=n ::label_12:: if i<=5 then v[i]=x[i] i=i+n goto label_12 else v[#v]=v[n]" .. v2 .. " v[2]" .. v4 .. " v[3]" .. v6 .. " v[4]" .. v8 .. " v[5] end local Page={} local sult={} local i=n local j=n ::label_13:: if j~=n then return Concat(sult) end if i~=n then local Cess=Concat(Page) local a,b=find(Code[n],Cess) if a then local data v={} x={" .. k1 .. "," .. k3 .. "," .. k5 .. "," .. k7 .. "," .. k9 .. ",} local i=n ::label_14:: if i<=5 then v[i]=x[i] i=i+n goto label_14 else v[#v]=v[n]" .. k2 .. " v[2]" .. k4 .. " v[3]" .. k6 .. " v[4]" .. k8 .. " v[5] data=sub(Code[n],b+j,b+v[#v]) end local v={" .. r1 .. "," .. r3 .. "," .. r5 .. "," .. r7 .. "," .. r9 .. "} local ops={TabCode[" .. string.byte(r2) .. "],TabCode[" .. string.byte(r4) .. "],TabCode[" .. string.byte(r6) .. "],TabCode[" .. string.byte(r8) .. "]} local res=v[n] local i=n ::label_1:: if i<=4 then if ops[i]==TabCode[43] then res=res+v[i+n] goto label_2 else res=res-v[i+n] goto label_2 end ::label_2:: i=i+n goto label_1 end ::label_15:: if j<=#data then sult[j]=TabCode[Bytes(data,j)~res] j=j+n goto label_15 end goto label_13 end end ::label_16:: if i<=#code then Page[i]=TabCode[Bytes(code,i)~v[#v]] i=i+n goto label_16 else i=0 end if i~=n then goto label_13 end end})" --v = "if not " .. Res[math.random(1, #Res)] .. " then " .. v .. " end " if vTrue == true then Rand[ #Rand + 1] = v vTrue = false else Danr[ #Danr + 1] = v vTrue = true end end index = index:gsub('.', function (c) return str_enc(string.char(c:byte() ~ indkey)) end ) e = Tokey[c] e = e:gsub('.', function (c) return str_enc(string.char(c:byte() ~ Dakey)) end ) content = "(TabVM['" .. index .. "']['" .. e .. "'])" end end if curr == 290 then local cakey = math.random(127, 255) local c = content local e = Tokey[c] local Tent = c:gsub('.',function(c) return str_enc(string.char(c:byte() ~ cakey)) end ) local index = Toind[c] if not e then local 运算数据 = 生成运算(Dakey) local v1, v2, v3, v4, v5, v6, v7, v8, v9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local 运算数据 = 生成运算( #c) local k1, k2, k3, k4, k5, k6, k7, k8, k9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local 运算数据 = 生成运算(cakey) local r1, r2, r3, r4, r5, r6, r7, r8, r9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 e = RandomName() index = RandomName() Tokey[c] = e Toind[c] = index Code[ #Code + 1] = str_enc(Tokey[c]) Code[ #Code + 1] = Tent local v = "VM['" .. str_enc(index) .. "']=Setmetatable({},{[Index]=function(t,code) local v={} local x={" .. v1 .. "," .. v3 .. "," .. v5 .. "," .. v7 .. "," .. v9 .. ",} local i=n ::label_12:: if i<=5 then v[i]=x[i] i=i+n goto label_12 else v[#v]=v[n]" .. v2 .. " v[2]" .. v4 .. " v[3]" .. v6 .. " v[4]" .. v8 .. " v[5] end local Page={} local sult={} local i=n local j=n ::label_13:: if j~=n then return Concat(sult) end if i~=n then local Cess=Concat(Page) local a,b=find(Code[n],Cess) if a then local data v={} x={" .. k1 .. "," .. k3 .. "," .. k5 .. "," .. k7 .. "," .. k9 .. "} local i=n ::label_14:: if i<=5 then v[i]=x[i] i=i+n goto label_14 else v[#v]=v[n]" .. k2 .. " v[2]" .. k4 .. " v[3]" .. k6 .. " v[4]" .. k8 .. " v[5] data=sub(Code[n],b+j,b+v[#v]) end local v={" .. r1 .. "," .. r3 .. "," .. r5 .. "," .. r7 .. "," .. r9 .. "} local ops={TabCode[" .. string.byte(r2) .. "],TabCode[" .. string.byte(r4) .. "],TabCode[" .. string.byte(r6) .. "],TabCode[" .. string.byte(r8) .. "]} local res=v[n] local i=n ::label_1:: if i<=4 then if ops[i]==TabCode[43] then res=res+v[i+n] goto label_2 else res=res-v[i+n] goto label_2 end ::label_2:: i=i+n goto label_1 end ::label_15:: if j<=#data then sult[j]=TabCode[Bytes(data,j)~res] j=j+n goto label_15 end goto label_13 end end ::label_16:: if i<=#code then Page[i]=TabCode[Bytes(code,i)~v[#v]] i=i+n goto label_16 else i=0 end if i~=n then goto label_13 end end})" --v = "if not " .. Res[math.random(1, #Res)] .. " then " .. v .. " end " if vTrue == true then Rand[ #Rand + 1] = v vTrue = false else Danr[ #Danr + 1] = v vTrue = true end end index = index:gsub('.',function(c) return str_enc(string.char(c:byte() ~ indkey)) end ) e = Tokey[c] e = e:gsub('.',function(c) return str_enc(string.char(c:byte() ~ Dakey)) end ) content = "(Tonumber(TabVM['" .. index .. "']['" .. e .. "']))" end if curr == 263 then -- content = "(not(function(Code)for i=0,# Code do return Fast['" .. False .. "']end end)('" .. Res[math.random(1, #Res)] .. "'))" end if curr == 270 then -- content = "(function(Code)for i=0,# Code do return Fast[env]end end)('" .. Res[math.random(1, #Res)] .. "')" end if curr == 276 then -- content = "(not(function(Code)for i=0,# Code do return Fast['" .. True .. "']end end)('" .. Res[math.random(1, #Res)] .. "'))" end if RESERVED[curr] and ((curr >= 257 and curr <= 278) or (curr >= 290 and curr <= 293)) then later_t = (x[k + 1] and x[k + 1] or { -1})[1] if RESERVED[later_t] and ((later_t >= 257 and later_t <= 278) or (later_t >= 290 and later_t <= 293)) then content = content .. " " end end if curr == 666 then if #codeTable > 0 and codeTable[ #codeTable]:sub( -1, -1) ~= " " then content = " " else content = "" end end codeTable[ #codeTable + 1] = content end local 运算数据 = 生成运算(indkey) local v1, v2, v3, v4, v5, v6, v7, v8, v9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local 运算数据 = 生成运算(255) local k1, k2, k3, k4, k5, k6, k7, k8, k9 = 运算数据.随机数3, 运算数据.运算1, 运算数据.随机数2, 运算数据.运算2, 运算数据.随机数4, 运算数据.运算3, 运算数据.随机数1, 运算数据.运算4, 运算数据.随机数5 local ffa = 'return (function() ' local ffb = ' end)()' return "local EMO='苏宁尊享版'\n\nlocal Aether='" .. table.concat(Code) .. "'local env=_ENV or _G local A={}local String=env['s'..'t'..'r'..'i'..'n'..'g']local Char=String['c'..'h'..'a'..'r'] local Table=env[Char(116)..Char(97)..Char(98)..Char(108)..Char(101)]local Setmetatable=env[Char(115)..Char(101)..Char(116)..Char(109)..Char(101)..Char(116)..Char(97)..Char(116)..Char(97)..Char(98)..Char(108)..Char(101)]local Bytes=String[Char(98)..Char(121)..Char(116)..Char(101)]local Concat=Table[Char(99)..Char(111)..Char(110)..Char(99)..Char(97)..Char(116)]local Tonumber=env[Char(116)..Char(111)..Char(110)..Char(117)..Char(109)..Char(98)..Char(101)..Char(114)]local sub=String[Char(115)..Char(117)..Char(98)]local find=String[Char(102)..Char(105)..Char(110)..Char(100)]local Gsub=String[Char(103)..Char(115)..Char(117)..Char(98)]local 打包=Table[Char(112)..Char(97)..Char(99)..Char(107)]local Index=Char(95)..Char(95)..Char(105)..Char(110)..Char(100)..Char(101)..Char(120) local Newindex=Char(95)..Char(95)..Char(110)..Char(101)..Char(119)..Char(105)..Char(110)..Char(100)..Char(101)..Char(120) local t t=Setmetatable({},{[Index]=function()return t[t]end}) local TabCode={}local TabCode=Setmetatable({},{[Index]=function(table,code)return TabCode[code]end})local Tabchar={}local Tabchar=Setmetatable({}, {[Newindex]=function(table, index, code)TabCode[index]=code end})local v={} local x={" .. k1 .. "," .. k3 .. "," .. k5 .. "," .. k7 .. "," .. k9 .. ",} local i=1 ::label_17:: if i<=5 then v[i]=x[i] i=i+1 goto label_17 else v[#v]=v[1]" .. k2 .. " v[2]" .. k4 .. " v[3]" .. k6 .. " v[4]" .. k8 .. " v[5] end for i=#'', v[#v] do Tabchar[i]=Char(i) end local VM={}local TabVM={}local TabVM=Setmetatable({}, {[Index]=function(table,code)local e=TabVM[code]if e~=nil then return e end t[t]=t[t] end})local VM=Setmetatable({}, {[Newindex]=function(table, index, code)local v={} local x={" .. v1 .. "," .. v3 .. "," .. v5 .. "," .. v7 .. "," .. v9 .. ",} local i=1 ::label_17:: if i<=5 then v[i]=x[i] i=i+1 goto label_17 else v[#v]=v[1]" .. v2 .. " v[2]" .. v4 .. " v[3]" .. v6 .. " v[4]" .. v8 .. " v[5] end local index=Gsub(index,TabCode[46], function(c)return TabCode[Bytes(c) ~ v[#v]]end)TabVM[index]=code end}) local Fast=Setmetatable({}, {[Index]=function(table,code) if code=='" .. True .. "' then return false elseif code=='" .. False .. "' then return true elseif code==env then return end t[t]=t[t]end }) local Code=打包(Aether)local n=Code[TabCode[110]] goto VM ::UI::do return(function(Code)local number=n while Code~=n/0 do t[t]=t[t] return end " .. table.concat(codeTable) .. " end)(1/0+10086) end ::VM::" .. table.concat(Rand) .. table.concat(Danr) .. "goto UI" end gg.setVisible( true ) while true do ::UI:: if gg.isVisible() then local v1 = gg.choice( { u1[1] .. "\n" .. u3, u1[2], u1[3], u1[4] }, nil, ([[-- 虚拟化 - 混淆 -- 版本: 1.0.01.6 -- 时间: 2025/7/15 ---------------------------------------- -- 特性更新: -- 1. 标准库不兼容 RLGG 的中文问题 (table.中文) -- 2. 添加字符串抽离技术,所有加密默认启用 -- 3. 安全排名: 虚拟化混淆 >= Nil -- 4. 市面上所谓一键开源工具均为虚假传播 ---------------------------------------- -- 使用条款: -- 本加密工具仅供个人使用,严禁任何形式的外借或为他人加密。 -- 若发现违规行为,官方有权对用户进行封禁处理。 ----------------------------------------]])) if v1 == 1 then local v2 = gg.prompt( {'请选择需要加密的文件'}, {u3}, {'file'}) if not v2 then goto UI elseif loadfile(v2[1]) then u3 = v2[1] v3 = file.read(u3) else gg.alert("您选择的文件有误!\n" .. ( {loadfile(v2[1]) })[2]) end goto UI end if v1 == 2 then if u3 == "/storage/emulated/0/" then gg.alert('请先选择加密文件') goto UI end if v3 then local time = os.clock() local v4 = Llex(v3) local code = oneLine(v4, v5) -- print(info) local v6 = u3 .. "-虚拟化.lua" local codes, err = load(code) if not codes then gg.alert("加密失败: \n"..err) goto UI else codes = string.dump(codes, true ) end --bytecode(code) file.write(v6, (codes)) gg.alert('加密成功\n耗时: ' .. os.clock() - time .. '\n文件已保存至: ' .. v6) end goto UI end if v1 == 3 then v5 = gg.prompt( {'标准库加密'}, v5, {'checkbox'}) or v5 goto UI end if v1 == 4 then os.exit() end gg.setVisible(false ) end end