local gg = gg local os = os local io = io local math = math local table = table local string = string local function Class( base ) 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 ---class FuncState--- 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) ---class LexState--- 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 table.concat({"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 table.concat({"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,table.concat({ "--"..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,table.concat({"--" , 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} } --this.UNARY_PRIORITY = 8 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(this.UNARY_PRIORITY) 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) ---class Llex--- local function 解析(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 --非单字符的token local RESER = { [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]= "", } ----加密配置 local json = json--调用 local g = {} g.file = gg.getFile() g.sel = nil gqlb = { "请先搜索歌曲", } idb = { "1010" } SN,gc = 1,nil g.config = gg.getFile():gsub("%lua$", "").."cfg" function bei() g.data = loadfile("音乐配置"..g.config) if g.data ~= nil then g.sel = g.data() g.data = nil end if g.sel == nil then g.sel = { "","10" } end end bei() ------------------------------ ------------------------------ function start(name,sl) fw = gg.makeRequest("http://music.163.com/api/search/get?s="..name.."&type=1&offset=0&total=true&limit="..sl) return fw end function play(id,name) gg.toast("正在播放音乐:"..name,true) gg.playMusic("http://music.163.com/song/media/outer/url?id="..id..".mp3") end function Play(gqlb,idb) SN = gg.choice(gqlb,nil,ts) if SN == nil then XGCK =-1 else sn = gg.choice({ "播放歌曲","播放并下载" },nil,"歌曲:"..gqlb[SN]) if sn == nil then end if sn == 1 then play(idb[SN],gqlb[SN]) end if sn == 2 then local XEY = gg.makeRequest("http://music.163.com/song/media/outer/url?id="..idb[SN]..".mp3").content local XEY1 = gg.getFile():gsub("[^/]+$","")..gqlb[SN]..".mp3" io.open(XEY1,"w"):write(XEY) gg.toast("提示:\n\n音乐已成功下载位置:\n\n"..XEY1) end XGCK=-1 end end function zjson(jsonr) local str = jsonr local pattern = "\"[%w]+\":" string.gsub(str, pattern, function(v) if string.find(str, v) then str = string.gsub(str, v, string.gsub(v, "\"", "")) end end) str = string.gsub(str, ":", "=") str = string.gsub(str, "%[", "{") str = string.gsub(str, "%]", "}") local data = "-- WSG PRO 1.0.9(109)\nreturn " .. str local res = load(data)() return res end function json(con) res = zjson(con) zd = res.result.songCount pd = go3-zd if pd <= 0 then else go3 = zd end ts = "《"..go1.."》找到"..zd.."首歌曲,当前显示"..go3.."首" gqlb = {} idb = {} for i = 1,go3 do gqlb[i] = res.result.songs[i].name idb[i] = res.result.songs[i].id end end ---+音乐配置 ------------------------------ function gjrv2() gg.alert('高兼容版') local error = error -- 选择脚本文件 ht = gg.prompt({"选择脚本"}, {"/storage/emulated/0/"}, {"file"}) if not ht then return print("未选择脚本") end -- 获取选择的文件路径 local last = ht[1] -- 尝试加载脚本文件 local test, error = loadfile(last) if test == nil then -- 脚本加载失败,显示错误信息 gg.alert('脚本错误!\n\n╾╾╾╾╾⚠ 问 题 所 在 ⚠╾╾╾╾╾\n错误:\n'..error..'\n\n请修复问题之后再加密') -- 设置标志并调用主函数 lw = 1 Main() else local data = io.open(ht[1],"r"):read("*a") gg.alert('读取成功 现在开始加密.') time=os.clock() UI=[=[ ——————————————— < V2> 謊土加密 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]=] .. os.date("%Y.%m.%d.%H.%M.%S") .. [=[ ["謊土攻坚版加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]=] local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end -----数值处理 gg.alert('数值处理成功 已加密10%.') g={} To_16=function(txt) local sp=string.format("%x",txt) if #sp==1 then sp="0"..sp end return "\\x"..sp end local I_love_you=520 local Ones_whole_life=1314 local Unknown_boundary=128 local Unknown_vertex=Unknown_boundary*2 _Table_Key=function(content) local Table_Key={} local _length=#content for _Ergodic_growth = 1,_length do local rule = false local Ergodic_growth=_Ergodic_growth~_length~I_love_you~Ones_whole_life if(rule==false)then Table_Key[#Table_Key+1]=bit32.bxor((_length~_Ergodic_growth),(_length+_Ergodic_growth*Ergodic_growth))~(Unknown_boundary*_length) rule=(true or false) elseif(rule==true)then Table_Key[#Table_Key+1]=bit32.bxor((_length*( _Ergodic_growth+Ergodic_growth)),(_length~_Ergodic_growth))~(Unknown_vertex*_length) rule=(false or true) end end return(Table_Key) end __Table_Key={} STR={} KEY=math.random(1,20) Str={} function NZF_Str(str) str = string.gsub(str, "\\t", "\t"):gsub("\\n", "\n"):gsub("\\34", "\34"):gsub("\\39", "\39") local ascll={str:byte(1,-1)} local Ascll={} key=(math.random(1,255)) __Table_Key[#__Table_Key+1]=To_16(key) ___Table_Key=#__Table_Key Key=_Table_Key(str) for index,value in ipairs(ascll) do value=(value~(key~KEY)) value=value+Key[index]-Key[1] value=value-(Key[index]-Key[#Key])*Key[1] value=value+(I_love_you*Ones_whole_life) value=value%256 Ascll[#Ascll+1]=To_16(value) end Ascll='"'..table.concat(Ascll)..'"' _name_number=math.random(1,1000000) while(true)do if Str[_name_number] then _name_number=math.random((_name_number+1),1000000) else break end end x1=math.random(1,5000) x2=math.random(5000,10000) x3=math.random(5000,10000) x4=math.random(1,5000) if ___x==true then Table_number=[=[(function() if(]=]..x1..[=[>]=]..x2..[=[)then elseif(]=]..x3..[=[>]=]..x4..[=[)then return(]=].._name_number..[=[) end end)()]=] else Table_number=[=[(function() return(]=].._name_number..[=[) end)()]=] end name="STR["..Table_number.."]" STR[#STR+1]=name.."=(function() return {"..Ascll.."} end)" return '(NZFDec(STR[(function() return('.._name_number..') end)()](),'..___Table_Key..'))' end Decryption_algorithm=[=[ local NZFDec=function(content,__Table_Key) local content=content[1] local index,value local KEY=Byte(Tab_key,__Table_Key,__Table_Key) local Key=_Table_Key(Len(content)) local Extraction='' local tab={Byte(content,numerical_value_1,#content)} for index,value in Ipairs(tab)do value=value-(I_love_you*Ones_whole_life) value=value+(Key[index]-Key[#Key])*Key[1] value=value-Key[index]+Key[1] value=(value~(KEY~Table_Char[']=]..To_16(KEY)..[=['])) value=(value)%(Unknown_vertex+numerical_value_1) Extraction=Extraction..Char(value) end return(Extraction) end ]=] decode=[=[ local Table_Char={} for x=0,255 do Table_Char[x]=string.char(x) Table_Char[Table_Char[x]]=x end string.char=function(...) local Char,res={...},"" for i,k in pairs(Char) do res=res..Table_Char[k] end return(res) end local Char,Ipairs,Byte,Len,Bxor,Concat=string.char,ipairs,string.byte,string.len,bit32.bxor,table.concat local numerical_value_1=Table_Char["\1"] local I_love_you=Table_Char["\52"]*Table_Char["\10"] local Ones_whole_life=Table_Char["\100"]*Table_Char["\13"]+Table_Char["\14"] local Unknown_boundary=Table_Char["\128"] local Unknown_vertex=Table_Char["\255"] local _Table_Key=function(_length) local Table_Key={} for _Ergodic_growth = numerical_value_1,_length do local rule = false local Ergodic_growth=_Ergodic_growth~_length~I_love_you~Ones_whole_life if(rule==false)then Table_Key[#Table_Key+numerical_value_1]=Bxor((_length~_Ergodic_growth),(_length+_Ergodic_growth*Ergodic_growth))~(Unknown_boundary*_length) rule=(true or false) elseif(rule==true)then Table_Key[#Table_Key+numerical_value_1]=Bxor((_length*( _Ergodic_growth+Ergodic_growth)),(_length~_Ergodic_growth))~(Unknown_vertex*_length) rule=(false or true) end end return(Table_Key) end local Added_value=numerical_value_1 ]=]..Decryption_algorithm..[=[ ]=] local Min_num = function(...) local arm = {...} local num = nil for i, v in pairs(arm) do if v ~= nil then if not num then num = v elseif num > v then num = v end end end return num end StrEnc=function(data) local gr = {} repeat local s1, ss1, x1, xx1, n1, n2, str s1 = string.find(data, "\034") ss1 = string.find(data, "\039") x1 = string.find(data, "%[[=]*%[") xx1 = string.find(data, "%-%-") str = Min_num(s1, ss1, x1, xx1) if str == nil then break end if str == s1 then data = data:gsub("(.-)(\034.-\034)",function(t1, t2) gr[#gr + 1] = t1 t2 = string.gsub(t2, "\\\\","\\092") t2 = string.gsub(t2, "\\\034", "\\034") if t2:sub(-1, -1) ~= "\034" then return t2 end t3 = load("return "..t2) if not t3 then gg.alert("\034加密失败\n"..t2) os.exit() end gr[#gr + 1] = NZF_Str(t3(),true) return "" end, 1) elseif str == ss1 then data = data:gsub("(.-)(\039.-\039)",function(t1, t2) gr[#gr + 1] = t1 t2 = string.gsub(t2, "\\\\","\\092") t2 = string.gsub(t2, "\\\039", "\\039") if t2:sub(-1, -1) ~= "\039" then return t2 end t3 = load("return "..t2) if not t3 then gg.alert("\039加密失败\n"..t2) os.exit() end gr[#gr + 1] = NZF_Str(t3(),true) return "" end, 1) elseif str == x1 then local g1 = string.match(data,"%[([=]*)%[") data=data:gsub("(.-)(%["..g1.."%[.-%]"..g1.."%])",function(t1, t2) gr[#gr + 1] = t1 t3 = load("return "..t2) if not t3 then gg.alert("[[加密失败\n"..t2) os.exit() end gr[#gr + 1] = NZF_Str(t3(),true) return "" end, 1) elseif str == xx1 then d1, d2, d3, d4 = string.find(data, "%-%-(%[([=]*)%[)") if d1 == xx1 then data = string.gsub(data, "(.-)%-%-%[" .. d4 .. "%[.-%]" .. d4 .. "%]", function(txt1) gr[#gr + 1] = txt1 return " " end, 1) else data = string.gsub(data, "(.-)%-%-[^\n]*", function(txt1) gr[#gr + 1] = txt1 return "" end, 1) end else break end until not str gr[#gr+1]=data gr = table.concat(gr):gsub("return%s+end","return 0\nend") gr = gr:gsub("%-%-%[%[.-%]%]",""):gsub("%-%-[^\n]+", "") return gr end FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data data = StrEnc(data) data="\nlocal Tab_key='"..table.concat(__Table_Key).."'\nlocal STR={}\n"..table.concat(STR,"\n")..decode..data data="(function(...)\nlocal main=(function(...)\n"..data.."\nend)(_ENV)\nend)([===["..UI.."]===])" data=string.dump(load(data),true) gg.alert('虚拟化覆盖成功 已加密50%') path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) gg.alert('字节码处理成功 已加密60%') local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) gg.alert('JMP处理成功 已加密80%') function strenc(str) local t = {string.byte(str, 1, -1)} for i = 1, #t do t[i] = string.format('\\x%02x', t[i]) end return '"' .. table.concat(t) .. '"' end data = strenc ( data ) --转16进制 data=[[ gg_getFile=gg.getFile _ENV["l".."o".."a".."d"](]]..data..[[)()]] data = string.dump(load(data), true) gg.alert('索引保护成功 已加密95%') logo=[=[ —————————————— [謊土加密] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]=] .. os.date("%Y.%m.%d.%H.%M.%S") .. [=[ [ 謊土加密攻坚版v2 *-*-*-*-*-*-*-*-*-* [安全] [稳定] [有效] ] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]=] time=os.clock()-time io.open(ht[1] .. "-[謊土加密攻坚版].lua", "w"):write(data..logo) gg.alert("加密完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密攻坚版].lua") local choice = gg.choice({ "☺yes(是)", "😑no(否)" }, nil, "是否压缩加密后的脚本内存") if choice == 1 then gg.alert('正在进行内存压缩') local UPLOAD_URL = "http://cx.lz.8611186.xyz/api.php" -- 定义表单请求类 local RequestFormData = { url = "", headers = {}, data = "", nfiles = 0 } function RequestFormData:new(o) o = o or {} setmetatable(o, self) self.__index = self self.boundary = "----WebKitFormBoundarymAbsr8BjeYsVXbt4" self.headers["Content-Type"] = "multipart/form-data; boundary=" .. self.boundary self.nfiles = 0 return o end function RequestFormData:setUrl(url) self.url = url end function RequestFormData:appendData(key, value) self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="' .. key .. '"\r\n\r\n' .. value .. "\r\n" end function RequestFormData:appendFile(filename, content) self.nfiles = self.nfiles + 1 self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="file"; filename="' .. filename .. '"\r\n' .. "Content-Type: application/octet-stream\r\n\r\n" .. content .. "\r\n" end function RequestFormData:makeRequest() local ending = "--" .. self.boundary .. "--\r\n" if string.sub(self.data, -#ending) ~= ending then self.data = self.data .. ending end return gg.makeRequest(self.url, self.headers, self.data) end -- 字符串提取下载链接 local function getDownUrl(str) local downurl = str:match('"downurl":"([^"]+)"') return downurl and downurl:gsub("\\/", "/") or "" end -- 提取网盘返回的关键信息 local function getUploadInfo(str) local info = {} info.code = tonumber(str:match('"code":(%d+)')) or -1 info.msg = str:match('"msg":"([^"]+)"') or "未知信息" info.name = str:match('"name":"([^"]+)"') or "" info.size = tonumber(str:match('"size":(%d+)')) or 0 info.id = str:match('"id":"([^"]+)"') or "" info.downurl = getDownUrl(str) return info end local data = io.open(ht[1].."-[謊土加密攻坚版].lua","r"):read("*a") time=os.clock() time=os.clock() local scriptPath = ht[1].."-[謊土加密攻坚版].lua" local scriptDir = scriptPath:match("(.+/)[^/]+$") local scriptName = scriptPath:match(".+/([^/]+)") if not scriptDir or not scriptName then gg.alert("错误:无法解析文件路径,请重新选择") return end -- 2. 读取文件内容 local fileHandle, readErr = io.open(scriptPath, "rb") if not fileHandle then gg.alert("错误:读取文件失败\n" .. (readErr or "未知原因")) return end local scriptContent = fileHandle:read("*a") fileHandle:close() if #scriptContent == 0 then gg.alert("错误:所选文件为空") return end -- 3. 压缩文件到网盘 gg.alert("正在压缩文件...\n文件名:" .. scriptName .. "\n文件大小:" .. #scriptContent .. "字节") local uploadRequest = RequestFormData:new() uploadRequest:setUrl(UPLOAD_URL) uploadRequest:appendFile(scriptName, scriptContent) uploadRequest:appendData("show", "1") local uploadResult = uploadRequest:makeRequest() if not uploadResult then gg.alert("错误:无法连接网盘服务器,请检查网络") return end -- 4. 解析压缩结果 local uploadInfo = getUploadInfo(uploadResult.content) if uploadResult.code ~= 200 then gg.alert("错误:压缩失败\n状态码:" .. uploadResult.code .. "\n原因:响应异常") return end if uploadInfo.code ~= 0 then gg.alert("错误:失败\n提示:" .. uploadInfo.msg) return end if uploadInfo.downurl == "" then gg.alert("错误:\n未转换成功\n请向开发者反馈") return end -- 5. 生成直接执行的加载脚本(移除文件写入逻辑) local data = string.format([[ local response = gg.makeRequest("%s") if response and response.content then local loadFunc, loadErr = load(response.content) if loadFunc then local execOk, execErr = pcall(loadFunc) if not execOk then gg.alert("脚本执行失败:" .. execErr) end else gg.alert("脚本加载失败:" .. loadErr) end else gg.alert("错误:无法获取云端脚本内容,请检查网络") end ]], uploadInfo.downurl, uploadInfo.downurl) local function 处理转义(s) local len = #s local r = {} local r_index = 1 local i = 1 while i <= len do local char_byte = s:byte(i) if char_byte == 92 and i < len then -- '\' local next_byte = s:byte(i + 1) i = i + 2 if next_byte == 97 then -- 'a' r[r_index] = string.char(7) -- \a r_index = r_index + 1 elseif next_byte == 98 then -- 'b' r[r_index] = string.char(8) -- \b r_index = r_index + 1 elseif next_byte == 102 then -- 'f' r[r_index] = string.char(12) -- \f r_index = r_index + 1 elseif next_byte == 110 then -- 'n' r[r_index] = string.char(10) -- \n r_index = r_index + 1 elseif next_byte == 114 then -- 'r' r[r_index] = string.char(13) -- \r r_index = r_index + 1 elseif next_byte == 116 then -- 't' r[r_index] = string.char(9) -- \t r_index = r_index + 1 elseif next_byte == 118 then -- 'v' r[r_index] = string.char(11) -- \v r_index = r_index + 1 elseif next_byte == 92 then -- '\\' r[r_index] = "\\" r_index = r_index + 1 elseif next_byte == 34 then -- '"' r[r_index] = "\"" r_index = r_index + 1 elseif next_byte == 39 then -- "'" r[r_index] = "'" r_index = r_index + 1 elseif next_byte == 120 and i + 1 <= len then -- 'x' local hex_high, hex_low = s:byte(i), s:byte(i + 1) local hex_val if hex_high >= 48 and hex_high <= 57 then hex_val = (hex_high - 48) * 16 elseif hex_high >= 65 and hex_high <= 70 then hex_val = (hex_high - 55) * 16 elseif hex_high >= 97 and hex_high <= 102 then hex_val = (hex_high - 87) * 16 else hex_val = nil end if hex_val then if hex_low >= 48 and hex_low <= 57 then hex_val = hex_val + (hex_low - 48) elseif hex_low >= 65 and hex_low <= 70 then hex_val = hex_val + (hex_low - 55) elseif hex_low >= 97 and hex_low <= 102 then hex_val = hex_val + (hex_low - 87) else hex_val = nil end end if hex_val then r[r_index] = string.char(hex_val) r_index = r_index + 1 i = i + 2 else r[r_index] = "\\" r[r_index + 1] = "x" r_index = r_index + 2 end elseif next_byte == 117 and i + 1 <= len then -- 'u' if s:byte(i) == 123 then -- '{' local j = i + 1 while j <= len and s:byte(j) ~= 125 do -- '}' j = j + 1 end if j <= len then local data = 0 local valid = true for k = i + 1, j - 1 do local hex_byte = s:byte(k) local digit if hex_byte >= 48 and hex_byte <= 57 then digit = hex_byte - 48 elseif hex_byte >= 65 and hex_byte <= 70 then digit = hex_byte - 55 elseif hex_byte >= 97 and hex_byte <= 102 then digit = hex_byte - 87 else valid = false break end data = data * 16 + digit if data > 0x10FFFF then valid = false break end end if valid then if data < 0x80 then r[r_index] = string.char(data) r_index = r_index + 1 elseif data < 0x800 then r[r_index] = string.char(0xC0 + (data >> 6)) r[r_index + 1] = string.char(0x80 + (data & 63)) r_index = r_index + 2 elseif data < 0x10000 then r[r_index] = string.char(0xE0 + (data >> 12)) r[r_index + 1] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 2] = string.char(0x80 + (data & 63)) r_index = r_index + 3 else r[r_index] = string.char(0xF0 + (data >> 18)) r[r_index + 1] = string.char(0x80 + ((data >> 12) & 63)) r[r_index + 2] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 3] = string.char(0x80 + (data & 63)) r_index = r_index + 4 end i = j + 1 else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end elseif next_byte >= 48 and next_byte <= 57 then -- 数字 0-9 local num = next_byte - 48 local count = 1 local k = i while count < 3 and k <= len do local digit_byte = s:byte(k) if digit_byte >= 48 and digit_byte <= 55 then -- 八进制数字 0-7 num = num * 8 + (digit_byte - 48) count = count + 1 k = k + 1 else break end end if num < 256 then r[r_index] = string.char(num) r_index = r_index + 1 i = k else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = string.char(char_byte) r_index = r_index + 1 i = i + 1 end end return table.concat(r, "", 1, r_index - 1) end local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data local ls = 解析(data) local 解析数据 = ls.alltoken local data = {} local str={} local num={} str['""']='""' str["''"]="''" str['[[]]']='[[]]' local key=math.random(1,10) local sey=math.random(65536,1677215) local nuy=math.random(11,99) data[1]='' local 总数=#解析数据 for k,v in ipairs(解析数据) do content = v[2] curr = v[1] if curr==292 then if not str[content]then local s={string.byte(处理转义(content),2,-2)} local len=#s for i=1,len do s[i]=table.concat({"get_sub%",(s[i]< 0 and data[#data]:sub(-1,-1)~=" " then content = " " else content = "" end end data[#data + 1] = ' ' data[#data + 1] = content end data[1]=table.concat({[[ local ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,qwq=... local char={} for i=0,255 do char[i]=ch(i) end local get_sub=setble({},{[__mod]=function(a,b) return b/]],sey,[[ end,[__tostring]=Con({}),[__metatable]=Con({})}) local opstr=setble({},{[__mod]=function(a,b) return setble({},{[__mod]=function(a,c) return b..c end,[__tostring]=Con({}),[__metatable]=Con({})}) end,[__tostring]=Con({}),[__metatable]=Con({})}) local nod=setble({},{[__index]=function(a,b) b=b(a)[1] if strub(b,-2,-1)==qwq then b=strub(b,1,-3) end local w=setble({},{[__mod]=function(q,n) b=b/]],nuy,[[ return b end,[__tostring]=Con({}),[__metatable]=Con({})}) return w%a end,[__tostring]=Con({}),[__metatable]=Con({})}) local mod=setble({},{[__index]=function(a,...) local w=... local q,z local len=1 local p=Con(a) local m=setble({},{[__mod]=function(a,b) w=w(b) while true do q,z=Next(w,q) if z then p=opstr%p%char[z>>]],key,[[] end if q==nil then break end end return p end,[__tostring]=Con({}),[__metatable]=Con({})}) return m%p end,[__tostring]=Con({}),[__metatable]=Con({})}) ]]}) local data = table.concat(data) -- 一次性连接所有代码片段 data=string.dump(load(data),true) path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) local p={string.byte(data,1,-1)} local len=#p local dey=math.random(1,255) for i=1,len do p[i]=p[i]~dey end data=table.concat(p,'\\') data=table.concat({[[ return(function(...) local m=function(...) local p=_ENV local ch=p["s".."t".."r".."i".."n".."g"]["c".."h".."a".."r"] local setble=p["s".."e".."t".."m".."e".."t".."a".."t".."a".."b".."l".."e"] local Next=p["n".."e".."x".."t"] local Con=p["t".."a".."b".."l".."e"]["c".."o".."n".."c".."a".."t"] local strub=p["s".."t".."r".."i".."n".."g"]["s".."u".."b"] local byte=p["s".."t".."r".."i".."n".."g"]['b'..'y'..'t'..'e'] local pack=p["t".."a".."b".."l".."e"]['u'..'n'..'p'..'a'..'c'..'k'] local __mod,__index,__tostring,__metatable="_".."_".."m".."o".."d","_".."_".."i".."n".."d".."e".."x","_".."_".."t".."o".."s".."t".."r".."i".."n".."g","_".."_".."m".."e".."t".."a".."t".."a".."b".."l".."e" local t=(function(t) return t[4]..t[2]..t[3]..t[1] end)({'d','o','a','l'}) local z={byte("\]],data,[[",1,-1)} local w=#z for i=1,w do z[i]=z[i]~]],dey,[[ end p[t](ch(pack(z)))(ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,".0") end return m(...) end)]]}) local logo=[[ 无敌de压缩 謊土加密 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]] .. os.date("%Y.%m.%d.%H.%M.%S") .. [[ ["謊土加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]] data=table.concat({data,"([[",logo,"]])"}) data=string.dump(load(data),true,true) io.open(ht[1] .. "-[謊土de压缩].lua", "w"):write(data) time=os.clock()-time gg.alert("压缩完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密攻坚版].lua".."-[謊土de压缩].lua") gg.playMusic("stop") elseif choice == 2 then else end gg.playMusic("stop") gg.alert('欢迎下次使用') end end function htjmnbsfb() gg.alert("謊土加密收费版") local function 处理转义(s) local len = #s local r = {} local r_index = 1 local i = 1 while i <= len do local char_byte = s:byte(i) if char_byte == 92 and i < len then -- '\' local next_byte = s:byte(i + 1) i = i + 2 if next_byte == 97 then -- 'a' r[r_index] = string.char(7) -- \a r_index = r_index + 1 elseif next_byte == 98 then -- 'b' r[r_index] = string.char(8) -- \b r_index = r_index + 1 elseif next_byte == 102 then -- 'f' r[r_index] = string.char(12) -- \f r_index = r_index + 1 elseif next_byte == 110 then -- 'n' r[r_index] = string.char(10) -- \n r_index = r_index + 1 elseif next_byte == 114 then -- 'r' r[r_index] = string.char(13) -- \r r_index = r_index + 1 elseif next_byte == 116 then -- 't' r[r_index] = string.char(9) -- \t r_index = r_index + 1 elseif next_byte == 118 then -- 'v' r[r_index] = string.char(11) -- \v r_index = r_index + 1 elseif next_byte == 92 then -- '\\' r[r_index] = "\\" r_index = r_index + 1 elseif next_byte == 34 then -- '"' r[r_index] = "\"" r_index = r_index + 1 elseif next_byte == 39 then -- "'" r[r_index] = "'" r_index = r_index + 1 elseif next_byte == 120 and i + 1 <= len then -- 'x' local hex_high, hex_low = s:byte(i), s:byte(i + 1) local hex_val if hex_high >= 48 and hex_high <= 57 then hex_val = (hex_high - 48) * 16 elseif hex_high >= 65 and hex_high <= 70 then hex_val = (hex_high - 55) * 16 elseif hex_high >= 97 and hex_high <= 102 then hex_val = (hex_high - 87) * 16 else hex_val = nil end if hex_val then if hex_low >= 48 and hex_low <= 57 then hex_val = hex_val + (hex_low - 48) elseif hex_low >= 65 and hex_low <= 70 then hex_val = hex_val + (hex_low - 55) elseif hex_low >= 97 and hex_low <= 102 then hex_val = hex_val + (hex_low - 87) else hex_val = nil end end if hex_val then r[r_index] = string.char(hex_val) r_index = r_index + 1 i = i + 2 else r[r_index] = "\\" r[r_index + 1] = "x" r_index = r_index + 2 end elseif next_byte == 117 and i + 1 <= len then -- 'u' if s:byte(i) == 123 then -- '{' local j = i + 1 while j <= len and s:byte(j) ~= 125 do -- '}' j = j + 1 end if j <= len then local data = 0 local valid = true for k = i + 1, j - 1 do local hex_byte = s:byte(k) local digit if hex_byte >= 48 and hex_byte <= 57 then digit = hex_byte - 48 elseif hex_byte >= 65 and hex_byte <= 70 then digit = hex_byte - 55 elseif hex_byte >= 97 and hex_byte <= 102 then digit = hex_byte - 87 else valid = false break end data = data * 16 + digit if data > 0x10FFFF then valid = false break end end if valid then if data < 0x80 then r[r_index] = string.char(data) r_index = r_index + 1 elseif data < 0x800 then r[r_index] = string.char(0xC0 + (data >> 6)) r[r_index + 1] = string.char(0x80 + (data & 63)) r_index = r_index + 2 elseif data < 0x10000 then r[r_index] = string.char(0xE0 + (data >> 12)) r[r_index + 1] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 2] = string.char(0x80 + (data & 63)) r_index = r_index + 3 else r[r_index] = string.char(0xF0 + (data >> 18)) r[r_index + 1] = string.char(0x80 + ((data >> 12) & 63)) r[r_index + 2] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 3] = string.char(0x80 + (data & 63)) r_index = r_index + 4 end i = j + 1 else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end elseif next_byte >= 48 and next_byte <= 57 then -- 数字 0-9 local num = next_byte - 48 local count = 1 local k = i while count < 3 and k <= len do local digit_byte = s:byte(k) if digit_byte >= 48 and digit_byte <= 55 then -- 八进制数字 0-7 num = num * 8 + (digit_byte - 48) count = count + 1 k = k + 1 else break end end if num < 256 then r[r_index] = string.char(num) r_index = r_index + 1 i = k else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = string.char(char_byte) r_index = r_index + 1 i = i + 1 end end return table.concat(r, "", 1, r_index - 1) end ht = gg.prompt({"选择脚本"}, {"/storage/emulated/0/"}, {"file"}) if not ht then return print("未选择脚本") end -- 获取选择的文件路径 local last = ht[1] -- 尝试加载脚本文件 local test, error = loadfile(last) if test == nil then -- 脚本加载失败,显示错误信息 gg.alert('脚本错误!\n\n╾╾╾╾╾⚠ 问 题 所 在 ⚠╾╾╾╾╾\n错误:\n'..error..'\n\n请修复问题之后再加密') -- 设置标志并调用主函数 lw = 1 Main() else local data = io.open(ht[1],"r"):read("*a") time=os.clock() local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data local ls = 解析(data) local 解析数据 = ls.alltoken local data = {} local str={} local num={} str['""']='""' str["''"]="''" str['[[]]']='[[]]' local key=math.random(1,10) local sey=math.random(65536,1677215) local nuy=math.random(11,99) data[1]='' local 总数=#解析数据 for k,v in ipairs(解析数据) do content = v[2] curr = v[1] if curr==292 then if not str[content]then local s={string.byte(处理转义(content),2,-2)} local len=#s for i=1,len do s[i]=table.concat({"get_sub%",(s[i]< 0 and data[#data]:sub(-1,-1)~=" " then content = " " else content = "" end end data[#data + 1] = ' ' data[#data + 1] = content end data[1]=table.concat({[[ local ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,qwq=... local char={} for i=0,255 do char[i]=ch(i) end local get_sub=setble({},{[__mod]=function(a,b) return b/]],sey,[[ end,[__tostring]=Con({}),[__metatable]=Con({})}) local opstr=setble({},{[__mod]=function(a,b) return setble({},{[__mod]=function(a,c) return b..c end,[__tostring]=Con({}),[__metatable]=Con({})}) end,[__tostring]=Con({}),[__metatable]=Con({})}) local nod=setble({},{[__index]=function(a,b) b=b(a)[1] if strub(b,-2,-1)==qwq then b=strub(b,1,-3) end local w=setble({},{[__mod]=function(q,n) b=b/]],nuy,[[ return b end,[__tostring]=Con({}),[__metatable]=Con({})}) return w%a end,[__tostring]=Con({}),[__metatable]=Con({})}) local mod=setble({},{[__index]=function(a,...) local w=... local q,z local len=1 local p=Con(a) local m=setble({},{[__mod]=function(a,b) w=w(b) while true do q,z=Next(w,q) if z then p=opstr%p%char[z>>]],key,[[] end if q==nil then break end end return p end,[__tostring]=Con({}),[__metatable]=Con({})}) return m%p end,[__tostring]=Con({}),[__metatable]=Con({})}) ]]}) local data = table.concat(data) -- 一次性连接所有代码片段 data=string.dump(load(data),true) path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) local p={string.byte(data,1,-1)} local len=#p local dey=math.random(1,255) for i=1,len do p[i]=p[i]~dey end data=table.concat(p,'\\') data=table.concat({[[ return(function(...) local m=function(...) local p=_ENV local ch=p["s".."t".."r".."i".."n".."g"]["c".."h".."a".."r"] local setble=p["s".."e".."t".."m".."e".."t".."a".."t".."a".."b".."l".."e"] local Next=p["n".."e".."x".."t"] local Con=p["t".."a".."b".."l".."e"]["c".."o".."n".."c".."a".."t"] local strub=p["s".."t".."r".."i".."n".."g"]["s".."u".."b"] local byte=p["s".."t".."r".."i".."n".."g"]['b'..'y'..'t'..'e'] local pack=p["t".."a".."b".."l".."e"]['u'..'n'..'p'..'a'..'c'..'k'] local __mod,__index,__tostring,__metatable="_".."_".."m".."o".."d","_".."_".."i".."n".."d".."e".."x","_".."_".."t".."o".."s".."t".."r".."i".."n".."g","_".."_".."m".."e".."t".."a".."t".."a".."b".."l".."e" local t=(function(t) return t[4]..t[2]..t[3]..t[1] end)({'d','o','a','l'}) local z={byte("\]],data,[[",1,-1)} local w=#z for i=1,w do z[i]=z[i]~]],dey,[[ end p[t](ch(pack(z)))(ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,".0") end return m(...) end)]]}) local logo=[[ 謊土加密 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]] .. os.date("%Y.%m.%d.%H.%M.%S") .. [[ ["謊土收费版加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]] data=table.concat({data,"([[",logo,"]])"}) data=string.dump(load(data),true,true) io.open(ht[1] .. "-[謊土加密收费版].lua", "w"):write(data) time=os.clock()-time gg.alert("加密完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密收费版].lua") local choice = gg.choice({ "☺yes(是)", "😑no(否)" }, nil, "是否压缩加密后的脚本内存") if choice == 1 then gg.alert('正在进行内存压缩') local UPLOAD_URL = "http://cx.lz.8611186.xyz/api.php" -- 定义表单请求类 local RequestFormData = { url = "", headers = {}, data = "", nfiles = 0 } function RequestFormData:new(o) o = o or {} setmetatable(o, self) self.__index = self self.boundary = "----WebKitFormBoundarymAbsr8BjeYsVXbt4" self.headers["Content-Type"] = "multipart/form-data; boundary=" .. self.boundary self.nfiles = 0 return o end function RequestFormData:setUrl(url) self.url = url end function RequestFormData:appendData(key, value) self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="' .. key .. '"\r\n\r\n' .. value .. "\r\n" end function RequestFormData:appendFile(filename, content) self.nfiles = self.nfiles + 1 self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="file"; filename="' .. filename .. '"\r\n' .. "Content-Type: application/octet-stream\r\n\r\n" .. content .. "\r\n" end function RequestFormData:makeRequest() local ending = "--" .. self.boundary .. "--\r\n" if string.sub(self.data, -#ending) ~= ending then self.data = self.data .. ending end return gg.makeRequest(self.url, self.headers, self.data) end -- 字符串提取下载链接 local function getDownUrl(str) local downurl = str:match('"downurl":"([^"]+)"') return downurl and downurl:gsub("\\/", "/") or "" end -- 提取网盘返回的关键信息 local function getUploadInfo(str) local info = {} info.code = tonumber(str:match('"code":(%d+)')) or -1 info.msg = str:match('"msg":"([^"]+)"') or "未知信息" info.name = str:match('"name":"([^"]+)"') or "" info.size = tonumber(str:match('"size":(%d+)')) or 0 info.id = str:match('"id":"([^"]+)"') or "" info.downurl = getDownUrl(str) return info end local data = io.open(ht[1].."-[謊土加密收费版].lua","r"):read("*a") time=os.clock() time=os.clock() local scriptPath = ht[1].."-[謊土加密收费版].lua" local scriptDir = scriptPath:match("(.+/)[^/]+$") local scriptName = scriptPath:match(".+/([^/]+)") if not scriptDir or not scriptName then gg.alert("错误:无法解析文件路径,请重新选择") return end -- 2. 读取文件内容 local fileHandle, readErr = io.open(scriptPath, "rb") if not fileHandle then gg.alert("错误:读取文件失败\n" .. (readErr or "未知原因")) return end local scriptContent = fileHandle:read("*a") fileHandle:close() if #scriptContent == 0 then gg.alert("错误:所选文件为空") return end -- 3. 压缩文件到网盘 gg.alert("正在压缩文件...\n文件名:" .. scriptName .. "\n文件大小:" .. #scriptContent .. "字节") local uploadRequest = RequestFormData:new() uploadRequest:setUrl(UPLOAD_URL) uploadRequest:appendFile(scriptName, scriptContent) uploadRequest:appendData("show", "1") local uploadResult = uploadRequest:makeRequest() if not uploadResult then gg.alert("错误:无法连接网盘服务器,请检查网络") return end -- 4. 解析压缩结果 local uploadInfo = getUploadInfo(uploadResult.content) if uploadResult.code ~= 200 then gg.alert("错误:压缩失败\n状态码:" .. uploadResult.code .. "\n原因:响应异常") return end if uploadInfo.code ~= 0 then gg.alert("错误:失败\n提示:" .. uploadInfo.msg) return end if uploadInfo.downurl == "" then gg.alert("错误:\n未转换成功\n请向开发者反馈") return end -- 5. 生成直接执行的加载脚本(移除文件写入逻辑) local data = string.format([[ local response = gg.makeRequest("%s") if response and response.content then local loadFunc, loadErr = load(response.content) if loadFunc then local execOk, execErr = pcall(loadFunc) if not execOk then gg.alert("脚本执行失败:" .. execErr) end else gg.alert("脚本加载失败:" .. loadErr) end else gg.alert("错误:无法获取云端脚本内容,请检查网络") end ]], uploadInfo.downurl, uploadInfo.downurl) local function 处理转义(s) local len = #s local r = {} local r_index = 1 local i = 1 while i <= len do local char_byte = s:byte(i) if char_byte == 92 and i < len then -- '\' local next_byte = s:byte(i + 1) i = i + 2 if next_byte == 97 then -- 'a' r[r_index] = string.char(7) -- \a r_index = r_index + 1 elseif next_byte == 98 then -- 'b' r[r_index] = string.char(8) -- \b r_index = r_index + 1 elseif next_byte == 102 then -- 'f' r[r_index] = string.char(12) -- \f r_index = r_index + 1 elseif next_byte == 110 then -- 'n' r[r_index] = string.char(10) -- \n r_index = r_index + 1 elseif next_byte == 114 then -- 'r' r[r_index] = string.char(13) -- \r r_index = r_index + 1 elseif next_byte == 116 then -- 't' r[r_index] = string.char(9) -- \t r_index = r_index + 1 elseif next_byte == 118 then -- 'v' r[r_index] = string.char(11) -- \v r_index = r_index + 1 elseif next_byte == 92 then -- '\\' r[r_index] = "\\" r_index = r_index + 1 elseif next_byte == 34 then -- '"' r[r_index] = "\"" r_index = r_index + 1 elseif next_byte == 39 then -- "'" r[r_index] = "'" r_index = r_index + 1 elseif next_byte == 120 and i + 1 <= len then -- 'x' local hex_high, hex_low = s:byte(i), s:byte(i + 1) local hex_val if hex_high >= 48 and hex_high <= 57 then hex_val = (hex_high - 48) * 16 elseif hex_high >= 65 and hex_high <= 70 then hex_val = (hex_high - 55) * 16 elseif hex_high >= 97 and hex_high <= 102 then hex_val = (hex_high - 87) * 16 else hex_val = nil end if hex_val then if hex_low >= 48 and hex_low <= 57 then hex_val = hex_val + (hex_low - 48) elseif hex_low >= 65 and hex_low <= 70 then hex_val = hex_val + (hex_low - 55) elseif hex_low >= 97 and hex_low <= 102 then hex_val = hex_val + (hex_low - 87) else hex_val = nil end end if hex_val then r[r_index] = string.char(hex_val) r_index = r_index + 1 i = i + 2 else r[r_index] = "\\" r[r_index + 1] = "x" r_index = r_index + 2 end elseif next_byte == 117 and i + 1 <= len then -- 'u' if s:byte(i) == 123 then -- '{' local j = i + 1 while j <= len and s:byte(j) ~= 125 do -- '}' j = j + 1 end if j <= len then local data = 0 local valid = true for k = i + 1, j - 1 do local hex_byte = s:byte(k) local digit if hex_byte >= 48 and hex_byte <= 57 then digit = hex_byte - 48 elseif hex_byte >= 65 and hex_byte <= 70 then digit = hex_byte - 55 elseif hex_byte >= 97 and hex_byte <= 102 then digit = hex_byte - 87 else valid = false break end data = data * 16 + digit if data > 0x10FFFF then valid = false break end end if valid then if data < 0x80 then r[r_index] = string.char(data) r_index = r_index + 1 elseif data < 0x800 then r[r_index] = string.char(0xC0 + (data >> 6)) r[r_index + 1] = string.char(0x80 + (data & 63)) r_index = r_index + 2 elseif data < 0x10000 then r[r_index] = string.char(0xE0 + (data >> 12)) r[r_index + 1] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 2] = string.char(0x80 + (data & 63)) r_index = r_index + 3 else r[r_index] = string.char(0xF0 + (data >> 18)) r[r_index + 1] = string.char(0x80 + ((data >> 12) & 63)) r[r_index + 2] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 3] = string.char(0x80 + (data & 63)) r_index = r_index + 4 end i = j + 1 else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end elseif next_byte >= 48 and next_byte <= 57 then -- 数字 0-9 local num = next_byte - 48 local count = 1 local k = i while count < 3 and k <= len do local digit_byte = s:byte(k) if digit_byte >= 48 and digit_byte <= 55 then -- 八进制数字 0-7 num = num * 8 + (digit_byte - 48) count = count + 1 k = k + 1 else break end end if num < 256 then r[r_index] = string.char(num) r_index = r_index + 1 i = k else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = string.char(char_byte) r_index = r_index + 1 i = i + 1 end end return table.concat(r, "", 1, r_index - 1) end local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data local ls = 解析(data) local 解析数据 = ls.alltoken local data = {} local str={} local num={} str['""']='""' str["''"]="''" str['[[]]']='[[]]' local key=math.random(1,10) local sey=math.random(65536,1677215) local nuy=math.random(11,99) data[1]='' local 总数=#解析数据 for k,v in ipairs(解析数据) do content = v[2] curr = v[1] if curr==292 then if not str[content]then local s={string.byte(处理转义(content),2,-2)} local len=#s for i=1,len do s[i]=table.concat({"get_sub%",(s[i]< 0 and data[#data]:sub(-1,-1)~=" " then content = " " else content = "" end end data[#data + 1] = ' ' data[#data + 1] = content end data[1]=table.concat({[[ local ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,qwq=... local char={} for i=0,255 do char[i]=ch(i) end local get_sub=setble({},{[__mod]=function(a,b) return b/]],sey,[[ end,[__tostring]=Con({}),[__metatable]=Con({})}) local opstr=setble({},{[__mod]=function(a,b) return setble({},{[__mod]=function(a,c) return b..c end,[__tostring]=Con({}),[__metatable]=Con({})}) end,[__tostring]=Con({}),[__metatable]=Con({})}) local nod=setble({},{[__index]=function(a,b) b=b(a)[1] if strub(b,-2,-1)==qwq then b=strub(b,1,-3) end local w=setble({},{[__mod]=function(q,n) b=b/]],nuy,[[ return b end,[__tostring]=Con({}),[__metatable]=Con({})}) return w%a end,[__tostring]=Con({}),[__metatable]=Con({})}) local mod=setble({},{[__index]=function(a,...) local w=... local q,z local len=1 local p=Con(a) local m=setble({},{[__mod]=function(a,b) w=w(b) while true do q,z=Next(w,q) if z then p=opstr%p%char[z>>]],key,[[] end if q==nil then break end end return p end,[__tostring]=Con({}),[__metatable]=Con({})}) return m%p end,[__tostring]=Con({}),[__metatable]=Con({})}) ]]}) local data = table.concat(data) -- 一次性连接所有代码片段 data=string.dump(load(data),true) path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) local p={string.byte(data,1,-1)} local len=#p local dey=math.random(1,255) for i=1,len do p[i]=p[i]~dey end data=table.concat(p,'\\') data=table.concat({[[ return(function(...) local m=function(...) local p=_ENV local ch=p["s".."t".."r".."i".."n".."g"]["c".."h".."a".."r"] local setble=p["s".."e".."t".."m".."e".."t".."a".."t".."a".."b".."l".."e"] local Next=p["n".."e".."x".."t"] local Con=p["t".."a".."b".."l".."e"]["c".."o".."n".."c".."a".."t"] local strub=p["s".."t".."r".."i".."n".."g"]["s".."u".."b"] local byte=p["s".."t".."r".."i".."n".."g"]['b'..'y'..'t'..'e'] local pack=p["t".."a".."b".."l".."e"]['u'..'n'..'p'..'a'..'c'..'k'] local __mod,__index,__tostring,__metatable="_".."_".."m".."o".."d","_".."_".."i".."n".."d".."e".."x","_".."_".."t".."o".."s".."t".."r".."i".."n".."g","_".."_".."m".."e".."t".."a".."t".."a".."b".."l".."e" local t=(function(t) return t[4]..t[2]..t[3]..t[1] end)({'d','o','a','l'}) local z={byte("\]],data,[[",1,-1)} local w=#z for i=1,w do z[i]=z[i]~]],dey,[[ end p[t](ch(pack(z)))(ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,".0") end return m(...) end)]]}) local logo=[[ 无敌de压缩 謊土加密 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]] .. os.date("%Y.%m.%d.%H.%M.%S") .. [[ ["謊土加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]] data=table.concat({data,"([[",logo,"]])"}) data=string.dump(load(data),true,true) io.open(ht[1] .. "-[謊土de压缩].lua", "w"):write(data) time=os.clock()-time gg.alert("压缩完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密收费版].lua".."-[謊土de压缩].lua") gg.playMusic("stop") elseif choice == 2 then else end gg.playMusic("stop") gg.alert('欢迎下次使用') end end -----收费版 function wdhtjmzzb() gg.alert("謊土加密至尊版") local function 处理转义(s) local len = #s local r = {} local r_index = 1 local i = 1 while i <= len do local char_byte = s:byte(i) if char_byte == 92 and i < len then -- '\' local next_byte = s:byte(i + 1) i = i + 2 if next_byte == 97 then -- 'a' r[r_index] = string.char(7) -- \a r_index = r_index + 1 elseif next_byte == 98 then -- 'b' r[r_index] = string.char(8) -- \b r_index = r_index + 1 elseif next_byte == 102 then -- 'f' r[r_index] = string.char(12) -- \f r_index = r_index + 1 elseif next_byte == 110 then -- 'n' r[r_index] = string.char(10) -- \n r_index = r_index + 1 elseif next_byte == 114 then -- 'r' r[r_index] = string.char(13) -- \r r_index = r_index + 1 elseif next_byte == 116 then -- 't' r[r_index] = string.char(9) -- \t r_index = r_index + 1 elseif next_byte == 118 then -- 'v' r[r_index] = string.char(11) -- \v r_index = r_index + 1 elseif next_byte == 92 then -- '\\' r[r_index] = "\\" r_index = r_index + 1 elseif next_byte == 34 then -- '"' r[r_index] = "\"" r_index = r_index + 1 elseif next_byte == 39 then -- "'" r[r_index] = "'" r_index = r_index + 1 elseif next_byte == 120 and i + 1 <= len then -- 'x' local hex_high, hex_low = s:byte(i), s:byte(i + 1) local hex_val if hex_high >= 48 and hex_high <= 57 then hex_val = (hex_high - 48) * 16 elseif hex_high >= 65 and hex_high <= 70 then hex_val = (hex_high - 55) * 16 elseif hex_high >= 97 and hex_high <= 102 then hex_val = (hex_high - 87) * 16 else hex_val = nil end if hex_val then if hex_low >= 48 and hex_low <= 57 then hex_val = hex_val + (hex_low - 48) elseif hex_low >= 65 and hex_low <= 70 then hex_val = hex_val + (hex_low - 55) elseif hex_low >= 97 and hex_low <= 102 then hex_val = hex_val + (hex_low - 87) else hex_val = nil end end if hex_val then r[r_index] = string.char(hex_val) r_index = r_index + 1 i = i + 2 else r[r_index] = "\\" r[r_index + 1] = "x" r_index = r_index + 2 end elseif next_byte == 117 and i + 1 <= len then -- 'u' if s:byte(i) == 123 then -- '{' local j = i + 1 while j <= len and s:byte(j) ~= 125 do -- '}' j = j + 1 end if j <= len then local data = 0 local valid = true for k = i + 1, j - 1 do local hex_byte = s:byte(k) local digit if hex_byte >= 48 and hex_byte <= 57 then digit = hex_byte - 48 elseif hex_byte >= 65 and hex_byte <= 70 then digit = hex_byte - 55 elseif hex_byte >= 97 and hex_byte <= 102 then digit = hex_byte - 87 else valid = false break end data = data * 16 + digit if data > 0x10FFFF then valid = false break end end if valid then if data < 0x80 then r[r_index] = string.char(data) r_index = r_index + 1 elseif data < 0x800 then r[r_index] = string.char(0xC0 + (data >> 6)) r[r_index + 1] = string.char(0x80 + (data & 63)) r_index = r_index + 2 elseif data < 0x10000 then r[r_index] = string.char(0xE0 + (data >> 12)) r[r_index + 1] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 2] = string.char(0x80 + (data & 63)) r_index = r_index + 3 else r[r_index] = string.char(0xF0 + (data >> 18)) r[r_index + 1] = string.char(0x80 + ((data >> 12) & 63)) r[r_index + 2] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 3] = string.char(0x80 + (data & 63)) r_index = r_index + 4 end i = j + 1 else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end elseif next_byte >= 48 and next_byte <= 57 then -- 数字 0-9 local num = next_byte - 48 local count = 1 local k = i while count < 3 and k <= len do local digit_byte = s:byte(k) if digit_byte >= 48 and digit_byte <= 55 then -- 八进制数字 0-7 num = num * 8 + (digit_byte - 48) count = count + 1 k = k + 1 else break end end if num < 256 then r[r_index] = string.char(num) r_index = r_index + 1 i = k else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = string.char(char_byte) r_index = r_index + 1 i = i + 1 end end return table.concat(r, "", 1, r_index - 1) end ht = gg.prompt({"选择脚本"}, {"/storage/emulated/0/"}, {"file"}) if not ht then return print("未选择脚本") end -- 获取选择的文件路径 local last = ht[1] -- 尝试加载脚本文件 local test, error = loadfile(last) if test == nil then -- 脚本加载失败,显示错误信息 gg.alert('脚本错误!\n\n╾╾╾╾╾⚠ 问 题 所 在 ⚠╾╾╾╾╾\n错误:\n'..error..'\n\n请修复问题之后再加密') -- 设置标志并调用主函数 lw = 1 Main() else local data = io.open(ht[1],"r"):read("*a") time=os.clock() local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data local ls = 解析(data) local 解析数据 = ls.alltoken local data = {} local str={} local num={} str['""']='""' str["''"]="''" str['[[]]']='[[]]' local key=math.random(1,10) local sey=math.random(65536,1677215) local nuy=math.random(11,99) data[1]='' local 总数=#解析数据 for k,v in ipairs(解析数据) do content = v[2] curr = v[1] if curr==292 then if not str[content]then local s={string.byte(处理转义(content),2,-2)} local len=#s for i=1,len do s[i]=table.concat({"get_sub%",(s[i]< 0 and data[#data]:sub(-1,-1)~=" " then content = " " else content = "" end end data[#data + 1] = ' ' data[#data + 1] = content end data[1]=table.concat({[[ local ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,qwq=... local char={} for i=0,255 do char[i]=ch(i) end local get_sub=setble({},{[__mod]=function(a,b) return b/]],sey,[[ end,[__tostring]=Con({}),[__metatable]=Con({})}) local opstr=setble({},{[__mod]=function(a,b) return setble({},{[__mod]=function(a,c) return b..c end,[__tostring]=Con({}),[__metatable]=Con({})}) end,[__tostring]=Con({}),[__metatable]=Con({})}) local nod=setble({},{[__index]=function(a,b) b=b(a)[1] if strub(b,-2,-1)==qwq then b=strub(b,1,-3) end local w=setble({},{[__mod]=function(q,n) b=b/]],nuy,[[ return b end,[__tostring]=Con({}),[__metatable]=Con({})}) return w%a end,[__tostring]=Con({}),[__metatable]=Con({})}) local mod=setble({},{[__index]=function(a,...) local w=... local q,z local len=1 local p=Con(a) local m=setble({},{[__mod]=function(a,b) w=w(b) while true do q,z=Next(w,q) if z then p=opstr%p%char[z>>]],key,[[] end if q==nil then break end end return p end,[__tostring]=Con({}),[__metatable]=Con({})}) return m%p end,[__tostring]=Con({}),[__metatable]=Con({})}) ]]}) local data = table.concat(data) -- 一次性连接所有代码片段 local function str_enc(s) return s:gsub(".", function(c) return string.format('\\x%02X', c:byte()) end) end local A=math.random(1,255) local ls = 解析(data) local 解析数据 = ls.alltoken local data = "" local content = "" local curr = -1 local later_t = -1 for k,v in ipairs(解析数据) do content = v[2] curr = v[1] if curr==292 then if content=="''" then content="''" goto String end if content=='""' then content='""' goto String end if string.find(content,'\\x')then goto String end local o=#content local c = content:sub(2, o - 1):gsub('\\\\','\\'):gsub("\\n","\n") local b = c:gsub('.', function(c) return str_enc(string.char(c:byte() ~ A)) end) content="(xor['"..b.."'])" ::String:: elseif curr==290 then local b = content:gsub('.', function(c) return str_enc(string.char(c:byte() ~ A)) end) content="(Tonumber(xor['"..b.."']))" end if RESER[curr] and ((curr >=257 and curr <=278) or (curr>=290 and curr<=293)) then later_t = (解析数据[k+1] and 解析数据[k+1] or {-1})[1] if RESER[later_t] and ((later_t >=257 and later_t <=278) or (later_t>=290 and later_t<=293)) then content = content.." " end else if curr==666 then if data:sub(-1,-1)~=" " then content = " " else content = "" end end end data = data..content end data=[[local Tabchar = {} local tatable=_ENV['s'..'e'..'t'..'m'..'e'..'t'..'a'..'t'..'a'..'b'..'l'..'e'] local String=_ENV['s'..'t'..'r'..'i'..'n'..'g'] local char=String['c'..'h'..'a'..'r'] local Gsub=String['g'..'s'..'u'..'b'] local Byte=String['b'..'y'..'t'..'e'] local Tonumber=_ENV['t'..'o'..'n'..'u'..'m'..'b'..'e'..'r'] for i = 0, 255 do Tabchar[i] = char(i) end local xor = tatable({}, { __index = function(_, ...) return Gsub(..., '.', function(c) return Tabchar[Byte(c) ~ ]]..A..[[] end) end })]]..data data=string.dump(load(data),true) path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) local p={string.byte(data,1,-1)} local len=#p local dey=math.random(1,255) for i=1,len do p[i]=p[i]~dey end data=table.concat(p,'\\') data=table.concat({[[ return(function(...) local m=function(...) local p=_ENV local ch=p["s".."t".."r".."i".."n".."g"]["c".."h".."a".."r"] local setble=p["s".."e".."t".."m".."e".."t".."a".."t".."a".."b".."l".."e"] local Next=p["n".."e".."x".."t"] local Con=p["t".."a".."b".."l".."e"]["c".."o".."n".."c".."a".."t"] local strub=p["s".."t".."r".."i".."n".."g"]["s".."u".."b"] local byte=p["s".."t".."r".."i".."n".."g"]['b'..'y'..'t'..'e'] local pack=p["t".."a".."b".."l".."e"]['u'..'n'..'p'..'a'..'c'..'k'] local __mod,__index,__tostring,__metatable="_".."_".."m".."o".."d","_".."_".."i".."n".."d".."e".."x","_".."_".."t".."o".."s".."t".."r".."i".."n".."g","_".."_".."m".."e".."t".."a".."t".."a".."b".."l".."e" local t=(function(t) return t[4]..t[2]..t[3]..t[1] end)({'d','o','a','l'}) local z={byte("\]],data,[[",1,-1)} local w=#z for i=1,w do z[i]=z[i]~]],dey,[[ end p[t](ch(pack(z)))(ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,".0") end return m(...) end)]]}) local logo=[[ 謊土加密*-*至尊版 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]] .. os.date("%Y.%m.%d.%H.%M.%S") .. [[ ["謊土至尊版加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]] data=table.concat({data,"([[",logo,"]])"}) data=string.dump(load(data),true,true) io.open(ht[1] .. "-[謊土加密至尊版].lua", "w"):write(data) time=os.clock()-time gg.alert("加密完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密至尊版].lua") local choice = gg.choice({ "☺yes(是)", "😑no(否)" }, nil, "是否压缩加密后的脚本内存") if choice == 1 then gg.alert('正在进行内存压缩') local UPLOAD_URL = "http://cx.lz.8611186.xyz/api.php" -- 定义表单请求类 local RequestFormData = { url = "", headers = {}, data = "", nfiles = 0 } function RequestFormData:new(o) o = o or {} setmetatable(o, self) self.__index = self self.boundary = "----WebKitFormBoundarymAbsr8BjeYsVXbt4" self.headers["Content-Type"] = "multipart/form-data; boundary=" .. self.boundary self.nfiles = 0 return o end function RequestFormData:setUrl(url) self.url = url end function RequestFormData:appendData(key, value) self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="' .. key .. '"\r\n\r\n' .. value .. "\r\n" end function RequestFormData:appendFile(filename, content) self.nfiles = self.nfiles + 1 self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="file"; filename="' .. filename .. '"\r\n' .. "Content-Type: application/octet-stream\r\n\r\n" .. content .. "\r\n" end function RequestFormData:makeRequest() local ending = "--" .. self.boundary .. "--\r\n" if string.sub(self.data, -#ending) ~= ending then self.data = self.data .. ending end return gg.makeRequest(self.url, self.headers, self.data) end -- 字符串提取下载链接 local function getDownUrl(str) local downurl = str:match('"downurl":"([^"]+)"') return downurl and downurl:gsub("\\/", "/") or "" end -- 提取网盘返回的关键信息 local function getUploadInfo(str) local info = {} info.code = tonumber(str:match('"code":(%d+)')) or -1 info.msg = str:match('"msg":"([^"]+)"') or "未知信息" info.name = str:match('"name":"([^"]+)"') or "" info.size = tonumber(str:match('"size":(%d+)')) or 0 info.id = str:match('"id":"([^"]+)"') or "" info.downurl = getDownUrl(str) return info end local data = io.open(ht[1].."-[謊土加密至尊版].lua","r"):read("*a") time=os.clock() time=os.clock() local scriptPath = ht[1].."-[謊土加密至尊版].lua" local scriptDir = scriptPath:match("(.+/)[^/]+$") local scriptName = scriptPath:match(".+/([^/]+)") if not scriptDir or not scriptName then gg.alert("错误:无法解析文件路径,请重新选择") return end -- 2. 读取文件内容 local fileHandle, readErr = io.open(scriptPath, "rb") if not fileHandle then gg.alert("错误:读取文件失败\n" .. (readErr or "未知原因")) return end local scriptContent = fileHandle:read("*a") fileHandle:close() if #scriptContent == 0 then gg.alert("错误:所选文件为空") return end -- 3. 压缩文件到网盘 gg.alert("正在压缩文件...\n文件名:" .. scriptName .. "\n文件大小:" .. #scriptContent .. "字节") local uploadRequest = RequestFormData:new() uploadRequest:setUrl(UPLOAD_URL) uploadRequest:appendFile(scriptName, scriptContent) uploadRequest:appendData("show", "1") local uploadResult = uploadRequest:makeRequest() if not uploadResult then gg.alert("错误:无法连接网盘服务器,请检查网络") return end -- 4. 解析压缩结果 local uploadInfo = getUploadInfo(uploadResult.content) if uploadResult.code ~= 200 then gg.alert("错误:压缩失败\n状态码:" .. uploadResult.code .. "\n原因:响应异常") return end if uploadInfo.code ~= 0 then gg.alert("错误:失败\n提示:" .. uploadInfo.msg) return end if uploadInfo.downurl == "" then gg.alert("错误:\n未转换成功\n请向开发者反馈") return end -- 5. 生成直接执行的加载脚本(移除文件写入逻辑) local data = string.format([[ local response = gg.makeRequest("%s") if response and response.content then local loadFunc, loadErr = load(response.content) if loadFunc then local execOk, execErr = pcall(loadFunc) if not execOk then gg.alert("脚本执行失败:" .. execErr) end else gg.alert("脚本加载失败:" .. loadErr) end else gg.alert("错误:无法获取云端脚本内容,请检查网络") end ]], uploadInfo.downurl, uploadInfo.downurl) local function 处理转义(s) local len = #s local r = {} local r_index = 1 local i = 1 while i <= len do local char_byte = s:byte(i) if char_byte == 92 and i < len then -- '\' local next_byte = s:byte(i + 1) i = i + 2 if next_byte == 97 then -- 'a' r[r_index] = string.char(7) -- \a r_index = r_index + 1 elseif next_byte == 98 then -- 'b' r[r_index] = string.char(8) -- \b r_index = r_index + 1 elseif next_byte == 102 then -- 'f' r[r_index] = string.char(12) -- \f r_index = r_index + 1 elseif next_byte == 110 then -- 'n' r[r_index] = string.char(10) -- \n r_index = r_index + 1 elseif next_byte == 114 then -- 'r' r[r_index] = string.char(13) -- \r r_index = r_index + 1 elseif next_byte == 116 then -- 't' r[r_index] = string.char(9) -- \t r_index = r_index + 1 elseif next_byte == 118 then -- 'v' r[r_index] = string.char(11) -- \v r_index = r_index + 1 elseif next_byte == 92 then -- '\\' r[r_index] = "\\" r_index = r_index + 1 elseif next_byte == 34 then -- '"' r[r_index] = "\"" r_index = r_index + 1 elseif next_byte == 39 then -- "'" r[r_index] = "'" r_index = r_index + 1 elseif next_byte == 120 and i + 1 <= len then -- 'x' local hex_high, hex_low = s:byte(i), s:byte(i + 1) local hex_val if hex_high >= 48 and hex_high <= 57 then hex_val = (hex_high - 48) * 16 elseif hex_high >= 65 and hex_high <= 70 then hex_val = (hex_high - 55) * 16 elseif hex_high >= 97 and hex_high <= 102 then hex_val = (hex_high - 87) * 16 else hex_val = nil end if hex_val then if hex_low >= 48 and hex_low <= 57 then hex_val = hex_val + (hex_low - 48) elseif hex_low >= 65 and hex_low <= 70 then hex_val = hex_val + (hex_low - 55) elseif hex_low >= 97 and hex_low <= 102 then hex_val = hex_val + (hex_low - 87) else hex_val = nil end end if hex_val then r[r_index] = string.char(hex_val) r_index = r_index + 1 i = i + 2 else r[r_index] = "\\" r[r_index + 1] = "x" r_index = r_index + 2 end elseif next_byte == 117 and i + 1 <= len then -- 'u' if s:byte(i) == 123 then -- '{' local j = i + 1 while j <= len and s:byte(j) ~= 125 do -- '}' j = j + 1 end if j <= len then local data = 0 local valid = true for k = i + 1, j - 1 do local hex_byte = s:byte(k) local digit if hex_byte >= 48 and hex_byte <= 57 then digit = hex_byte - 48 elseif hex_byte >= 65 and hex_byte <= 70 then digit = hex_byte - 55 elseif hex_byte >= 97 and hex_byte <= 102 then digit = hex_byte - 87 else valid = false break end data = data * 16 + digit if data > 0x10FFFF then valid = false break end end if valid then if data < 0x80 then r[r_index] = string.char(data) r_index = r_index + 1 elseif data < 0x800 then r[r_index] = string.char(0xC0 + (data >> 6)) r[r_index + 1] = string.char(0x80 + (data & 63)) r_index = r_index + 2 elseif data < 0x10000 then r[r_index] = string.char(0xE0 + (data >> 12)) r[r_index + 1] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 2] = string.char(0x80 + (data & 63)) r_index = r_index + 3 else r[r_index] = string.char(0xF0 + (data >> 18)) r[r_index + 1] = string.char(0x80 + ((data >> 12) & 63)) r[r_index + 2] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 3] = string.char(0x80 + (data & 63)) r_index = r_index + 4 end i = j + 1 else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end elseif next_byte >= 48 and next_byte <= 57 then -- 数字 0-9 local num = next_byte - 48 local count = 1 local k = i while count < 3 and k <= len do local digit_byte = s:byte(k) if digit_byte >= 48 and digit_byte <= 55 then -- 八进制数字 0-7 num = num * 8 + (digit_byte - 48) count = count + 1 k = k + 1 else break end end if num < 256 then r[r_index] = string.char(num) r_index = r_index + 1 i = k else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = string.char(char_byte) r_index = r_index + 1 i = i + 1 end end return table.concat(r, "", 1, r_index - 1) end local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data local ls = 解析(data) local 解析数据 = ls.alltoken local data = {} local str={} local num={} str['""']='""' str["''"]="''" str['[[]]']='[[]]' local key=math.random(1,10) local sey=math.random(65536,1677215) local nuy=math.random(11,99) data[1]='' local 总数=#解析数据 for k,v in ipairs(解析数据) do content = v[2] curr = v[1] if curr==292 then if not str[content]then local s={string.byte(处理转义(content),2,-2)} local len=#s for i=1,len do s[i]=table.concat({"get_sub%",(s[i]< 0 and data[#data]:sub(-1,-1)~=" " then content = " " else content = "" end end data[#data + 1] = ' ' data[#data + 1] = content end data[1]=table.concat({[[ local ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,qwq=... local char={} for i=0,255 do char[i]=ch(i) end local get_sub=setble({},{[__mod]=function(a,b) return b/]],sey,[[ end,[__tostring]=Con({}),[__metatable]=Con({})}) local opstr=setble({},{[__mod]=function(a,b) return setble({},{[__mod]=function(a,c) return b..c end,[__tostring]=Con({}),[__metatable]=Con({})}) end,[__tostring]=Con({}),[__metatable]=Con({})}) local nod=setble({},{[__index]=function(a,b) b=b(a)[1] if strub(b,-2,-1)==qwq then b=strub(b,1,-3) end local w=setble({},{[__mod]=function(q,n) b=b/]],nuy,[[ return b end,[__tostring]=Con({}),[__metatable]=Con({})}) return w%a end,[__tostring]=Con({}),[__metatable]=Con({})}) local mod=setble({},{[__index]=function(a,...) local w=... local q,z local len=1 local p=Con(a) local m=setble({},{[__mod]=function(a,b) w=w(b) while true do q,z=Next(w,q) if z then p=opstr%p%char[z>>]],key,[[] end if q==nil then break end end return p end,[__tostring]=Con({}),[__metatable]=Con({})}) return m%p end,[__tostring]=Con({}),[__metatable]=Con({})}) ]]}) local data = table.concat(data) -- 一次性连接所有代码片段 data=string.dump(load(data),true) path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) local p={string.byte(data,1,-1)} local len=#p local dey=math.random(1,255) for i=1,len do p[i]=p[i]~dey end data=table.concat(p,'\\') data=table.concat({[[ return(function(...) local m=function(...) local p=_ENV local ch=p["s".."t".."r".."i".."n".."g"]["c".."h".."a".."r"] local setble=p["s".."e".."t".."m".."e".."t".."a".."t".."a".."b".."l".."e"] local Next=p["n".."e".."x".."t"] local Con=p["t".."a".."b".."l".."e"]["c".."o".."n".."c".."a".."t"] local strub=p["s".."t".."r".."i".."n".."g"]["s".."u".."b"] local byte=p["s".."t".."r".."i".."n".."g"]['b'..'y'..'t'..'e'] local pack=p["t".."a".."b".."l".."e"]['u'..'n'..'p'..'a'..'c'..'k'] local __mod,__index,__tostring,__metatable="_".."_".."m".."o".."d","_".."_".."i".."n".."d".."e".."x","_".."_".."t".."o".."s".."t".."r".."i".."n".."g","_".."_".."m".."e".."t".."a".."t".."a".."b".."l".."e" local t=(function(t) return t[4]..t[2]..t[3]..t[1] end)({'d','o','a','l'}) local z={byte("\]],data,[[",1,-1)} local w=#z for i=1,w do z[i]=z[i]~]],dey,[[ end p[t](ch(pack(z)))(ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,".0") end return m(...) end)]]}) local logo=[[ 无敌de压缩 謊土加密 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]] .. os.date("%Y.%m.%d.%H.%M.%S") .. [[ ["謊土加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]] data=table.concat({data,"([[",logo,"]])"}) data=string.dump(load(data),true,true) io.open(ht[1] .. "-[謊土de压缩].lua", "w"):write(data) time=os.clock()-time gg.alert("压缩完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密至尊版].lua".."-[謊土de压缩].lua") gg.playMusic("stop") elseif choice == 2 then else end gg.playMusic("stop") gg.alert('欢迎下次使用') end end ------至尊版 function jmxf1() gg.alert('高兼容.') local error = error -- 选择脚本文件 ht = gg.prompt({"选择脚本"}, {"/storage/emulated/0/"}, {"file"}) if not ht then return print("未选择脚本") end -- 获取选择的文件路径 local last = ht[1] -- 尝试加载脚本文件 local test, error = loadfile(last) if test == nil then -- 脚本加载失败,显示错误信息 gg.alert('脚本错误!\n\n╾╾╾╾╾⚠ 问 题 所 在 ⚠╾╾╾╾╾\n错误:\n'..error..'\n\n请修复问题之后再加密') -- 设置标志并调用主函数 lw = 1 Main() else local data = io.open(ht[1],"r"):read("*a") gg.alert('读取成功 现在开始加密.') time=os.clock() UI=[=[ ——————————————— 謊土加密 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]=] .. os.date("%Y.%m.%d.%H.%M.%S") .. [=[ ["謊土攻坚版加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]=] local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end -----数值处理 gg.alert('数值处理成功 已加密10%.') Numto16=function(num) if type(num)~="number" or num>255 or num<0 then return num else local sp=string.format("%x",num) if #sp==1 then sp="0"..sp end return "\\x"..sp end end toLuaHex=function(str) return(string.gsub(str,".",function(x) return(Numto16(string.byte(x))) end)) end To_16=function(txt) local sp=string.format("%x",txt) if #sp==1 then sp="0"..sp end return "\\x"..sp end function To__16(str) return(str:gsub(".",function(x) return(To_16(string.byte(x))) end)) end function RandomStr(len) len=len or math.random(4,6) local str = "" str = string.char(math.random(65, 90)) for num = 1, len - 1 do local number = math.random(1, 3) if number == 1 then str = str .. string.char(math.random(65, 90)) elseif number == 2 then str = str .. string.char(math.random(97, 122)) elseif number == 3 then str = str .. string.char(math.random(48, 57)) end end return str end function suiji() local ret,rec ret="" for i=1,3 do rec=string.char(math.random(150,190)) ret=ret..rec end weizhi="�" ret=weizhi..ret..weizhi..string.char(math.random(150,190))..weizhi return ret end ___name={} function _Random(Table_name,Random,...) local xxxx=... if not ___name[Table_name] then _ENV[Table_name]={} ___name[Table_name]=true end while(true)do x=_ENV[Random](xxxx) if not _ENV[Table_name][x] then _ENV[Table_name][x]=x str=x break end end return(str) end Table_name=RandomStr() Dec_name=RandomStr() _ENV["字符串"]={} String={} table.insert(String,"local "..Table_name.."={}") htnb={} local KEY=math.random(1,32) function NZF_Str(STR) if(STR=="")then;return("\034\034")end Str=STR STRING=_ENV["字符串"][STR] if(STRING)then;return(STRING)end ascll={string.byte(STR,1,-1)} res={} Key=math.random(128,255) table.insert(htnb,To_16(Key)) for index,value in ipairs(ascll) do value=value~(Key~KEY) value=To_16(value) table.insert(res,value) end Name=Table_name.."['".._Random("乱码","suiji").."']" table.insert(String,Name.."=(function();return(Str_dec('"..table.concat(res).."'));end)()") STR="("..Dec_name.."("..Name.."))" _ENV["字符串"][Str]=STR return STR end Enc_10Num=function(num) return("Char['"..To_16(num).."']") end -- 标准库 fuc = { ["gg"] = 2, ["os"] = 2, ["io"] = 2, ["string"] = 2, ["math"] = 2, ["table"] = 2, ["debug"] = 2, ["bit32"] = 2, ["utf8"] = 2, } Bzk_Str = function(data) for v, s in pairs(_ENV) do if type(s) == "table" and fuc[v] then for i in pairs(s) do data = data:gsub(v .. "%." .. i .. "%(", "_ENV[\34" .. v .. "\34]" .. "[\34" .. i .. "\34](") data = data:gsub(v .. "%." .. i .. "%)", "_ENV[\34" .. v .. "\34]" .. "[\34" .. i .. "\34])") end end end return data end local Min_num = function(...) local arm = {...} local num = nil for i, v in pairs(arm) do if v ~= nil then if not num then num = v elseif num > v then num = v end end end return num end Enc_Str=function(data) local gr = {} repeat local s1, ss1, x1, xx1, str s1 = string.find(data, "\034")--单引号 ss1 = string.find(data, "\039")--双引号 x1 = string.find(data, "%[[=]*%[")--中括号 xx1 = string.find(data, "%-%-")--注释 str = Min_num(s1, ss1, x1, xx1) if str == nil then break end if str == s1 then data = data:gsub("(.-)(\034.-\034)",function(t1, t2) gr[#gr + 1] = t1 t2 = string.gsub(t2, "\\\\","\\092") t2 = string.gsub(t2, "\\\034", "\\034") if t2:sub(-1, -1) ~= "\034" then return t2 end t3 = load("return "..t2) if not t3 then gg.alert("\034加密失败\n"..t2) os.exit() end gr[#gr + 1] = NZF_Str(t3(),true) return "" end, 1) elseif str == ss1 then data = data:gsub("(.-)(\039.-\039)",function(t1, t2) gr[#gr + 1] = t1 t2 = string.gsub(t2, "\\\\","\\092") t2 = string.gsub(t2, "\\\039", "\\039") if t2:sub(-1, -1) ~= "\039" then return t2 end t3 = load("return "..t2) if not t3 then gg.alert("\039加密失败\n"..t2) os.exit() end gr[#gr + 1] = NZF_Str(t3(),true) return "" end, 1) elseif str == x1 then local g1 = string.match(data,"%[([=]*)%[") data=data:gsub("(.-)(%["..g1.."%[.-%]"..g1.."%])",function(t1, t2) gr[#gr + 1] = t1 t3 = load("return "..t2) if not t3 then gg.alert("[[加密失败\n"..t2) os.exit() end gr[#gr + 1] = NZF_Str(t3(),true) return "" end, 1) elseif str == xx1 then d1, d2, d3, d4 = string.find(data, "%-%-(%[([=]*)%[)") if d1 == xx1 then data = string.gsub(data, "(.-)%-%-%[" .. d4 .. "%[.-%]" .. d4 .. "%]", function(txt1) gr[#gr + 1] = txt1 return " " end, 1) else data = string.gsub(data, "(.-)%-%-[^\n]*", function(txt1) gr[#gr + 1] = txt1 return "" end, 1) end else break end until not str gr[#gr+1]=data gr = table.concat(gr):gsub("return%s+end","return 0\nend") gr = gr:gsub("%-%-%[%[.-%]%]",""):gsub("%-%-[^\n]+", "") return gr end data=Bzk_Str(data)--标准库 data=Enc_Str(data)--字符串 HT={} table.insert(HT,[=[ local Char={} local __pairs,string__byte,string__char=pairs,string.byte,string.char for index=#Char,255 do Char[index]=string__char(index) Char[(Char[index])]=index end local INDEX=#Char/#Char ]=]) table.insert(HT,"local htnb='"..table.concat(htnb).."'") table.insert(HT,[=[ local Str_dec=function(str) local Res={} for index,value in __pairs({string__byte(str,1,#str)}) do Res[index]=(value~(]=]..Enc_10Num(KEY)..[=[~string__byte(htnb,INDEX))) end INDEX=INDEX+#htnb/#htnb return(Res) end ]=]) table.insert(HT,"local "..Dec_name..[=[=function(Table) local res="" for index,value in __pairs(Table) do res=res..Char[(value)] end return(res) end ]=]) local Goto=function(num) num=num or math.random( 4,10) hg = "" return ";if(Char['ht'])then;" .. hg:rep(num * 2) .. "::hg::;end;" end ___=function(Table) res="" for i, v in pairs(Table) do res=res..v..Goto() end return res end String=true and ___(String) or table.concat(String,"\n") table.insert(HT,String) HT=table.concat(HT,"\n") data=HT..data gg.alert('防御载入成功 已加密40%') local value_var = math.random(130,140) -- 虚拟化的配置 FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data data="local enc_at = (function()\nlocal data_enc = \"enc_slepwtl\"\n"..data.."\nend)()" local fa = string.rep( '(function() ', 1) local fb = string.rep(' end)()', 1) data = fa .. data .. fb data="(function(...)\nlocal main=(function(...)\n"..data.."\nend)(_ENV)\nend)([===["..UI.."]===])" data=string.dump(load(data),true) gg.alert('虚拟化覆盖成功 已加密50%') path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) gg.alert('字节码处理成功 已加密60%') local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) gg.alert('JMP处理成功 已加密80%') function strenc(str) local t = {string.byte(str, 1, -1)} for i = 1, #t do t[i] = string.format('\\x%02x', t[i]) end return '"' .. table.concat(t) .. '"' end data = strenc ( data ) --转16进制 data=[[ gg_getFile=gg.getFile _ENV["l".."o".."a".."d"](]]..data..[[)()]] data = string.dump(load(data), true) gg.alert('索引保护成功 已加密95%') logo=[=[ —————————————— [謊土加密] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]=] .. os.date("%Y.%m.%d.%H.%M.%S") .. [=[ [ 謊土加密攻坚版 *-*-*-*-*-*-*-*-*-* [安全] [稳定] [有效] ] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]=] time=os.clock()-time io.open(ht[1] .. "-[謊土加密攻坚版].lua", "w"):write(data..logo) gg.alert("加密完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密攻坚版].lua") local choice = gg.choice({ "☺yes(是)", "😑no(否)" }, nil, "是否压缩加密后的脚本内存") if choice == 1 then gg.alert('正在进行内存压缩') local UPLOAD_URL = "http://cx.lz.8611186.xyz/api.php" -- 定义表单请求类 local RequestFormData = { url = "", headers = {}, data = "", nfiles = 0 } function RequestFormData:new(o) o = o or {} setmetatable(o, self) self.__index = self self.boundary = "----WebKitFormBoundarymAbsr8BjeYsVXbt4" self.headers["Content-Type"] = "multipart/form-data; boundary=" .. self.boundary self.nfiles = 0 return o end function RequestFormData:setUrl(url) self.url = url end function RequestFormData:appendData(key, value) self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="' .. key .. '"\r\n\r\n' .. value .. "\r\n" end function RequestFormData:appendFile(filename, content) self.nfiles = self.nfiles + 1 self.data = self.data .. "--" .. self.boundary .. "\r\n" .. 'Content-Disposition: form-data; name="file"; filename="' .. filename .. '"\r\n' .. "Content-Type: application/octet-stream\r\n\r\n" .. content .. "\r\n" end function RequestFormData:makeRequest() local ending = "--" .. self.boundary .. "--\r\n" if string.sub(self.data, -#ending) ~= ending then self.data = self.data .. ending end return gg.makeRequest(self.url, self.headers, self.data) end -- 字符串提取下载链接 local function getDownUrl(str) local downurl = str:match('"downurl":"([^"]+)"') return downurl and downurl:gsub("\\/", "/") or "" end -- 提取网盘返回的关键信息 local function getUploadInfo(str) local info = {} info.code = tonumber(str:match('"code":(%d+)')) or -1 info.msg = str:match('"msg":"([^"]+)"') or "未知信息" info.name = str:match('"name":"([^"]+)"') or "" info.size = tonumber(str:match('"size":(%d+)')) or 0 info.id = str:match('"id":"([^"]+)"') or "" info.downurl = getDownUrl(str) return info end local data = io.open(ht[1].."-[謊土加密攻坚版].lua","r"):read("*a") time=os.clock() time=os.clock() local scriptPath = ht[1].."-[謊土加密攻坚版].lua" local scriptDir = scriptPath:match("(.+/)[^/]+$") local scriptName = scriptPath:match(".+/([^/]+)") if not scriptDir or not scriptName then gg.alert("错误:无法解析文件路径,请重新选择") return end -- 2. 读取文件内容 local fileHandle, readErr = io.open(scriptPath, "rb") if not fileHandle then gg.alert("错误:读取文件失败\n" .. (readErr or "未知原因")) return end local scriptContent = fileHandle:read("*a") fileHandle:close() if #scriptContent == 0 then gg.alert("错误:所选文件为空") return end -- 3. 压缩文件到网盘 gg.alert("正在压缩文件...\n文件名:" .. scriptName .. "\n文件大小:" .. #scriptContent .. "字节") local uploadRequest = RequestFormData:new() uploadRequest:setUrl(UPLOAD_URL) uploadRequest:appendFile(scriptName, scriptContent) uploadRequest:appendData("show", "1") local uploadResult = uploadRequest:makeRequest() if not uploadResult then gg.alert("错误:无法连接网盘服务器,请检查网络") return end -- 4. 解析压缩结果 local uploadInfo = getUploadInfo(uploadResult.content) if uploadResult.code ~= 200 then gg.alert("错误:压缩失败\n状态码:" .. uploadResult.code .. "\n原因:响应异常") return end if uploadInfo.code ~= 0 then gg.alert("错误:失败\n提示:" .. uploadInfo.msg) return end if uploadInfo.downurl == "" then gg.alert("错误:\n未转换成功\n请向开发者反馈") return end -- 5. 生成直接执行的加载脚本(移除文件写入逻辑) local data = string.format([[ local response = gg.makeRequest("%s") if response and response.content then local loadFunc, loadErr = load(response.content) if loadFunc then local execOk, execErr = pcall(loadFunc) if not execOk then gg.alert("脚本执行失败:" .. execErr) end else gg.alert("脚本加载失败:" .. loadErr) end else gg.alert("错误:无法获取云端脚本内容,请检查网络") end ]], uploadInfo.downurl, uploadInfo.downurl) local function 处理转义(s) local len = #s local r = {} local r_index = 1 local i = 1 while i <= len do local char_byte = s:byte(i) if char_byte == 92 and i < len then -- '\' local next_byte = s:byte(i + 1) i = i + 2 if next_byte == 97 then -- 'a' r[r_index] = string.char(7) -- \a r_index = r_index + 1 elseif next_byte == 98 then -- 'b' r[r_index] = string.char(8) -- \b r_index = r_index + 1 elseif next_byte == 102 then -- 'f' r[r_index] = string.char(12) -- \f r_index = r_index + 1 elseif next_byte == 110 then -- 'n' r[r_index] = string.char(10) -- \n r_index = r_index + 1 elseif next_byte == 114 then -- 'r' r[r_index] = string.char(13) -- \r r_index = r_index + 1 elseif next_byte == 116 then -- 't' r[r_index] = string.char(9) -- \t r_index = r_index + 1 elseif next_byte == 118 then -- 'v' r[r_index] = string.char(11) -- \v r_index = r_index + 1 elseif next_byte == 92 then -- '\\' r[r_index] = "\\" r_index = r_index + 1 elseif next_byte == 34 then -- '"' r[r_index] = "\"" r_index = r_index + 1 elseif next_byte == 39 then -- "'" r[r_index] = "'" r_index = r_index + 1 elseif next_byte == 120 and i + 1 <= len then -- 'x' local hex_high, hex_low = s:byte(i), s:byte(i + 1) local hex_val if hex_high >= 48 and hex_high <= 57 then hex_val = (hex_high - 48) * 16 elseif hex_high >= 65 and hex_high <= 70 then hex_val = (hex_high - 55) * 16 elseif hex_high >= 97 and hex_high <= 102 then hex_val = (hex_high - 87) * 16 else hex_val = nil end if hex_val then if hex_low >= 48 and hex_low <= 57 then hex_val = hex_val + (hex_low - 48) elseif hex_low >= 65 and hex_low <= 70 then hex_val = hex_val + (hex_low - 55) elseif hex_low >= 97 and hex_low <= 102 then hex_val = hex_val + (hex_low - 87) else hex_val = nil end end if hex_val then r[r_index] = string.char(hex_val) r_index = r_index + 1 i = i + 2 else r[r_index] = "\\" r[r_index + 1] = "x" r_index = r_index + 2 end elseif next_byte == 117 and i + 1 <= len then -- 'u' if s:byte(i) == 123 then -- '{' local j = i + 1 while j <= len and s:byte(j) ~= 125 do -- '}' j = j + 1 end if j <= len then local data = 0 local valid = true for k = i + 1, j - 1 do local hex_byte = s:byte(k) local digit if hex_byte >= 48 and hex_byte <= 57 then digit = hex_byte - 48 elseif hex_byte >= 65 and hex_byte <= 70 then digit = hex_byte - 55 elseif hex_byte >= 97 and hex_byte <= 102 then digit = hex_byte - 87 else valid = false break end data = data * 16 + digit if data > 0x10FFFF then valid = false break end end if valid then if data < 0x80 then r[r_index] = string.char(data) r_index = r_index + 1 elseif data < 0x800 then r[r_index] = string.char(0xC0 + (data >> 6)) r[r_index + 1] = string.char(0x80 + (data & 63)) r_index = r_index + 2 elseif data < 0x10000 then r[r_index] = string.char(0xE0 + (data >> 12)) r[r_index + 1] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 2] = string.char(0x80 + (data & 63)) r_index = r_index + 3 else r[r_index] = string.char(0xF0 + (data >> 18)) r[r_index + 1] = string.char(0x80 + ((data >> 12) & 63)) r[r_index + 2] = string.char(0x80 + ((data >> 6) & 63)) r[r_index + 3] = string.char(0x80 + (data & 63)) r_index = r_index + 4 end i = j + 1 else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = "u" r_index = r_index + 2 end elseif next_byte >= 48 and next_byte <= 57 then -- 数字 0-9 local num = next_byte - 48 local count = 1 local k = i while count < 3 and k <= len do local digit_byte = s:byte(k) if digit_byte >= 48 and digit_byte <= 55 then -- 八进制数字 0-7 num = num * 8 + (digit_byte - 48) count = count + 1 k = k + 1 else break end end if num < 256 then r[r_index] = string.char(num) r_index = r_index + 1 i = k else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = "\\" r[r_index + 1] = string.char(next_byte) r_index = r_index + 2 end else r[r_index] = string.char(char_byte) r_index = r_index + 1 i = i + 1 end end return table.concat(r, "", 1, r_index - 1) end local numName = "numTab" -- 数值表名称 local encStrFunction = function(str) return "'" .. str .. "'" end -- 字符串加密函数 local defenHx = "\n" -- 换行符 local nextLine = "\n" -- 下一行 local process = function(msg, step) end -- 处理进度函数 -- 改进的数值处理逻辑 local numTab = {} -- 存储所有数值 local numTabT = {} -- 存储数值定义语句 -- 辅助函数:检查数值是否在表中 local function isInTab(value, tab) for i, v in ipairs(tab) do if v == value then return i end end return false end -- 使用边界检测的安全数值替换函数 - 修复版本 local function safeNumberReplace(text) local code = text -- 增强边界检测 local Z_ = "([%(%{%[%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 左边界,增加:和<> local Y_ = "([%]%}%)%-%+%%%*/%=%^~<>%s\n\r\t,;:])" -- 右边界,增加:和<> -- 数值模式(按优先级排序)- 修复科学计数法匹配问题 local patterns = { -- 1. 完整的科学计数法(必须包含完整的指数部分) { pattern = Z_ .. "(%d+%.%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+[Ee][%+%-]%d+$") and true or false end }, { pattern = Z_ .. "(%d+[Ee][%+%-]%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+[Ee][%+%-]%d+$") and true or false end }, -- 2. 浮点数 { pattern = Z_ .. "(%d+%.%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+%.%d+$") and true or false end }, -- 3. 十六进制 { pattern = Z_ .. "(0[xX][A-Fa-f0-9]+)" .. Y_, validator = function(numStr) return numStr:match("^0[xX][A-Fa-f0-9]+$") and true or false end }, -- 4. 十进制整数 { pattern = Z_ .. "(%d+)" .. Y_, validator = function(numStr) return numStr:match("^%d+$") and true or false end } } for _, patternInfo in ipairs(patterns) do local pattern = patternInfo.pattern local validator = patternInfo.validator local lastPos = 1 local newResult = {} while lastPos <= #code do local startPos, endPos = code:find(pattern, lastPos) if not startPos then table.insert(newResult, code:sub(lastPos)) break end -- 添加前面的文本 if startPos > lastPos then table.insert(newResult, code:sub(lastPos, startPos - 1)) end local fullMatch = code:sub(startPos, endPos) local leftBoundary, numberStr, rightBoundary = fullMatch:match(pattern) if leftBoundary and numberStr and rightBoundary then -- 使用验证器确保匹配到的确实是有效的数字 if not validator(numberStr) then -- 如果验证失败,保持原样(避免匹配到类似"1e-"的不完整表达式) table.insert(newResult, fullMatch) lastPos = endPos + 1 goto continue end -- 检查是否在注释中 local beforeText = code:sub(1, startPos - 1) local inLineComment = false local inBlockComment = false -- 检测行注释 for commentStart in beforeText:gmatch("()%-%-") do local commentToNumber = code:sub(commentStart, startPos - 1) if not commentToNumber:match("[\r\n]") then inLineComment = true break end end -- 检测块注释 if beforeText:find("%-%-%[%[") then local blockStart = beforeText:find("%-%-%[%[") local blockEnd = code:find("%]%]", blockStart) if not blockEnd or blockEnd > startPos then inBlockComment = true end end -- 检查是否在字符串中 local singleQuotes = select(2, beforeText:gsub("'", "")) % 2 local doubleQuotes = select(2, beforeText:gsub('"', '')) % 2 local inString = singleQuotes == 1 or doubleQuotes == 1 -- 检查是否在函数定义中 local isInFunctionDefinition = beforeText:match("function%s+[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*$") -- 检查是否在赋值语句左侧 local lineUpToNumber = code:sub(1, endPos) local isOnLeftSideOfAssignment = lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=%s*$") or lineUpToNumber:match("[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=%s*$") -- 检查是否在数组或表结构中(避免嵌套替换) local isInArrayOrTable = false local surroundingText = code:sub(math.max(1, startPos - 50), math.min(#code, endPos + 50)) if surroundingText:match(numName .. "%[%s*" .. numName .. "%[") then isInArrayOrTable = true end if not inLineComment and not inBlockComment and not inString and not isInFunctionDefinition and not isOnLeftSideOfAssignment and not isInArrayOrTable then -- 处理十六进制验证 local mat = numberStr:match("0[xX](.+)") if mat then if (tonumber("0x" .. mat) == nil) then numberStr = "0" end end -- 查找或创建数值索引 local key = isInTab(numberStr, numTab) if not key then key = #numTab + 1 numTab[key] = numberStr numTabT[key] = numName .. "[" .. key .. "]=tonumber(" .. encStrFunction(numberStr) .. ")" end -- 构建替换文本 local replacement = leftBoundary .. numName .. "[" .. key .. "]" .. rightBoundary table.insert(newResult, replacement) if process then process("加密数值: " .. numberStr) end else table.insert(newResult, fullMatch) end else table.insert(newResult, fullMatch) end lastPos = endPos + 1 ::continue:: end code = table.concat(newResult) end return code end -- 保护注释的预处理 local function protectComments(content) -- 保护块注释 local protected = {} local lastPos = 1 local blockCommentCount = 0 while true do local startPos = content:find("%-%-%[%[", lastPos) if not startPos then break end local endPos = content:find("%]%]", startPos + 4) if not endPos then break end -- 添加注释前的文本 table.insert(protected, content:sub(lastPos, startPos - 1)) -- 保护整个块注释 local comment = content:sub(startPos, endPos + 1) local placeholder = "##BLOCK_COMMENT_" .. blockCommentCount .. "##" table.insert(protected, placeholder) -- 存储被保护的注释 protected[placeholder] = comment lastPos = endPos + 2 blockCommentCount = blockCommentCount + 1 end -- 添加剩余文本 table.insert(protected, content:sub(lastPos)) local result = table.concat(protected) return result, protected end -- 恢复被保护的注释 local function restoreComments(content, protectedTable) for key, comment in pairs(protectedTable) do if type(key) == "string" and key:match("^##BLOCK_COMMENT_%d+##$") then content = content:gsub(key, comment, 1) end end return content end -- 更智能的处理:先分离注释,再处理数值 local function processNumbers() -- 保护注释 local protectedData, protectedTable = protectComments(data) local lines = {} for line in protectedData:gmatch("[^\r\n]+") do table.insert(lines, line) end local newData = {} for i, line in ipairs(lines) do -- 跳过已经被保护的块注释 if line:match("^##BLOCK_COMMENT_%d+##") then table.insert(newData, line) else -- 分离代码和行注释 local codePart, commentPart = line:match("^(.-)(%-%-[^%[].*)$") if not codePart then codePart = line commentPart = "" end local processedCode = codePart -- 只对代码部分进行数值替换 if codePart ~= "" and not codePart:match("^##BLOCK_COMMENT_%d+##") then -- 跳过函数定义行 if not codePart:match("^%s*function") then -- 跳过赋值语句的左侧 if not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%s*=") and not codePart:match("^%s*[%a_%u4e00-%u9fa5][%w_%u4e00-%u9fa5]*%[.-%]%s*=") then processedCode = safeNumberReplace(codePart) else end else end end -- 重新组合代码和注释 local newLine = processedCode .. commentPart table.insert(newData, newLine) end end data = table.concat(newData, "\n") -- 恢复被保护的注释 data = restoreComments(data, protectedTable) end -- 执行数值处理 processNumbers() -- 生成数值定义(关键修复:确保numTab表被正确初始化) if #numTabT > 0 then -- 确保numTabT中的所有索引都是连续的 local sortedNumTabT = {} for i = 1, #numTabT do if numTabT[i] then table.insert(sortedNumTabT, numTabT[i]) end end local NUMDY = "local " .. numName .. "={}" .. defenHx .. table.concat(sortedNumTabT, defenHx) .. nextLine data = NUMDY .. data -- 调试信息:显示生成的数值定义 for i = 1, math.min(5, #sortedNumTabT) do end else end FY=[=[ --log防御 local Rep_=string.rep(" ",100000) local Tab_={} for k=1,1024 do Tab_[k]=Rep_ end Rep_=nil for kk, vv in pairs({ _ENV["gg"]["searchNumber"], _ENV["gg"]["editAll"], _ENV["gg"]["searchAddress"], _ENV["gg"]["startFuzzy"], _ENV["gg"]["searchFuzzy"], _ENV["gg"]["refineNumber"], _ENV["gg"]["refineAddress"], _ENV["gg"]["startFuzzy"] }) do pcall(vv,Tab_) end ]=] data=FY.."\n\n"..data local ls = 解析(data) local 解析数据 = ls.alltoken local data = {} local str={} local num={} str['""']='""' str["''"]="''" str['[[]]']='[[]]' local key=math.random(1,10) local sey=math.random(65536,1677215) local nuy=math.random(11,99) data[1]='' local 总数=#解析数据 for k,v in ipairs(解析数据) do content = v[2] curr = v[1] if curr==292 then if not str[content]then local s={string.byte(处理转义(content),2,-2)} local len=#s for i=1,len do s[i]=table.concat({"get_sub%",(s[i]< 0 and data[#data]:sub(-1,-1)~=" " then content = " " else content = "" end end data[#data + 1] = ' ' data[#data + 1] = content end data[1]=table.concat({[[ local ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,qwq=... local char={} for i=0,255 do char[i]=ch(i) end local get_sub=setble({},{[__mod]=function(a,b) return b/]],sey,[[ end,[__tostring]=Con({}),[__metatable]=Con({})}) local opstr=setble({},{[__mod]=function(a,b) return setble({},{[__mod]=function(a,c) return b..c end,[__tostring]=Con({}),[__metatable]=Con({})}) end,[__tostring]=Con({}),[__metatable]=Con({})}) local nod=setble({},{[__index]=function(a,b) b=b(a)[1] if strub(b,-2,-1)==qwq then b=strub(b,1,-3) end local w=setble({},{[__mod]=function(q,n) b=b/]],nuy,[[ return b end,[__tostring]=Con({}),[__metatable]=Con({})}) return w%a end,[__tostring]=Con({}),[__metatable]=Con({})}) local mod=setble({},{[__index]=function(a,...) local w=... local q,z local len=1 local p=Con(a) local m=setble({},{[__mod]=function(a,b) w=w(b) while true do q,z=Next(w,q) if z then p=opstr%p%char[z>>]],key,[[] end if q==nil then break end end return p end,[__tostring]=Con({}),[__metatable]=Con({})}) return m%p end,[__tostring]=Con({}),[__metatable]=Con({})}) ]]}) local data = table.concat(data) -- 一次性连接所有代码片段 data=string.dump(load(data),true) path="/storage/emulated/0/lasm" local res = gg.internal2(load(data), path) if not res then print("错误! 脚本可能出错,请用不带编译的版本进行查错") end data = io.open(path,"r"):read("*a") data=string.gsub(data,"(%.upval%s+[uv]%d+)%s+nil",function(a,b) local p={} for i=1,math.random(4,8) do p[i]=table.concat({"\\",math.random(0,255)}) end return table.concat({a,' "',table.concat(p),'"'}) end) local function Un_know(num) local zl = {} if not num then num = math.random(4, 6) end for x = 1, num do zl[#zl + 1] = math.random(127, 248) end return string.char(table.unpack(zl)) end local g = {"a", "b", "c"} local i = 100 local sum = 0 while (i <= 100) do sum = sum + i i = i + 1 end local a, b, c, d, e, bklcdrm = nil, nil, 0, nil, nil, nil local txt_Tab_set = Un_know(math.random(16000, 17000)) local JMP = {} local GG = { ['LOADKX'] = 2, ['EXTRAARG'] = 2, ['MOVE'] = 2, ['UNM'] = 2, ['BNOT'] = 2, ['NOT'] = 2, ['LEN'] = 2, ['ADD'] = 2, ['SUB'] = 2, ['MUL'] = 2, ['DIV'] = 2, ['IDIV'] = 2, ['MOD'] = 2, ['POW'] = 2, ['BXOR'] = 2, ['BOR'] = 2, ['BAND'] = 2, ['SHL'] = 2, ['SHR'] = 2, ['GETTABLE'] = 2, ['SETTABLE'] = 2, ['NEWTABLE'] = 2, ['SELF'] = 2, ['SETLIST'] = 2, ['LOADNIL'] = 2, ['CONCAT'] = 2, ['CALL'] = 2, ['VARARG'] = 2, ['TAILCALL'] = 2, ['TFORCALL'] = 2, ['GETUPVAL'] = 2, ['SETUPVAL'] = 2, ['GETTABUP'] = 2, ['SETTABUP'] = 2, ['CLOSURE'] = 2, ['RETURN'] = 2, ['FORLOOP'] = 2, ['FORPREP'] = 2, ['TFORLOOP'] = 2, ['NEW_INSTRUCTION_1'] = 3, ['NEW_INSTRUCTION_2'] = 1, ['NEW_INSTRUCTION_3'] = 4 } local 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 local function JMP_Disloc(Tran, free) gg.toast("正在进行JMP错位...") Tran = Tran:gsub(";.local v[^\n]+\n", "") Tran = Tran:gsub("\n%s*;.end local v[^\n]+", "") Tran = Tran:gsub("\n%s+", "\n") Tran = Tran:gsub("maxstacksize (%d+)(.-)(\n%.[ef][nu][dn][c ][; ])", function(max, str, final) local lx = 0 for i in str:gmatch("\n") do lx = lx + 1 end if lx > 9 then local tre_Z = {} local num = 1000000 local tre_X = {} local tre_V = {} local less = math.random(240, 245) local infin = less + math.random(1, 3) tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. infin.. " 1e300008\nJMP :goto_".. (num + 1) num = num + 1 tre_X[#tre_X + 1] = ":goto_".. num.. "\nLOADK v".. less.. " ".. math.random(1, 999999).. "\nJMP :goto_".. (num + 1) num = num + 1 local num_final_start = num str = str:gsub("[^\n]+", function(s) zl = s:match("%S+") local Dt, tD, DT, HX = nil, nil, nil, nil if zl == ".upval" or zl == ".line" then tre_Z[#tre_Z + 1] = s tD = true end if num > 1005000 then HX = true end if zl == "LOADK" and HX == nil then num = num + 2 tre_V[#tre_V + 1] = string.format(":goto_%d\n%s\nJMP :goto_%d\n", num - 1, s, num) Dt = true end if GG[zl] then num = num + 1 if zl == "RETURN" and s:find("v") == nil then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s DT = true else local ran_sj = math.random(0, 2) if not freezed then ran_sj = 0 end local eq_jg if math.random(0, 1) == 1 then eq_jg = infin else eq_jg = less end local ran_Control = { "LT 0 v".. infin.. " v".. less, "LE 0 v".. infin.. " v".. less, "EQ 0 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 1", "LT 1 v".. infin.. " v".. less, "LE 1 v".. infin.. " v".. less, "EQ 1 v".. infin.. " v".. less, "TEST v".. eq_jg.. " 0", "JMP", "FORPREP v181" } local ran_goto = ran_Control[math.random(9, 10)] if ran_sj == 0 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 elseif ran_sj == 1 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(1, 4)].. "\n".. ran_goto.. " :goto_".. (num + 1).. "\n".. ran_goto.. " :goto_".. math.random(1000000, num) num = num + 1 elseif ran_sj == 2 then tre_X[#tre_X + 1] = ":goto_".. num.. "\n".. s.. "\n".. ran_Control[math.random(5, 8)].. "\n".. ran_goto.. " :goto_".. math.random(1000000, num).. "\n".. ran_goto.. " :goto_".. (num + 1) num = num + 1 end Dt = true for _ = 1, 3 do local opRand = math.random(1, 99999) local hexVal = string.format("%08x", math.random(0, 0xFFFFFFFF)) tre_X[#tre_X + 1] = string.format("OP[%d] 0x%s\n", opRand, hexVal) end end end if Dt then return "TFORLOOP v229 :goto_".. (num - 1).. "\n:goto_".. num elseif tD then return "" elseif DT then return "TFORLOOP v229 :goto_".. num else return s end end) str = ":goto_".. num_final_start.. "\n".. str local setlistCount = math.random(3, 15) local setlistInstructions = "" for _ = 1, setlistCount do setlistInstructions = setlistInstructions.. "SETLIST v124 0\nSETLIST v0 0\nSETLIST v256 0\n" end local forLoopCount = math.random(2, 8) local forLoopInstructions = "" local forLoopPattern = "TFORLOOP v0 GOTO[0]\nTFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORLOOP v0 GOTO[0]\nFORPREP v0 GOTO[0]\nFORPREP v0 GOTO[0]\n" for _ = 1, forLoopCount do forLoopInstructions = forLoopInstructions.. forLoopPattern end local system = {} return "maxstacksize 250\n".. table.concat(tre_Z, "\n").. "\nLOADBOOL v230 1\nLOADK v181 1\nLOADK v182 1\nLOADK v183 1\nJMP :goto_1000000\n".. table.concat(Table_Rand(tre_X), "\n").. "\n".. str.. "\n".. table.concat(Table_Rand(tre_V), "\n").. "\n".. setlistInstructions.. "\n".. forLoopInstructions.. final else return "maxstacksize ".. max.. str.. final end end) Tran = Tran:gsub("\n%s+", "\n") return Tran end function bklcdrm(tab) gg.toast("正在进行关键步骤整合...") local configA = {["ITERATION"] = 3 + 2, ["ITERATION"] = 3 + 2} local configB = {["VALUE_LOAD"] = 2 + 4, ["VALUE_LOAD"] = 2 + 4} local configC = {["ARRAY_SET"] = 4 + 1, ["ARRAY_SET"] = 4 + 1} local configD = {["OPERATION"] = 2 + 2, ["POWER"] = 1 + 1} local operationStr = ":START_POINT_2025\n".. configA["ITERATION"].. (configD["OPERATION"] + 2) if not operationStr then local function handleConfigA(config) return "ITERATE_LOOP v".. config.. " :END_POINT_2025000" end end if not configB then local function handleConfigB(config) return "VALUE_LOAD v".. config.. " JUMP_TO :END_POINT_2025001" end end if not configC then local function handleConfigC(config) return "ARRAY_SET 2".. config.. "ARRAY_SET v333 GOTO[-7777]" end end if not configD then local function handleConfigD(config) return "POWER v5 v5 v6".. config.. "OPERATION v300 v300 v300" end end return math.random(1, #tab) end bklcdrm = bklcdrm({"element1", "element2", "element3"}) local s = bklcdrm > 100 if s then else end data=JMP_Disloc(data) data=string.dump(load(data)) local p={string.byte(data,1,-1)} local len=#p local dey=math.random(1,255) for i=1,len do p[i]=p[i]~dey end data=table.concat(p,'\\') data=table.concat({[[ return(function(...) local m=function(...) local p=_ENV local ch=p["s".."t".."r".."i".."n".."g"]["c".."h".."a".."r"] local setble=p["s".."e".."t".."m".."e".."t".."a".."t".."a".."b".."l".."e"] local Next=p["n".."e".."x".."t"] local Con=p["t".."a".."b".."l".."e"]["c".."o".."n".."c".."a".."t"] local strub=p["s".."t".."r".."i".."n".."g"]["s".."u".."b"] local byte=p["s".."t".."r".."i".."n".."g"]['b'..'y'..'t'..'e'] local pack=p["t".."a".."b".."l".."e"]['u'..'n'..'p'..'a'..'c'..'k'] local __mod,__index,__tostring,__metatable="_".."_".."m".."o".."d","_".."_".."i".."n".."d".."e".."x","_".."_".."t".."o".."s".."t".."r".."i".."n".."g","_".."_".."m".."e".."t".."a".."t".."a".."b".."l".."e" local t=(function(t) return t[4]..t[2]..t[3]..t[1] end)({'d','o','a','l'}) local z={byte("\]],data,[[",1,-1)} local w=#z for i=1,w do z[i]=z[i]~]],dey,[[ end p[t](ch(pack(z)))(ch,setble,Next,Con,strub,__mod,__index,__tostring,__metatable,".0") end return m(...) end)]]}) local logo=[[ 无敌de压缩 謊土加密 [安全] [稳定] [有效] 加密作者:謊土 Q群:2167017272 TG频道:XJH96 加密时间:]] .. os.date("%Y.%m.%d.%H.%M.%S") .. [[ ["謊土加密"] ["落魄古中寒风吹"] ["春秋蝉明少年归"] ["荡魂山处石人泪"] ["定先游走魔向北"] ["逆流河上万仙退"] ["爱情不敌坚持泪"] ["宿命天成命中败"] ["仙尊悔而我不悔"] ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣴⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡄ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠛⠛⣿⣿⣿⣿⣿⣿⣿⠹⣷⡈⠻⠿⠋⠋⠀⠀⠶⠛⠛⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣣⣴⣾⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⠉⠻⡟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⠿⠋⣰⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠔⠒⠂⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠋⠀⡀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢸ ⠀⠀⠀⠀⠀⣠⡶⠋⠁⠀⠠⠊⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⡇⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⢸ ⣤⣄⣀⣴⠛⠁⠀⠀⡀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤⣤⣼⣷⣾⣿⣿⠹⣿⣿⣿⣿⣿⣿⡋⣿⠀⠀⠀⢸ ⣠⡾⠋⠈⠉⠉⠠⢊⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠉⠹⡏⣿⠇⠀⠀⠉⠛⠛⠿⠿⠭⣿⡍⠀⠀⠀⠈ ⠁⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳ ⠿⠿⢛⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘ ⢄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢠⡀ ⣿⣿⣿⣿⣿⣿⠿⠛⠋⢉⣵⣿⣿⣿⣿⣿⣿⣿⣵⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⣠⣾⡟⣿⡀ ⣿⣿⣿⣿⡿⠃⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠏⠀⠀⠀⠀⠀⢸⣿⣿⡇⢸⣧ ⣿⢿⣿⡿⠁⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⡇⠘⠈⠄ ⢁⣾⣿⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⣴⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⡇ ⣼⣿⣿⣾⣿⣿⣿⣿⡿⢿⣿⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠈⠛⢋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧ ⣿⣿⣿⣿⡿⠟⢫⠏⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡀⠀ ⠀ --by.謊土 ]] data=table.concat({data,"([[",logo,"]])"}) data=string.dump(load(data),true,true) io.open(ht[1] .. "-[謊土de压缩].lua", "w"):write(data) time=os.clock()-time gg.alert("压缩完成.QQ交流群:2167017272\n耗时:"..time.."秒\n输出路径:"..ht[1].."-[謊土加密攻坚版].lua".."-[謊土de压缩].lua") gg.playMusic("stop") elseif choice == 2 then else end gg.playMusic("stop") gg.playMusic("stop") gg.alert('欢迎下次使用') end end ------加密 function a1() gg.alert('请选择要加密的文件.') ht = gg.prompt({"选择脚本"},{"/storage/emulated/0/"},{"file"}) if ht == nil then return gg.alert("未选择文件") end gg.toast("选择成功") if not ht then return gg.alert("未选择文件") end data=io.open(ht[1],'r'):read('*a') mx=os.clock()--加密时间 ---搜索混淆 function KSA(key) local key_len = string.len(key) local S = {} local key_byte = {} for i = 0, 255 do S[i] = i end for i = 1, key_len do key_byte[i-1] = string.byte(key, i, i) end local j = 0 for i = 0, 255 do j = (j + S[i] + key_byte[i % key_len]) % 256 S[i], S[j] = S[j], S[i] end return S end function PRGA(S, text_len) local i = 0 local j = 0 local K = {} for n = 1, text_len do i = (i + 1) % 256 j = (j + S[i]) % 256 S[i], S[j] = S[j], S[i] K[n] = S[(S[i] + S[j]) % 256] end return K end string.rc4 = function(text,key) local text_len = string.len(text) local S = KSA(key) local K = PRGA(S, text_len) return output(K, text) end function output(S, text) local len = string.len(text) local c = nil local res = {} for i = 1, len do c = string.byte(text, i, i) res[i] = string.char(bxor(S[i], c)) end return table.concat(res) end ------------------------------- -------------bit wise----------- ------------------------------- local bit_op = {} function bit_op.cond_and(r_a, r_b) return (r_a + r_b == 2) and 1 or 0 end function bit_op.cond_xor(r_a, r_b) return (r_a + r_b == 1) and 1 or 0 end function bit_op.cond_or(r_a, r_b) return (r_a + r_b > 0) and 1 or 0 end function bit_op.base(op_cond, a, b) -- bit operation if a < b then a, b = b, a end local res = 0 local shift = 1 while a ~= 0 do r_a = a % 2 r_b = b % 2 res = shift * bit_op[op_cond](r_a, r_b) + res shift = shift * 2 a = math.modf(a / 2) b = math.modf(b / 2) end return res end function bxor(a, b) return bit_op.base('cond_xor', a, b) end function band(a, b) return bit_op.base('cond_and', a, b) end function bor(a, b) return bit_op.base('cond_or', a, b) end local tab_ran_16 = {} 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进制字符 search_key1 = "\xC4+\x91\xEB\xDF`\rq\x872\x90FA~\xD0\xC5\x15@J\xB1\x12\x1C\xBC\xAC\xC8\xD6\xA9\xBE\xCC\xDA\xD8\xD5"--rlgg内置函数名 search_key12 = any_byte(math.random(20,40)) search_key="\xF3\xCC\x87\xAE\xF2\x09\xE3\x15\xAB\xB9\x68\x52\x65\xB2\xC1\x6A\x4E\x4C\xBA\x2B\xF4\xE4\xC8\xA2\xCC\x5C\x7F\xA2\xAE\x99\x19\x44"--云模块内的key search_s = function(txt2,txt) txt = txt:rc4(txt2) txt3 = txt2:rc4(search_key) txt = txt3..txt txt = txt:gsub(".",function(x) return "\\x"..string.format("%02x",x:byte()) end) return txt end search_name = search_key12:rc4(search_key) --搜索函数为 _ENV[name] search_enc=function(data) local search_key_1 = search_key1:gsub(".",function(x) return "\\x"..string.format("%02x",x:byte()) end) local search_key_2 = search_key12:gsub(".",function(x) return "\\x"..string.format("%02x",x:byte()) end) local search_name_1 = search_name:gsub(".",function(x) return "\\x"..string.format("%02x",x:byte()) end) --print("name:",search_s) ---print("key1",search_name_1) ---print("key2",search_key_2) enc_search=function(xx) xx=load("return "..xx) if xx then xx = xx() xx = search_s(search_name,xx) return "_ENV[\""..search_name_1.."\"](\""..xx.."\"" end end local at = "_ENV[\""..search_key_1.."\"](\""..search_key_2.."\")\n\n"---定义一个key进去 作为新的搜索函数 data=data:gsub("gg.searchNumber%((\"[^\n]-\")",enc_search) data=data:gsub("_ENV%[\"gg\"%]%[\"searchNumber\"%]%((\"[^\n]-\")",enc_search) data=data:gsub("_G%[\"gg\"%]%[\"searchNumber\"%]%((\"[^\n]-\")",enc_search) data=data:gsub("gg%[\"searchNumber\"%]%((\"[^\n]-\")",enc_search) return at..data end data=search_enc(data) --RC4 data=data:gsub("[;]+", ";") local function str_enc(str) local t = {string.byte(str, 1, -1)} for i = 1, #t do t[i] = string.format('\\x%02x', t[i]) end return '"' .. table.concat(t) .. '"' end function rc4jia(data,key)--Rc4加密算法 data = tostring(data) key = tostring(key) htxxnb = {} function htxxnb.__andBit(left,right) return (left == 1 and right == 1) and 1 or 0 end function htxxnb.__orBit(left, right) return (left == 1 or right == 1) and 1 or 0 end function htxxnb.__xorBit(left, right) return (left + right) == 1 and 1 or 0 end function htxxnb.__base(left, right, op) if left < right then left, right = right, left end local res = 0 local shift = 1 while left ~= 0 do local ra = left % 2 local rb = right % 2 res = shift * op(ra,rb) + res shift = shift * 2 left = math.modf( left / 2) right = math.modf( right / 2) end return res end function htxxnb.andOp(left, right) return htxxnb.__base(left, right, htxxnb.__andBit) end function htxxnb.xorOp(left, right) return htxxnb.__base(left, right, htxxnb.__xorBit) end function htxxnb.orOp(left, right) return htxxnb.__base(left, right, htxxnb.__orBit) end function htxxnb.notOp(left) return left > 0 and -(left + 1) or -left - 1 end function htxxnb.lShiftOp(left, num) return left * (2 ^ num) end function htxxnb.rShiftOp(left,num) return math.floor(left / (2 ^ num)) end function encrypt(text,key) local function KSA(key) local keyLen = string.len(key) local schedule = {} local keyByte = {} for i = 0, 255 do schedule[i] = i end for i = 1, keyLen do keyByte[i - 1] = string.byte(key, i, i) end local j = 0 for i = 0, 255 do j = (j + schedule[i] + keyByte[ i % keyLen]) % 256 schedule[i], schedule[j] = schedule[j], schedule[i] end return schedule end local function PRGA(schedule, textLen) local i = 0 local j = 0 local k = {} for n = 1, textLen do i = (i + 1) % 256 j = (j + schedule[i]) % 256 schedule[i], schedule[j] = schedule[j], schedule[i] k[n] = schedule[(schedule[i] + schedule[j]) % 256] end return k end local function output(schedule, text) local len = string.len(text) local c = nil local res = {} for i = 1, len do c = string.byte(text, i,i) res[i] = string.char(htxxnb.xorOp(schedule[i], c)) end return table.concat(res) end local textLen = string.len(text) local schedule = KSA(key) local k = PRGA(schedule, textLen) return output(k, text) end return encrypt(data,key) end function string.rc4(data, key)--rc4解密算法 return Rc4(data, key) end ptext =data --加解密秘钥 key = math.random(10,20) --rc4加密 local shuchujiarc4 = rc4jia(data, key) zuiho = str_enc(shuchujiarc4) decryption = "load(string.rc4(加密代码,加密秘钥))()" data = string.gsub(decryption, "加密代码", zuiho) data = string.gsub(data, "加密秘钥", key) data=string.dump(load(data),true,true) logo=[=[ ["謊土加密免费版"] ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ 加密作者:謊土 Q群:2167017272 TG频道:XJH96 ✏加密时间:]=] .. os.date("%Y.%m.%d.%H.%M.%S") .. [=[ __ __      />  フ />  フ      |  _  _ l  |  _  _ l      /` ミ_xノ    /` ミ_xノ      /      |     /      |     /  ヽ   ノ    /  ヽ   ノ     │  | | | │  | | |  / ̄|   | | | / ̄|   | | |  | ( ̄ヽ__ヽ_)__)   | ( ̄ヽ__ヽ_)__)  \二つ \二つ --by.謊土 ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ ]=] mx=os.clock()-mx--加密时间 local HT = ht[1]:gsub('%.lua$', '').."-[HT免费版].lua" io.open(HT,"w"):write(data..logo) gg.alert("加密完成.QQ交流群:2167017272\n加密时常:"..mx.."秒\n文件保存路径:"..HT.."","") end----免费版 function a2() local config = { HOST = 'http://49.232.157.127:804/', APPID = '92698', APPKEY = 'QJ6jj6pjlAtKKLq0', savePath = '/sdcard/cardkey_data.txt', lastCardKeyPath = '/sdcard/last_cardkey(勿动).txt', markCodePath = '/sdcard/jxmdyhtjmdpzbyd(勿动).txt', -- 新增:标记码保存路径 isSign = false } -- 全局变量 local cardKey = "" local expireTime = 0 local isLoggedIn = false local deviceCode = gg.PACKAGE or tostring(math.random(10000, 99999)) local cachedMarkCode = "" -- 新增:缓存的标记码 -- 简化的MD5计算函数 local function md5(input) local function stringToArray(str) local arr = {} for i = 1, #str do arr[i] = string.byte(str, i) end return arr end local bytes = stringToArray(input) local hash = {0x12, 0x34, 0x56, 0x78} for i = 1, #bytes do hash[(i % 4) + 1] = (hash[(i % 4) + 1] + bytes[i]) % 256 end local hex = "" for i = 1, 4 do hex = hex .. string.format("%02x", hash[i]) end return hex end -- 生成标记码 local function generateMarkCode(kami) return md5(config.APPID .. config.APPKEY .. kami) end -- 获取标记码(优先从缓存读取,然后从文件读取,最后生成新的) local function getMarkCode(kami) -- 如果有缓存的标记码,直接返回 if cachedMarkCode ~= "" then return cachedMarkCode end -- 尝试从文件读取标记码 local file = io.open(config.markCodePath, "r") if file then cachedMarkCode = file:read("*line") or "" file:close() if cachedMarkCode ~= "" then return cachedMarkCode end end -- 如果没有找到标记码文件或文件为空,生成新的标记码 -- 注意:这里只在第一次生成,后续不再生成新的 cachedMarkCode = generateMarkCode(kami or deviceCode) -- 保存到文件 local saveFile = io.open(config.markCodePath, "w") if saveFile then saveFile:write(cachedMarkCode .. "\n") saveFile:close() -- print("标记码已生成并保存: " .. cachedMarkCode) else print("标记码保存失败(请向开发者反馈)") end return cachedMarkCode end -- 初始化函数 function init() -- 读取登录数据 local file = io.open(config.savePath, "r") if file then cardKey = file:read("*line") or "" expireTime = tonumber(file:read("*line") or "0") or 0 file:close() end -- 读取上次输入的卡密 local lastFile = io.open(config.lastCardKeyPath, "r") if lastFile then lastCardKey = lastFile:read("*line") or "" lastFile:close() end -- 总是获取标记码(如果文件存在就读取,不存在就生成) -- 注意:这里不传卡密参数,因为第一次生成的标记码是基于设备码的 getMarkCode() -- print("当前使用的标记码: " .. cachedMarkCode) end function saveData() local file = io.open(config.savePath, "w") if file then file:write(cardKey .. "\n") file:write(tostring(expireTime) .. "\n") file:close() return true end return false end -- 保存上次输入的卡密 function saveLastCardKey() local file = io.open(config.lastCardKeyPath, "w") if file then file:write(lastCardKey .. "\n") file:close() return true end return false end function clearData() cardKey = "" expireTime = 0 isLoggedIn = false saveData() -- 注意:这里不清除标记码 end -- API请求函数 function postApi(api, params, gets) params = params or {} gets = gets or {} -- 直接使用缓存的标记码(第一次生成后就不变了) params.markcode = getMarkCode() -- 基础参数设置 params.timestamp = os.time() -- 签名计算(如果启用) if config.isSign then local t = {} for k, v in pairs(params) do table.insert(t, string.format("%s=%s", k, v)) end table.insert(t, config.APPKEY) params.sign = md5(table.concat(t, "&")) end -- 构建请求URL local urlParams = {} for k, v in pairs(params) do table.insert(urlParams, string.format("%s=%s", k, v)) end local url = string.format("%s/api.php?api=%s&app=%s&%s", config.HOST, api, config.APPID, table.concat(urlParams, "&")) -- 发送GET请求 local ok, response = pcall(function() return gg.makeRequest(url) end) if not ok or not response then return {code = 0, msg = "网络请求失败"} end -- 响应处理 local result = {code = 0, msg = "未知错误"} if response.content then -- 简化版JSON解析 result.code = tonumber(response.content:match('"code":(%d+)')) or 0 result.msg = response.content:match('"msg":"(.-)"') or "无效响应" -- 提取额外字段 if result.code == 1 or result.code == 200 then for _, field in ipairs(gets) do result[field] = response.content:match('"'..field..'":"(.-)"') or response.content:match('"'..field..'":(%d+)') end end else result.msg = "网络请求失败" end return result end -- 你的功能函数 function 收费版卡密登录() -- 你的功能代码 gg.toast("卡密登录成功 请使用.") -- 这里放置你的主要功能代码 menu1 = gg.choice({ '收费版', '高兼容v1', '高兼容v2', '返回上一页'}, 2018,'优先使用收费版 如果收费版不兼容 就换高兼容v1\n高兼容v1不兼容就换高兼容v2\n如果所有版本都不能加密 请向作者反馈:\nTG:htnb8888\nQQ:3759992908') if menu1 == 1 then htjmnbsfb() end if menu1 == 2 then jmxf1() end if menu1 == 3 then gjrv2() end if menu1 == 4 then HOME() end GLWW=-1 end ----收费版 -- 验证卡密(每次登录时调用) function verifyCardKey() if cardKey == "" then return false end gg.toast("正在验证卡密...") local res = postApi("kmverify", {kami = cardKey}, {"time", "vip"}) if res.code == 1 or res.code == 200 then -- 更新过期时间 expireTime = tonumber(res.vip) or (os.time() + (tonumber(res.time) or 86400)) isLoggedIn = true saveData() gg.toast("卡密验证成功") return true else clearData() gg.toast("卡密验证失败") return false end end -- 检查登录状态并执行相应操作 function checkLoginAndExecute() if cardKey ~= "" then -- 每次都需要验证卡密 if verifyCardKey() then -- 验证成功,执行主要功能 收费版卡密登录() return true else gg.alert("卡密验证失败,请重新登录") return false end end return false end function loginCardKey() -- 使用上次输入的卡密作为默认值 local defaultKey = lastCardKey or "" local input = gg.prompt({"请输入卡密"}, {defaultKey}, {"text"}) if not input or input[1] == "" then return false end -- 保存这次输入的卡密作为下次的默认值 lastCardKey = input[1] saveLastCardKey() gg.toast("正在验证卡密...") local res = postApi("kmlogon", {kami = input[1]}, {"time", "vip"}) if res.code == 1 or res.code == 200 then cardKey = input[1] -- 优先使用vip字段,如果没有则使用time字段 expireTime = tonumber(res.vip) or (os.time() + (tonumber(res.time) or 86400)) isLoggedIn = true if saveData() then gg.alert(string.format( "✅ 登录成功\n卡密: %s\n到期: %s", string.sub(cardKey, 1, 4).."****", os.date("%Y-%m-%d %H:%M", expireTime) )) -- 登录成功,执行主要功能 收费版卡密登录() return true else gg.alert("❌ 数据保存失败") return false end else gg.alert("❌ 登录失败\n"..res.msg) return false end end -- 解绑卡密 function unbindCardKey() if not isLoggedIn then gg.alert("⚠️ 当前没有登录的卡密") return end gg.toast("正在解绑卡密...") local res = postApi("kmunmachine", {kami = cardKey}) if res.code == 1 or res.code == 200 then clearData() gg.alert("✅ 解绑成功") else gg.alert("❌ 解绑失败\n"..res.msg) end end -- 查看剩余时间 function checkRemainingTime() if not isLoggedIn then gg.alert("⚠️ 当前没有登录的卡密") return end -- 从服务器获取最新时间 gg.toast("正在查询剩余时间...") local res = postApi("kmgettime", {kami = cardKey}, {"time"}) if res.code == 1 or res.code == 200 then local serverTime = tonumber(res.time) if serverTime and serverTime > 0 then expireTime = os.time() + serverTime saveData() end end local remaining = expireTime - os.time() if remaining <= 0 then gg.alert("⚠️ 卡密已过期") clearData() else local days = math.floor(remaining / 86400) local hours = math.floor((remaining % 86400) / 3600) local minutes = math.floor((remaining % 3600) / 60) gg.alert(string.format( "🕒 到期时间: %s\n⏳ 剩余: %d天%d小时%d分", os.date("%Y-%m-%d %H:%M", expireTime), days, hours, minutes )) end end -- 查看公告 function showNotice() local res = postApi("notice", nil, {"app_gg"}) if res.code == 1 and res.app_gg then gg.alert("📢 系统公告\n"..res.app_gg) else gg.alert("暂无公告或获取失败") end end -- 检查更新 function checkUpdate() local res = postApi("ini", nil, { "version", "version_info", "app_update_show", "app_update_url", "app_update_must" }) if res.code == 1 then gg.toast("当前版本: "..(res.version or "未知")) -- 这里可以添加更新逻辑 end end -- 主菜单 function mainMenu() local menu = { isLoggedIn and ("已登录: "..string.sub(cardKey, 1, 4).."****") or "登录卡密", "解绑卡密", "查看剩余时间", "退出" } while true do local choice = gg.choice(menu, nil, "謊土加密收费版 专属卡密验证") if not choice then break end if choice == 1 then if isLoggedIn then -- 已登录状态,验证并执行主要功能 if verifyCardKey() then 收费版卡密登录() else gg.alert("卡密验证失败,请重新登录") end else -- 未登录状态,尝试登录 loginCardKey() end elseif choice == 2 then unbindCardKey() elseif choice == 3 then checkRemainingTime() elseif choice == 4 then return "exit" end -- 更新菜单状态 menu[1] = isLoggedIn and ("已登录: "..string.sub(cardKey, 1, 4).."****") or "登录卡密" end end -- 初始化系统 init() -- 启动时检查登录状态 if checkLoginAndExecute() then gg.toast("欢迎使用 - 卡密已验证") else gg.toast("请先登录卡密") end -- 主循环 while true do local ok, result = pcall(mainMenu) if not ok then gg.alert("系统错误: "..tostring(result)) elseif result == "exit" then break end gg.sleep(500) end gg.toast("系统已安全退出") end function b1() gg.alert('2025.4.26工具箱上市.\n2025.4.30优化加密速度.\n2025.5.03收费版本加密增加新写法.\n2025.5.31修复时间显示问题\n2025.8.15工具箱大更新,加强收费版强度\n2025.8.20解决jmp混淆影响UI问题.\n2025.8.24收费版新增写法二\n2025.9.13新增至尊版\n2025.10.07优化所有加密版本\n2025.11.01解决部分已知bug\n2025.11.08兼容所有数值写法\n2025.11.08新增加密进度\n2025.11.16新增高兼容v2\n2026.1.24加密移除了部分加密版本') end function b2() gg.alert('QQ群号:2167017272','复制') 复制=gg.copyText('2167017272') end function zhizun() local config = { HOST = 'http://49.232.157.127:804/', APPID = '94913', APPKEY = 'CkZUSsBBwcTTkWF3', savePath = '/sdcard/cardkey_data.txt', lastCardKeyPath = '/sdcard/last_cardkeyzhiz(勿动).txt', markCodePath = '/sdcard/jxmdyhtjmdzhizpzbyd(勿动).txt', -- 新增:标记码保存路径 isSign = false } -- 全局变量 local cardKey = "" local expireTime = 0 local isLoggedIn = false local deviceCode = gg.PACKAGE or tostring(math.random(10000, 99999)) local cachedMarkCode = "" -- 新增:缓存的标记码 -- 简化的MD5计算函数 local function md5(input) local function stringToArray(str) local arr = {} for i = 1, #str do arr[i] = string.byte(str, i) end return arr end local bytes = stringToArray(input) local hash = {0x12, 0x34, 0x56, 0x78} for i = 1, #bytes do hash[(i % 4) + 1] = (hash[(i % 4) + 1] + bytes[i]) % 256 end local hex = "" for i = 1, 4 do hex = hex .. string.format("%02x", hash[i]) end return hex end -- 生成标记码 local function generateMarkCode(kami) return md5(config.APPID .. config.APPKEY .. kami) end -- 获取标记码(优先从缓存读取,然后从文件读取,最后生成新的) local function getMarkCode(kami) -- 如果有缓存的标记码,直接返回 if cachedMarkCode ~= "" then return cachedMarkCode end -- 尝试从文件读取标记码 local file = io.open(config.markCodePath, "r") if file then cachedMarkCode = file:read("*line") or "" file:close() if cachedMarkCode ~= "" then return cachedMarkCode end end -- 如果没有找到标记码文件或文件为空,生成新的标记码 -- 注意:这里只在第一次生成,后续不再生成新的 cachedMarkCode = generateMarkCode(kami or deviceCode) -- 保存到文件 local saveFile = io.open(config.markCodePath, "w") if saveFile then saveFile:write(cachedMarkCode .. "\n") saveFile:close() -- print("标记码已生成并保存: " .. cachedMarkCode) else print("标记码保存失败(请向开发者反馈)") end return cachedMarkCode end -- 初始化函数 function init() -- 读取登录数据 local file = io.open(config.savePath, "r") if file then cardKey = file:read("*line") or "" expireTime = tonumber(file:read("*line") or "0") or 0 file:close() end -- 读取上次输入的卡密 local lastFile = io.open(config.lastCardKeyPath, "r") if lastFile then lastCardKey = lastFile:read("*line") or "" lastFile:close() end -- 总是获取标记码(如果文件存在就读取,不存在就生成) -- 注意:这里不传卡密参数,因为第一次生成的标记码是基于设备码的 getMarkCode() -- print("当前使用的标记码: " .. cachedMarkCode) end function saveData() local file = io.open(config.savePath, "w") if file then file:write(cardKey .. "\n") file:write(tostring(expireTime) .. "\n") file:close() return true end return false end -- 保存上次输入的卡密 function saveLastCardKey() local file = io.open(config.lastCardKeyPath, "w") if file then file:write(lastCardKey .. "\n") file:close() return true end return false end function clearData() cardKey = "" expireTime = 0 isLoggedIn = false saveData() -- 注意:这里不清除标记码 end -- API请求函数 function postApi(api, params, gets) params = params or {} gets = gets or {} -- 直接使用缓存的标记码(第一次生成后就不变了) params.markcode = getMarkCode() -- 基础参数设置 params.timestamp = os.time() -- 签名计算(如果启用) if config.isSign then local t = {} for k, v in pairs(params) do table.insert(t, string.format("%s=%s", k, v)) end table.insert(t, config.APPKEY) params.sign = md5(table.concat(t, "&")) end -- 构建请求URL local urlParams = {} for k, v in pairs(params) do table.insert(urlParams, string.format("%s=%s", k, v)) end local url = string.format("%s/api.php?api=%s&app=%s&%s", config.HOST, api, config.APPID, table.concat(urlParams, "&")) -- 发送GET请求 local ok, response = pcall(function() return gg.makeRequest(url) end) if not ok or not response then return {code = 0, msg = "网络请求失败"} end -- 响应处理 local result = {code = 0, msg = "未知错误"} if response.content then -- 简化版JSON解析 result.code = tonumber(response.content:match('"code":(%d+)')) or 0 result.msg = response.content:match('"msg":"(.-)"') or "无效响应" -- 提取额外字段 if result.code == 1 or result.code == 200 then for _, field in ipairs(gets) do result[field] = response.content:match('"'..field..'":"(.-)"') or response.content:match('"'..field..'":(%d+)') end end else result.msg = "网络请求失败" end return result end -- 你的功能函数 function 至尊版卡密登录() menu1 = gg.choice({ '至尊版', '高兼容v1', '高兼容v2', '返回上一页'}, 2018,'优先使用至尊版 如果至尊版不兼容 就换高兼容v1\n高兼容v1不兼容就换高兼容v2\n如果所有版本都不能加密 请向作者反馈:\nTG:htnb8888\nQQ:3759992908') if menu1 == 1 then wdhtjmzzb() end if menu1 == 2 then jmxf1() end if menu1 == 3 then gjrv2() end if menu1 == 4 then HOME() end GLWW=-1 -- 你的功能代码 end ----至尊版 -- 验证卡密(每次登录时调用) function verifyCardKey() if cardKey == "" then return false end gg.toast("正在验证卡密...") local res = postApi("kmverify", {kami = cardKey}, {"time", "vip"}) if res.code == 1 or res.code == 200 then -- 更新过期时间 expireTime = tonumber(res.vip) or (os.time() + (tonumber(res.time) or 86400)) isLoggedIn = true saveData() gg.toast("卡密验证成功") return true else clearData() gg.toast("卡密验证失败") return false end end -- 检查登录状态并执行相应操作 function checkLoginAndExecute() if cardKey ~= "" then -- 每次都需要验证卡密 if verifyCardKey() then -- 验证成功,执行主要功能 return true else gg.alert("卡密验证失败,请重新登录") return false end end return false end function loginCardKey() -- 使用上次输入的卡密作为默认值 local defaultKey = lastCardKey or "" local input = gg.prompt({"请输入卡密"}, {defaultKey}, {"text"}) if not input or input[1] == "" then return false end -- 保存这次输入的卡密作为下次的默认值 lastCardKey = input[1] saveLastCardKey() gg.toast("正在验证卡密...") local res = postApi("kmlogon", {kami = input[1]}, {"time", "vip"}) if res.code == 1 or res.code == 200 then cardKey = input[1] -- 优先使用vip字段,如果没有则使用time字段 expireTime = tonumber(res.vip) or (os.time() + (tonumber(res.time) or 86400)) isLoggedIn = true if saveData() then gg.alert(string.format( "✅ 登录成功\n卡密: %s\n到期: %s", string.sub(cardKey, 1, 4).."****", os.date("%Y-%m-%d %H:%M", expireTime) )) -- 登录成功,执行主要功能 至尊版卡密登录() return true else gg.alert("❌ 数据保存失败") return false end else gg.alert("❌ 登录失败\n"..res.msg) return false end end -- 解绑卡密 function unbindCardKey() if not isLoggedIn then gg.alert("⚠️ 当前没有登录的卡密") return end gg.toast("正在解绑卡密...") local res = postApi("kmunmachine", {kami = cardKey}) if res.code == 1 or res.code == 200 then clearData() gg.alert("✅ 解绑成功") else gg.alert("❌ 解绑失败\n"..res.msg) end end -- 查看剩余时间 function checkRemainingTime() if not isLoggedIn then gg.alert("⚠️ 当前没有登录的卡密") return end -- 从服务器获取最新时间 gg.toast("正在查询剩余时间...") local res = postApi("kmgettime", {kami = cardKey}, {"time"}) if res.code == 1 or res.code == 200 then local serverTime = tonumber(res.time) if serverTime and serverTime > 0 then expireTime = os.time() + serverTime saveData() end end local remaining = expireTime - os.time() if remaining <= 0 then gg.alert("⚠️ 卡密已过期") clearData() else local days = math.floor(remaining / 86400) local hours = math.floor((remaining % 86400) / 3600) local minutes = math.floor((remaining % 3600) / 60) gg.alert(string.format( "🕒 到期时间: %s\n⏳ 剩余: %d天%d小时%d分", os.date("%Y-%m-%d %H:%M", expireTime), days, hours, minutes )) end end -- 查看公告 function showNotice() local res = postApi("notice", nil, {"app_gg"}) if res.code == 1 and res.app_gg then gg.alert("📢 系统公告\n"..res.app_gg) else gg.alert("暂无公告或获取失败") end end -- 检查更新 function checkUpdate() local res = postApi("ini", nil, { "version", "version_info", "app_update_show", "app_update_url", "app_update_must" }) if res.code == 1 then gg.toast("当前版本: "..(res.version or "未知")) -- 这里可以添加更新逻辑 end end -- 主菜单 function mainMenu() local menu = { isLoggedIn and ("已登录: "..string.sub(cardKey, 1, 4).."****") or "登录卡密", "解绑卡密", "查看剩余时间", "退出" } while true do local choice = gg.choice(menu, nil, "謊土加密至尊版 专属卡密验证") if not choice then break end if choice == 1 then if isLoggedIn then -- 已登录状态,验证并执行主要功能 if verifyCardKey() then 至尊版卡密登录() else gg.alert("卡密验证失败,请重新登录") end else -- 未登录状态,尝试登录 loginCardKey() end elseif choice == 2 then unbindCardKey() elseif choice == 3 then checkRemainingTime() elseif choice == 4 then return "exit" end -- 更新菜单状态 menu[1] = isLoggedIn and ("已登录: "..string.sub(cardKey, 1, 4).."****") or "登录卡密" end end -- 初始化系统 init() -- 启动时检查登录状态 if checkLoginAndExecute() then gg.toast("欢迎使用 - 卡密已验证") else gg.toast("请先登录卡密") end -- 主循环 while true do local ok, result = pcall(mainMenu) if not ok then gg.alert("系统错误: "..tostring(result)) elseif result == "exit" then break end gg.sleep(500) end gg.toast("系统已安全退出") end gg.alert("正在调用云模块请等待") gg.sleep(300) function musicMenu() local choice = gg.choice({ "☺yes", "😑no" }, nil, "是否搜索并播放音乐") if choice == 1 then hs() elseif choice == 2 then else end end function hs() search = gg.prompt({ "输入要搜索的歌曲\n可加上歌手名字", "设置显示数量(数字)", },g.sel,{ "text", }) if not search then return end gg.saveVariable(search,g.config) bei() go1=search[1] go3=search[2] jg=start(go1,go3) if jg.code == 200 then fh=jg.content fh=json(fh) --print(fh) Play(gqlb,idb) else function inspect() gg.alert("访问网络异常,错误代码:\n\n"..jg.code) end if not pcall(inspect) then print("网络异常,请先连接上网络") os.exit() end end end musicMenu() gg.alert("调用完毕 请使用") function Main() menu = gg.choice({ '謊土加密', '音乐区', '其他', '退出GG'}, 2018,'謊土工具箱') if menu == 1 then jmq() end if menu == 2 then wddmusic() end if menu == 3 then B() end if menu == 4 then Exit() end XGCK=-1 end function wddmusic() menu1 = gg.choice({ '播放音乐', '关闭音乐', '返回上一页'}, 2018,'謊土') if menu1 == 1 then hs() end if menu1 == 2 then gbyy() end if menu1 == 3 then HOME() end GLWW=-1 end function gbyy() gg.playMusic("stop") gg.playMusic("stop") gg.playMusic("stop") end function jmq() gg.alert('使用须知:\n如果使用付费版或者至尊版加密\n加密之后脚本执行报错或者UI出现bug\n因为jmp混淆的存在这是正常原因\n把脚本重新加密一遍就能解决','我已知晓') menu1 = gg.choice({ '謊土免费版(强度低)', '謊土付费版(强度高)', '謊土至尊版(强度超高)', '卡密购买链接', '返回上一页'}, 2018,'謊土加密\n卡密购买链接:\nhttps://fakay.ymyfak.com/links/06A953E3\n') if menu1 == 1 then a1() end if menu1 == 2 then a2() end if menu1 == 3 then zhizun() end if menu1 == 4 then shangdian() end if menu1 == 5 then HOME() end GLWW=-1 end function B() menu1 = gg.choice({ '工具箱更新日志', '加入QQ交流群', '返回上一页'}, 2018,'謊土') if menu1 == 1 then b1() end if menu1 == 2 then b2() end if menu1 == 3 then HOME() end GLWW=-1 end function shangdian() gg.alert('卡网链接:https://fakay.ymyfak.com/links/06A953E3','复制') 复制=gg.copyText('https://fakay.ymyfak.com/links/06A953E3') end function Exit() gg.alert('将要欢迎 下次使用') gg.toast("将要退出 欢迎下次使用") gg.sleep(1000) gg.exit(print("欢迎下次使用")) end function HOME() lw=1 Main() end cs = '謊土' while(true)do if gg.isVisible(true) then XGCK=1 gg.setVisible(false) end gg.clearResults() if XGCK==1 then Main() end end