function SearchWrite(Search, Write, Type ,Name) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1], Type) local count=gg.getResultCount() local result=gg.getResults(count) gg.clearResults() local data={} local base=Search[1][2] if (count > 0) then for i, v in ipairs(result) do v.isUseful=true end for k=2, #Search do local tmp={} local offset=Search[k][2]-base local num=Search[k][1] for i, v in ipairs(result) do tmp[#tmp+1]={} tmp[#tmp].address=v.address+offset tmp[#tmp].flags=v.flags end tmp=gg.getValues(tmp) for i, v in ipairs(tmp) do if (tostring(v.value) ~= tostring(num)) then result[i].isUseful=false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then local t={} local base=Search[1][2] for i=1, #data do for k, w in ipairs(Write) do offset=w[2]-base t[#t+1]={} t[#t].address=data[i]+offset t[#t].flags=Type t[#t].value = w[1] if (w[3] == true) then local item={} item[#item+1]=t[#t] item[#item].freeze=true gg.addListItems(item) end end end gg.setValues(t) gg.toast(Name.."\n.开启成功.") else return false end else gg.toast("Not Found") return false end end
local app = {}
function Assert(data) if data == nil or data == "" or data == "nil" then return false else return true end end function mearrass(memory, array) if Assert(memory) and Assert(array) then return true else return false end end function typetab(array, type) local datatype = {} for i = 1, #array do if Assert(array[i].type) then table.insert(datatype, i, array[i].type) else if Assert(type) then table.insert(datatype, i, type) else return false end end end return true, datatype end function app.memorysearch(memory, array, type) gg.setVisible(false) local isok = mearrass(memory, array) if isok then local isok, datatype = typetab(array, type) if isok then if Assert(array[1].hv) then gg.clearResults() gg.setRanges(memory) gg.searchNumber(array[1].lv .. "~" .. array[1].hv, datatype[1]) else gg.clearResults() gg.setRanges(memory) gg.searchNumber(array[1].lv, datatype[1]) end if gg.getResultCount() == 0 then return false else local tab = {} local data = gg.getResults(gg.getResultCount()) gg.clearResults() for i = 1, #data do data[i].isok = true end for i = 2, #array do local t = {} local offset = array[i].offset for x = 1, #data do t[#t + 1] = {} t[#t].address = data[x].address + offset t[#t].flags = datatype[i] end local t = gg.getValues(t) for z = 1, #t do if Assert(array[i].hv) then if tonumber(t[z].value) < tonumber(array[i].lv) or tonumber(t[z].value) > tonumber(array[i].hv) then data[z].isok = false end else if tostring(t[z].value) ~= tostring(array[i].lv) then data[z].isok = false end end end end for i = 1, #data do if data[i].isok then tab[#tab + 1] = data[i].address end end if #tab > 0 then return true, tab else return false end end else print("type参数错误") gg.toast("type参数错误") os.exit() end else print("memory or array参数错误") gg.toast("memory or array参数错误") os.exit() end end function app.memoryread(addr, type) local t = {} t[1] = {} t[1].address = addr t[1].flags = type if #t > 0 then return true, gg.getValues(t)[1].value else return false end end function app.memorywrite(addr, type, value, freeze) local t = {} t[1] = {} t[1].address = addr t[1].flags = type t[1].value = value if #t > 0 then if Assert(freeze) then t[1].freeze = freeze return gg.addListItems(t) else return gg.setValues(t) end else return false end end qmnb = function(daarr) local array = {} for i = 1, #daarr["搜索数组"] do local data = {["lv"] = daarr["搜索数组"][i][1], ["offset"] = daarr["搜索数组"][i][2], ["type"] = daarr["搜索类型"]} table.insert(array, i, data) end local isok, data = app.memorysearch(daarr["搜索内存"], array) if isok then for i = 1, #data do for x = 1, #daarr["修改数组"] do app.memorywrite(data[i] + daarr["修改数组"][x][2], daarr["搜索类型"], daarr["修改数组"][x][1]) end end gg.toast(daarr["功能名称"] .. "开启成功，共修改" .. #data * #daarr["修改数组"] .. "条数据") else gg.toast(daarr["功能名称"] .. "开启失败") end end
function CSM(C,S,M)if M~=nil then if C==nil then gg.toast(M..'开启失败\n原因：无主特种码')elseif C==false then gg.toast(M..'开启失败\n原因：无副特征码')else local x,d={},{}for i=1,#C do for k,w in ipairs(S)do local t={}t['address']=C[i]+w[1]*4 t['flags']=w[2]t['value']=w[3]if(w[4]==true)then t['freeze']=true d[#d+1]=t else x[#x+1]=t end end end gg.setValues(x)gg.addListItems(d)gg.toast(M..'\n开启成功')end elseif S~=nil then gg.clearResults()gg.setRanges(C[1])gg.searchNumber(C[2],C[3],false,gg.SIGN_EQUAL,C[4],C[5],C[6])local SL=gg.getResultCount()local SS=gg.getResults(SL)gg.clearResults()local DZ={}if(SL>0)then for i,v in ipairs(SS)do v.isUseful=true end for k=1,#S do local tmp={}local num=S[k][2]for i,v in ipairs(SS)do tmp[#tmp+1]={}tmp[#tmp].address=v.address+S[k][1]*4 tmp[#tmp].flags=v.flags end tmp=gg.getValues(tmp)for i,v in ipairs(tmp)do if (v.value~=num)then SS[i].isUseful=false end end end for i,v in ipairs(SS)do if(v.isUseful)then DZ[#DZ+1]=v.address end end if DZ[1]==nil then return false else return DZ end else return nil end end end
local function hqsj(dz,sj)local t={}for i,v in ipairs(sj)do t[i]={}t[i].address=dz+sj[i][1]*4 t[i].flags=sj[i][2]end local ss=gg.getValues(t)local s={}for i,v in ipairs(ss)do s[i]=ss[i]['value']end return s end
local function DXWJ(l,m,n) if m==1 then local c=io.open(l,'r') if c==nil then return c else local c=io.open(l,'r') g=c:read('*a') c:close() end return g elseif m==2 then local file=io.open(l,'w') file:write(n) file:close() end end
function dqzdy(l)
local jjj=DXWJ(l,1)
if jjj==nil then 
ZDYZB={}
else
local sss=DXWJ(l,1)
if load("ZDYZB="..sss)==nil then ZDYZB={}else 
load("ZDYZB="..sss)()
end
end
end

local kqgn = " [[开启]]"
local gbgn = " [[关闭]]"
local gn7=kqgn
local gn2=kqgn
local gn3=kqgn
local gn4=kqgn
local gn9=kqgn

function QJJSC()
gg.clearResults()
if gn7 == " [[开启]]" then
gn7 = gbgn
CJJSK()
gg.clearResults()
elseif gn7 == " [[关闭]]" then
gg.clearResults()
CJJSG()
gn7 = kqgn
gg.clearResults()
end
end

function CJJSK()
local DZ=CSM({16384,167772166,4},{{26,1065353216},})
CSM(DZ,{{26,4,1082130432},},"加速.超")
end

function CJJSG()
local DZ=CSM({16384,167772166,4},{{26,1082130432},})
CSM(DZ,{{26,4,1065353216},},"加速.超[关闭]")
end

function PTTB()
gg.clearResults()
if gn9 == " [[开启]]" then
gn9 = gbgn
PTBK()
gg.clearResults()
elseif gn9 == " [[关闭]]" then
gg.clearResults()
PTBG()
gn9 = kqgn
gg.clearResults()
end
end

function PTBK()
local DZ=CSM({16384,1067030938,4},{{2,1065353216},})
CSM(DZ,{{2,4,1077936128},},"加速")
local DZ=CSM({16384,1068708659,4},{{2,1065353216},})
CSM(DZ,{{2,4,1077936128},},"加速")
local DZ=CSM({16384,1148846080,4},{{-188,1065353216},})
CSM(DZ,{{-188,4,-748104539},},"吃怪")
local DZ=CSM({16384,1148846080,4},{{-188,1074161254},})
CSM(DZ,{{-188,4,-748104539},},"吃怪")
local DZ=CSM({16384,1120403456,4},{{3,167772166},})
CSM(DZ,{{0,4,1116471296},},"跑图")
local DZ=CSM({16384,1117782016,4},{{3,167772166},})
CSM(DZ,{{0,4,1116471296},},"跑图")
end

function PTBG()
local DZ=CSM({16384,1067030938,4},{{2,1077936128},})
CSM(DZ,{{2,4,1065353216},},"加速关闭")
local DZ=CSM({16384,1068708659,4},{{2,1077936128},})
CSM(DZ,{{2,4,1065353216},},"加速关闭")
local DZ=CSM({16384,1148846080,4},{{-188,-748104539},})
CSM(DZ,{{-188,4,1074161254},},"吃怪关闭")--2.1F
local DZ=CSM({16384,1116471296,4},{{3,167772166},})
CSM(DZ,{{0,4,1117782016},},"跑图关闭")--80F
end

function BOKG()
gg.clearResults()
if gn2 == " [[开启]]" then
gn2 = gbgn
bossA()
gg.clearResults()
elseif gn2 == " [[关闭]]" then
gg.clearResults()
bossG()
gn2 = kqgn
gg.clearResults()
end
end

function bossA()--吃怪0开
gg.clearResults()
gg.setRanges(16384)
gg.searchNumber("1067030938", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.getResults(500)
gg.editAll("1373602934", 4)
gg.toast("已开启")
else
gg.clearResults()
gg.setRanges(16384)
gg.searchNumber("1068708659", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.getResults(500)
gg.editAll("1373602934", 4)
gg.toast("已开启")
else
gg.toast("开启失败")
end
end
gg.clearResults()
end

function bossG()--吃怪0关
gg.clearResults()
gg.setRanges(16384)
gg.searchNumber("1373602934", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.searchNumber("1373602934", 4, false, gg.SIGN_EQUAL,0,-1)
gg.getResults(500)
gg.editAll("1068708659", 4)
gg.toast("已关闭")
else
gg.toast("关闭失败")
end
gg.clearResults()
end

function BOKGB()--吃怪1
gg.clearResults()
if gn3 == " [[开启]]" then
gn3 = gbgn
bossK(-135162190)
gg.clearResults()
elseif gn3 == " [[关闭]]" then
gg.clearResults()
bossGB(-135162190)
gn3 = kqgn
gg.clearResults()
end
end

function BOKGC()--吃怪2
gg.clearResults()
if gn4 == " [[开启]]" then
gn4 = gbgn
bossK(2012321458)
gg.clearResults()
elseif gn4 == " [[关闭]]" then
gg.clearResults()
bossGB(2012321458)
gn4 = kqgn
end
gg.clearResults()
end

function bossK(szk)
gg.clearResults()
gg.setRanges(16384)
gg.searchNumber("1176256512", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.searchNumber("1176256512", 4, false, gg.SIGN_EQUAL,0,-1)
gg.getResults(500)
gg.editAll(szk, 4)
gg.toast("已开启")
else
gg.clearResults()
gg.setRanges(16384)
gg.searchNumber("1176261632", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.searchNumber("1176261632", 4, false, gg.SIGN_EQUAL,0,-1)
gg.getResults(500)
gg.editAll(szk, 4)
gg.toast("已开启")
else
gg.toast("开启失败")
end
end
gg.clearResults()
end

function bossGB(szg)
gg.clearResults()
gg.setRanges(16384)
gg.searchNumber(szg, 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.searchNumber(szg, 4, false, gg.SIGN_EQUAL,0,-1)
gg.getResults(500)
gg.editAll("1176261632", 4)
gg.toast("已关闭")
else
gg.toast("关闭失败")
end
gg.clearResults()
end

---------------分割线---------------------
ab4387bb2b5ecb6984b689ac89e82c2dlr=function (vip)
function md5(code) local code = tostring(code) local HexTable = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"} local A = 0x67452301 local B = 0xefcdab89 local C = 0x98badcfe local D = 0x10325476 local S11 = 7 local S12 = 12 local S13 = 17 local S14 = 22 local S21 = 5 local S22 = 9 local S23 = 14 local S24 = 20 local S31 = 4 local S32 = 11 local S33 = 16 local S34 = 23 local S41 = 6 local S42 = 10 local S43 = 15 local S44 = 21 local function F(x,y,z) return (x & y) | ((~x) & z) end local function G(x,y,z) return (x & z) | (y & (~z)) end local function H(x,y,z) return x ~ y ~ z end local function I(x,y,z) return y ~ (x | (~z)) end local function FF(a,b,c,d,x,s,ac) a = a + F(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function GG(a,b,c,d,x,s,ac) a = a + G(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function HH(a,b,c,d,x,s,ac) a = a + H(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function II(a,b,c,d,x,s,ac) a = a + I(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function MD5StringFill(s) local len = s:len() local mod512 = len * 8 % 512 local fillSize = (448 - mod512) // 8 if mod512 > 448 then fillSize = (960 - mod512) // 8 end local rTab = {} local byteIndex = 1 for i = 1,len do local index = (i - 1) // 4 + 1 rTab[index] = rTab[index] or 0 rTab[index] = rTab[index] | (s:byte(i) << (byteIndex - 1) * 8) byteIndex = byteIndex + 1 if byteIndex == 5 then byteIndex = 1 end end local b0x80 = false local tLen = #rTab if byteIndex ~= 1 then rTab[tLen] = rTab[tLen] | 0x80 << (byteIndex - 1) * 8 b0x80 = true end for i = 1,fillSize // 4 do if not b0x80 and i == 1 then rTab[tLen + i] = 0x80 else rTab[tLen + i] = 0x0 end end local bitLen = math.floor(len * 8) tLen = #rTab rTab[tLen + 1] = bitLen & 0xffffffff rTab[tLen + 2] = bitLen >> 32 return rTab end function getmd5(s) local fillTab = MD5StringFill(s) local result = {A,B,C,D} for i = 1,#fillTab // 16 do local a = result[1] local b = result[2] local c = result[3] local d = result[4] local offset = (i - 1) * 16 + 1 a = FF(a, b, c, d, fillTab[offset + 0], S11, 0xd76aa478) d = FF(d, a, b, c, fillTab[offset + 1], S12, 0xe8c7b756) c = FF(c, d, a, b, fillTab[offset + 2], S13, 0x242070db) b = FF(b, c, d, a, fillTab[offset + 3], S14, 0xc1bdceee) a = FF(a, b, c, d, fillTab[offset + 4], S11, 0xf57c0faf) d = FF(d, a, b, c, fillTab[offset + 5], S12, 0x4787c62a) c = FF(c, d, a, b, fillTab[offset + 6], S13, 0xa8304613) b = FF(b, c, d, a, fillTab[offset + 7], S14, 0xfd469501) a = FF(a, b, c, d, fillTab[offset + 8], S11, 0x698098d8) d = FF(d, a, b, c, fillTab[offset + 9], S12, 0x8b44f7af) c = FF(c, d, a, b, fillTab[offset + 10], S13, 0xffff5bb1) b = FF(b, c, d, a, fillTab[offset + 11], S14, 0x895cd7be) a = FF(a, b, c, d, fillTab[offset + 12], S11, 0x6b901122) d = FF(d, a, b, c, fillTab[offset + 13], S12, 0xfd987193) c = FF(c, d, a, b, fillTab[offset + 14], S13, 0xa679438e) b = FF(b, c, d, a, fillTab[offset + 15], S14, 0x49b40821) a = GG(a, b, c, d, fillTab[offset + 1], S21, 0xf61e2562) d = GG(d, a, b, c, fillTab[offset + 6], S22, 0xc040b340) c = GG(c, d, a, b, fillTab[offset + 11], S23, 0x265e5a51) b = GG(b, c, d, a, fillTab[offset + 0], S24, 0xe9b6c7aa) a = GG(a, b, c, d, fillTab[offset + 5], S21, 0xd62f105d) d = GG(d, a, b, c, fillTab[offset + 10], S22, 0x2441453) c = GG(c, d, a, b, fillTab[offset + 15], S23, 0xd8a1e681) b = GG(b, c, d, a, fillTab[offset + 4], S24, 0xe7d3fbc8) a = GG(a, b, c, d, fillTab[offset + 9], S21, 0x21e1cde6) d = GG(d, a, b, c, fillTab[offset + 14], S22, 0xc33707d6) c = GG(c, d, a, b, fillTab[offset + 3], S23, 0xf4d50d87) b = GG(b, c, d, a, fillTab[offset + 8], S24, 0x455a14ed) a = GG(a, b, c, d, fillTab[offset + 13], S21, 0xa9e3e905) d = GG(d, a, b, c, fillTab[offset + 2], S22, 0xfcefa3f8) c = GG(c, d, a, b, fillTab[offset + 7], S23, 0x676f02d9) b = GG(b, c, d, a, fillTab[offset + 12], S24, 0x8d2a4c8a) a = HH(a, b, c, d, fillTab[offset + 5], S31, 0xfffa3942) d = HH(d, a, b, c, fillTab[offset + 8], S32, 0x8771f681) c = HH(c, d, a, b, fillTab[offset + 11], S33, 0x6d9d6122) b = HH(b, c, d, a, fillTab[offset + 14], S34, 0xfde5380c) a = HH(a, b, c, d, fillTab[offset + 1], S31, 0xa4beea44) d = HH(d, a, b, c, fillTab[offset + 4], S32, 0x4bdecfa9) c = HH(c, d, a, b, fillTab[offset + 7], S33, 0xf6bb4b60) b = HH(b, c, d, a, fillTab[offset + 10], S34, 0xbebfbc70) a = HH(a, b, c, d, fillTab[offset + 13], S31, 0x289b7ec6) d = HH(d, a, b, c, fillTab[offset + 0], S32, 0xeaa127fa) c = HH(c, d, a, b, fillTab[offset + 3], S33, 0xd4ef3085) b = HH(b, c, d, a, fillTab[offset + 6], S34, 0x4881d05) a = HH(a, b, c, d, fillTab[offset + 9], S31, 0xd9d4d039) d = HH(d, a, b, c, fillTab[offset + 12], S32, 0xe6db99e5) c = HH(c, d, a, b, fillTab[offset + 15], S33, 0x1fa27cf8) b = HH(b, c, d, a, fillTab[offset + 2], S34, 0xc4ac5665) a = II(a, b, c, d, fillTab[offset + 0], S41, 0xf4292244) d = II(d, a, b, c, fillTab[offset + 7], S42, 0x432aff97) c = II(c, d, a, b, fillTab[offset + 14], S43, 0xab9423a7) b = II(b, c, d, a, fillTab[offset + 5], S44, 0xfc93a039) a = II(a, b, c, d, fillTab[offset + 12], S41, 0x655b59c3) d = II(d, a, b, c, fillTab[offset + 3], S42, 0x8f0ccc92) c = II(c, d, a, b, fillTab[offset + 10], S43, 0xffeff47d) b = II(b, c, d, a, fillTab[offset + 1], S44, 0x85845dd1) a = II(a, b, c, d, fillTab[offset + 8], S41, 0x6fa87e4f) d = II(d, a, b, c, fillTab[offset + 15], S42, 0xfe2ce6e0) c = II(c, d, a, b, fillTab[offset + 6], S43, 0xa3014314) b = II(b, c, d, a, fillTab[offset + 13], S44, 0x4e0811a1) a = II(a, b, c, d, fillTab[offset + 4], S41, 0xf7537e82) d = II(d, a, b, c, fillTab[offset + 11], S42, 0xbd3af235) c = II(c, d, a, b, fillTab[offset + 2], S43, 0x2ad7d2bb) b = II(b, c, d, a, fillTab[offset + 9], S44, 0xeb86d391) result[1] = result[1] + a result[2] = result[2] + b result[3] = result[3] + c result[4] = result[4] + d result[1] = result[1] & 0xffffffff result[2] = result[2] & 0xffffffff result[3] = result[3] & 0xffffffff result[4] = result[4] & 0xffffffff end local retStr = '' for i = 1,4 do for _ = 1,4 do local temp = result[i] & 0x0F local str = HexTable[temp + 1] result[i] = result[i] >> 4 temp = result[i] & 0x0F retStr = retStr .. HexTable[temp + 1] .. str result[i] = result[i] >> 4 end end return string.lower(retStr) end return getmd5(code) end

ZZRc4 = {}
ZZMathBit = {}
function ZZMathBit.__xorBit(left, right) return (left + right) == 1 and 1 or 0 end function ZZMathBit.__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 ZZMathBit.xorOp(left, right) return ZZMathBit.__base(left, right, ZZMathBit.__xorBit) end function RC4(text,key,kasi)
  if kasi==false then str = text str=str:gsub("[%s%p]",""):upper() local index=1 local ret="" for index=1,str:len(),2 do ret=ret..string.char(tonumber(str:sub(index,index+1),16)) end text=ret end 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(ZZMathBit.xorOp(schedule[i], c)) end return table.concat(res) end local textLen = string.len(text) local schedule = KSA(key) local k = PRGA(schedule, textLen) str=output(k, text) if kasi==true then str = tostring(str) local index=1 local ret="" for index=1,str:len() do ret=ret..string.format("%02X",str:sub(index):byte()) end return string.lower(ret) else return str end end

function ultra(get,post) local c=gg.makeRequest(get,nil,post).content return c end

a_xl={
"http://cdn3.simpleauth.cn/",
"http://cdn4.simpleauth.cn/",
"http://cdn5.simpleauth.cn/",
"http://cdn2.simpleauth.cn/",
"https://cdn1.simpleauth.cn/",
"http://simpleauth.cn/",
}
function a_X()
a_mi={"线路①","线路②","线路③","线路④","线路⑤","线路⑥"}
a_xh=gg.choice(a_mi,nil,"选择要使用的快速线路")--单选功能
if a_xh==nil then
a_X()
else
xxxxxxx=a_xl[a_xh]
end
end
a_X()

function DLYZ(rc,aid,akey,bb,kmlj)
xxxxxxx_RC4_key=rc
xxxxxxx_APPID=aid
xxxxxxx_APPKEY=akey
xxxbanb=bb--"1.0"
xxxQQ=""
--gg.EXT_
FILES_DIR=kmlj--"/sdcard/Download/"
end

function MAIN_C()
local xxxxxxx_Kami=xxxxxxx.."/api.php?api=kmlogon"
--接口名称[卡密登录]
local xxxxxxx_jieba=xxxxxxx.."/api.php?api=kmunmachine"
--接口名称[卡密解绑]
local xxxxxxx_to_configure=xxxxxxx.."/api.php?api=ini"
--接口名称[应用配置]
local xxxxxxx_Notice=xxxxxxx.."/api.php?api=notice"
--接口名称[应用公告]

local xxxxxxx_RC4=true
--是否 RC4 加密[false=关 true=开]
--选择 RC4加密-2 否则会乱码
--打开 签名放DATA里:打开
AMI_YDO="/sdcard/Download/"

local bm = gg.getTargetPackage()
local PKG = string.match
if PKG(bm,"com.tencent.hxh") == "com.tencent.hxh" then
DLYZ("4FjN77Ie1g7IZKGz","10729","ddIi7H5lhoYCL558","1.0","/sdcard/Download/")
elseif PKG(bm,"ryqmx") == "ryqmx" then--荣耀
DLYZ("G000HHDFwwQc92M0","11346","7bOP8uuEOl8PoN5L","1.0","/sdcard/Android/")
else
gg.alert("温馨提示::"..'\n'.."检测到未匹配到此脚本的进程!!!\n请先选择游戏进程再开启本脚本!!！")
gg.copyText(bm)
print("已复制进程包名")
while true do     
os.exit();
end
end

----------------------------------------------------------------------------------------------------------------------
if xxxxxxx_APPID=="" or xxxxxxx_RC4_key=="" or xxxxxxx_APPKEY=="" then
  gg.alert("对接数据,空...")
  os.exit()
end

----------------------------------------------------------------------------------------------------------------------
Notice=ultra(xxxxxxx_Notice.."&app=".. xxxxxxx_APPID,"")

No=Notice:match('"code":(.-),')
if No ~= nil then
  No=Notice:match('"msg":"(.-)",')
  if No==nil then
    xxxxxxx_RC4=false--判定是否关闭
   else
    gg.alert("公告接口："..No)
    os.exit()
  end
end

if xxxxxxx_RC4 == true then
  Notice=RC4(Notice,xxxxxxx_RC4_key,false)
end

text=string.gsub(Notice,":",'=')
text=text:gsub('"=','=')
text=text:gsub('{"','{')
text=text:gsub(',"',',')
load("Notice="..text)()

if Notice.code == 200 then
gg.alert(Notice.msg.app_gg)
else
gg.alert(Notice.msg)
end
----------------------------------上面是公告------------------------------------------------------------------------------------

file=ultra(xxxxxxx_to_configure.."&app="..xxxxxxx_APPID,"")
No=file:match('"code":(.-),')
if No ~= nil then
  No=file:match('"msg":"(.-)",')
  if No==nil then
    xxxxxxx_RC4=false--判定是否关闭
   else
    gg.alert("外链接接口："..No)
    os.exit()
  end
end

if xxxxxxx_RC4==true then
  file=RC4(file,xxxxxxx_RC4_key,false)
end

text=string.gsub(file,":",'=')
text=text:gsub("https=",'https:')
text=text:gsub("http=",'http:')
text=text:gsub('"=','=')
text=text:gsub(',"',',')
text=text:gsub('{"','{')

load("file="..text)()

if file.code == 200 then
if file.msg.version == xxxbanb then
gg.toast("已是最新版本，无需更新")
else
YU=gg.alert("发现新版本，请更新！:\n"..file.msg.app_update_show,"确定")

if file.msg.app_update_must == 'y' then
gg.alert("作者开启强制更新！","复制链接")
print(" 复制下载 :\n"..file.msg.app_update_url)
gg.copyText(file.msg.app_update_url)
os.exit()
else
gg.alert("尽快更新版本！")
print(" 复制下载 :\n"..file.msg.app_update_url)
gg.copyText(file.msg.app_update_url)
end

end
else
gg.alert(file.msg)
os.exit() 
end

---------------------------------------上面是检查更新-------------------------------------------------------------------------------
function yanzzzzz(km,sbm)

key=md5("kami="..km.."&markcode="..sbm.."&t="..os.time().."&".. xxxxxxx_APPKEY)
--计算签名

Random=md5(RC4(os.time().."极简云",xxxxxxx_RC4_key,true)..xxxxxxx_APPKEY..sbm)
--随机[用来计算是否相等]

bops="kami="..km.."&markcode="..sbm.."&t="..os.time().."&sign="..key
--需要请求的数据

if  xxxxxxx_RC4 == true then
bops="data="..RC4(bops,xxxxxxx_RC4_key,true)
end-- 把请求数据用RC4加密

HUT=ultra(xxxxxxx_Kami.."&app=".. xxxxxxx_APPID,bops.."&value="..Random)
--请求数据

if HUT~=nil then
if  xxxxxxx_RC4 == true then
HUT=RC4(HUT,xxxxxxx_RC4_key,false) 
end-- 把返回的数据用RC4解密

qued=HUT:match('code":(.-),')--获取编号 200是成功
vip=HUT:match('vip":"(.-)"},')--获取 卡密时间
yanzen=HUT:match('check":"(.-)"')--获取随机值
tinme=HUT:match('time":(.-),')--获取时间搓
fanhui=HUT:match('msg":"(.-)",')--获取错误

if qued~="200" then
gg.alert(fanhui)--返回错误
io.open(AMI_YDO.."/km","w"):write("")--写
else

if (tinme-os.time())>500 or (tinme-os.time())<-500 then
gg.setVisible(false)
gg.toast("\n本地数据超时！")
else--时间10小于就跳转

if yanzen~=md5(tinme..xxxxxxx_APPKEY..Random) then
gg.setVisible(false)
gg.toast("\n️请不要修改数据！")
else--网络数据是否修改

gg.setVisible(false)
vip1=os.date("%Y".."年".."%m".."月".."%d".."日".."\r".."%H".."时".."%M".."分".."%S".."秒\n",vip)
io.open(AMI_YDO.."/km","w"):write(km)--写
kll=gg.alert('\n'.."登入成功:"..'\n'..'\n'.."[到期时间]\n"..vip1,"确定","返回")--获取到期时间
if kll==2 then
io.open(AMI_YDO.."/lko","w"):write("false")--写
oqvqo(xxxxxxx)
end

--登入成功后的动作----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--ab4387bb2b5ecb6984b689ac89e82c2d23=function (vip)
btk={"💠","🌀","☯","💮","☣","🌱","✿","✰","🌸","🌼",}
local tsbt = "💠"
sjbt=btk[math.random(1,#btk)]
-------------猎人功能区------------
local kqgn = " [[开启]]"
local gbgn = " [[关闭]]"
local gn1 = kqgn
local gn2=kqgn
local gn3=kqgn
local gn4=kqgn
local gn5=kqgn
local gn6=kqgn
--local gn7=kqgn
local gn9=kqgn
function Main()
menu = gg.multiChoice({
     ".无敌.",
	 ".吃怪0."..gn2..".-(配合无敌！开启后不能移动).",
     ".吃怪1."..gn3..".-(配合无敌！开启后不能移动).",
     ".吃怪2."..gn4..".-(配合无敌！开启后不能移动).",
     ".移动吃怪."..gn9..".\n(若个别怪无法消除请开启吃怪1/2,记得关闭)",	 
	 ".无敌+全屏+增伤.(普通图).",--1
	 ".无敌+增伤.(幻界专用).",--2
	 ".无敌+全屏+伙伴秒杀.(团本).",--3
	 ".无敌+全屏+增伤.(狂战+剑术).",--4
	 ".呆怪.",--5
	 ".海战.",--6
	 ".无尽抵御.",--8
	 ".加速.超."..gn1,--9
	 --".全局加速<模拟器专用>."..gn2..'\n(请到设置-冻结间隔调成3000).',
	 ".单开菜单.",--10
".退出脚本."},--12
nil, ".水墨.\n禁止::勿用排位PK.\n"..os.date("当前时间::%Y年-%m月-%d日 %H时:%M分:%S秒"))
if menu == nil then else
if menu[1] == true then lrwd() end
if menu[2] == true then BOKG() end
if menu[3] == true then BOKGB() end
if menu[4] == true then BOKGC() end
if menu[5] == true then PTTB() end
if menu[6] == true then SYJXW() end
if menu[7] == true then SYJXX() end
if menu[8] == true then SYJXT() end
if menu[9] == true then zszy() end
if menu[10] == true then sydgg() end
if menu[11] == true then syhz() end
if menu[12] == true then WJDY() end
if menu[13] == true then QJJS() end
--if menu[9] == true then QJJSM() end
if menu[14] == true then AA() end
if menu[15] == true then Exit() end
end
XGCK=-1
while true do
  if gg.isVisible(true) then
    XGCK = 1
    gg.setVisible(false)  
  end
  gg.clearResults()
  if XGCK == 1 then
    Main()
  end
end
end

function QJJS()
gg.clearResults()
if gn1 == " [[开启]]" then
gn1 = gbgn
lrjs()
gg.clearResults()
elseif gn1 == " [[关闭]]" then
gg.clearResults()
lrjsgb()
gn1 = kqgn
gg.clearResults()
end
end

function WJDY()--无尽抵御
gg.toast("此功能会循环执行,点击悬浮窗即可停止")
lrwd()
--sybt
gg.sleep(500)
lrqp(1097859072)--15
--gg.sleep(500)
wmbs(10)
--sydg()
end

function SYJXW()--普通
local time=os.clock()
lrwd()
--sybt()
gg.sleep(500)
lrqp(1097859072)--15
gg.sleep(500)
wmbs(100)
sybg(2)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function zszy()--狂战+剑术
local time=os.clock()
lrwd()
--sybt()
lrqp(1097859072)--15
gg.sleep(500)
wmbs(100)
sybg(40)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXX()--幻界
local time=os.clock()
lrwd()
--sybt()
sybg(4)--5
gg.sleep(500)
wmbs(260)--150
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXT()--团本
local time=os.clock()
lrwd()
--sybt()
gg.sleep(500)
lrqp(1103626240)--25
--sybg(2)
gg.sleep(500)
wmbs(350)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function wmbs(wm)
local DZ=CSM({32,1108082688,4},{{1,1108082688},{-3,1},})
CSM(DZ,{{-3,4,wm},},"倍伤")
end
--[[
function wmbs(bs)
local DZ=CSM({32,1108082688,4},{{-3,1},{-2,0},{-1,0},{1,1108082688},})--{-10,256}
CSM(DZ,{{-3,4,bs},},"倍伤")
end
]]
function AA()
menub = gg.multiChoice({
  ".无敌.",
  ".霸体.",
  ".倍攻.",
  ".全屏.",
  --".全局加速关闭.",
  ".返回主页"},
nil,".禁止用于排位PK.".."\n.注意:请低调使用.")
if menub == nil then else
if menub[1] == true then lrwd() end
if menub[2] == true then sybt() end
if menub[3] == true then sybg(4) end
if menub[4] == true then lrqp(1103626240) end
--if menub[5] == true then lrjsgb() end
if menub[5] == true then Main() end
end
GLWW=-1
while true do
  if gg.isVisible(true) then
   GLWW = 1
    gg.setVisible(false)   
  end
  gg.clearResults()
  if GLWW == 1 then
    AA()
  end
end
end

function syhz()
local time=os.clock()
lrwd()
sybt()
lrqp(1120403456)
--sybg(4)
gg.sleep(600)
wmbs(20)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function lrjs()
local DZ=CSM({4,1022739087,4},{{-1,1073741824},{-2,1065353216},})
CSM(DZ,{{-2,4,1072064102,true},},"全局加速")
end

function lrjsgb()
gg.clearList()
gg.clearResults()
local DZ=CSM({4,1022739087,4},{{-1,1073741824},{-2,1072064102},})
CSM(DZ,{{-2,4,1065353216},},"全局加速关闭")
end

function lrwd()
local DZ=CSM({32,16777216,4},{{-1,256},{2,1},{17,9},{22,1065353216},})
CSM(DZ,{{22,4,-971227136},},"无敌")
end

function sywdx()
gg.clearResults()
local memory = 32
local array = {
{["lv"] = 16777216, ["type"] = gg.TYPE_DWORD},
{["lv"] = 256, ["offset"] = -4, ["type"] = 4},
{["lv"] = 1, ["offset"] = 8, ["type"] = 4},
{["lv"] = 9, ["offset"] = 68, ["type"] = 4},
{["lv"] = 1065353216, ["offset"] = 88, ["type"] = 4},
}
local isok, data = app.memorysearch(memory, array)
if isok then
for i = 1, #data do
app.memorywrite(data[i] +88, 16, -10000.0)
end
gg.toast("无敌开启成功")
else
gg.toast("无敌开启失败")
end
--gg.clearList()
gg.clearResults()
end

function sybt()
gg.clearResults()
gg.setRanges(32)
    local name="霸体"
    local dataType = gg.TYPE_FLOAT
    local tb1 = {{7.8472714e-44, 0},{2.24207754e-42, 8},}
    local tb2 = {{0, 4,false},} 
    SearchWrite(tb1, tb2, dataType ,name)
    --gg.clearList()
gg.clearResults()
end

function ysx(g)
gg.clearResults()
local memory = 32
local array = {
{["lv"] = 16777216, ["type"] = gg.TYPE_DWORD},
{["lv"] = 1063963361, ["hv"] = 1065905876, ["offset"] = 8, ["type"] = 4}
}
local isok, data = app.memorysearch(memory, array)
if isok then
for i = 1, #data do
--app.memorywrite(data[i] -36, 16, 2.0)--移速
app.memorywrite(data[i] -48, 16, g)
end
gg.toast("攻速开启成功")
else
gg.toast("开启失败")
end
--gg.clearList()
gg.clearResults()
end

function lrqpx(r)
local DZ=CSM({32,1065353215,4},{{-6,864026624},{2,864026624},})
CSM(DZ,{{3,4,r},{4,4,r},{6,4,r},{7,4,r},{8,4,r},},"范围伤害")
end

function lrqp(r)
local DZ=CSM({32,1065353215,4},{{-2,1065353216,4},{-6,864026624},{2,864026624},{-7,3,4},{48,864026624},})
CSM(DZ,{{6,4,r},{7,4,r},{8,4,r},},"范围伤害")
end

function sybg(k)
gg.clearResults()
gg.setRanges(32)
gg.searchNumber("0~1;0.5~3.5F::25", 4, false, gg.SIGN_EQUAL,0x00000000, 0xC777FFFF)
local Count=gg.getResultCount()
if (Count > 0) then
gg.refineNumber("1;1;0;0;0;0;0.5~3.5F::25", 4)
gg.refineNumber("1;0::5", 4)
gg.refineNumber("1", 4)
gg.getResults(500)
gg.editAll(k, 4)
gg.toast("增伤已开启")
else
gg.toast("开启失败")
end
--gg.clearList()
gg.clearResults()
end

function sydgg()
gg.clearResults()
gg.setRanges(32)
    local name="呆怪"
    local dataType = gg.TYPE_DWORD
    local tb1 = {{251, 0},{105, 0x158},{109, 0x15C},}
    local tb2 = {{39, 0x84,false},} 
    SearchWrite(tb1, tb2, dataType ,name)
    --gg.clearList()
gg.clearResults()
end

function sydg()
while true do
gg.sleep(1000)
if gg.isVisible(true)then break 
else
gg.clearResults()
local memory = 32
local array = {
{["lv"] = 251, ["type"] = gg.TYPE_DWORD},
{["lv"] = 105, ["offset"] = 344, ["type"] = 4},
{["lv"] = 109, ["offset"] = 348, ["type"] = 4},
}
local isok, data = app.memorysearch(memory, array)
if isok then
for i = 1, #data do
app.memorywrite(data[i] +132, 4, 39)
end
--gg.toast("呆怪开启成功")
else
gg.toast("开启失败")
end
end
--gg.clearList()
gg.clearResults()
end
end

---------------荣耀功能区-------------
function ryms()
 local DZ=CSM({32,20000,4},{{-1,2},{-2,2},{2,1000},})--{7,115},
 CSM(DZ,{{2,4,10},{0,4,20000000},},"秒杀")   
end

function ryjs()
 local DZ=CSM({32,10000,4},{{2,1000},})--{7,115},
 CSM(DZ,{{2,4,1},},"减伤")   
end

function rydg()
 local DZ=CSM({32,16843009,4},{{22,1000000},})
 CSM(DZ,{{22,4,1},},"定怪")   
end

function rybj()
 local DZ=CSM({32,70,4},{{2,1000},})
 CSM(DZ,{{2,4,1},},"招招暴击")   
end

function ryys()
 local DZ=CSM({32,4095,4},{{1,4096},{2,10000},})
 CSM(DZ,{{2,4,5000},},"全局图内移速")   
end

function rygs()
 local DZ=CSM({32,16383,4},{{1,16384},})--,{-17,1065353216}
 CSM(DZ,{{-18,4,1073741824},},"全局攻速")   
end

function rycd()
 local DZ=CSM({32,500,4},{{-1,1000},})
 CSM(DZ,{{-1,4,1},},"技能无CD")   
end

function RYQMX()
menur = gg.multiChoice({
  ".秒杀+减伤.(一图一开)",
  ".定怪.(一图一开)",
  ".招招暴击.(一图一开)",
  ".图内全局移速.(进图开一次)",
  ".全局攻速.(进图打一下开)",
  ".技能无CD.(进图开一次)",
  ".退出."},
nil,".禁止用于排位PK.\n.注意:请低调使用.")
if menur == nil then else
if menur[1] == true then ryms() ryjs() end
if menur[2] == true then rydg() end
if menur[3] == true then rybj() end
if menur[4] == true then ryys() end
if menur[5] == true then rygs() end
if menur[6] == true then rycd() end
if menur[7] == true then Exit() end
end
GLWW=-1
while true do
  if gg.isVisible(true) then
   GLWW = 1
    gg.setVisible(false)   
  end
  gg.clearResults()
  if GLWW == 1 then
    RYQMX()
  end
end
end

function Exit()
gg.clearList()
gg.clearResults()
print(".欢迎使用本辅助."..'\n'..".水墨.")
os.exit()
end

local bm = gg.getTargetPackage()
local PKG = string.match
if PKG(bm,"com.tencent.hxh") == "com.tencent.hxh" then Main()
elseif PKG(bm,"ryqmx") == "ryqmx" then RYQMX()
else
gg.alert("温馨提示::"..'\n'.."检测到未匹配到此脚本的进程!!!\n请先选择游戏进程再开启本脚本!!！")
gg.copyText(bm)
print("已复制进程包名")
while true do     
os.exit();
end
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end
end
end
else
gg.setVisible(false)
gg.toast("\n️(▔_▔) 请检查网络！")
end

end
---[=[  卡密登入↑ ]=]----------------------------------------------
function jiebang(km,sbm)
gg.setVisible(false)
key=md5("kami="..km.."&markcode="..sbm.."&t="..os.time().."&".. xxxxxxx_APPKEY)

bops="kami="..km.."&markcode="..sbm.."&t="..os.time().."&sign="..key

if  xxxxxxx_RC4 == true then
bops= "data="..RC4(bops,xxxxxxx_RC4_key,true) 
end

HUT=ultra(xxxxxxx_jieba.."&app=".. xxxxxxx_APPID,bops)

if  xxxxxxx_RC4 == true then
HUT=RC4(HUT,xxxxxxx_RC4_key,false) 
end-- xxxxxxx_Base64

qued=HUT:match('code":(.-),')
fanhui=HUT:match('msg":"(.-)",')
yanzen=HUT:match('check":"(.-)"')
tinme=HUT:match('time":(.-),')
gg.toast(fanhui)
end

---[=[  解绑卡密↑ ]=]----------------------------------------------------
rq=os.date("%Y".."年".."%m".."月".."%d".."日".." ".."%H".."时".."%M".."分".."%S".."秒")
local a={}
fien={
io.open(AMI_YDO.."/km","r"),
io.open(AMI_YDO.."/miux","r"),
io.open(AMI_YDO.."/lko","r"),
io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","r")
}

if fien[1]==nil then
io.open(AMI_YDO.."/km","w"):write("")--写
a[1]=io.open(AMI_YDO.."/km","r"):read("*a")--读
else
a[1]=io.open(AMI_YDO.."/km","r"):read("*a")--读
end--卡密

if fien[2]==nil then
io.open(AMI_YDO.."/miux","w"):write(md5(rq))--写
a[2]=io.open(AMI_YDO.."/miux","r"):read("*a")--读
a[4]=io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","r"):read("*a")
else
a[2]=io.open(AMI_YDO.."/miux","r"):read("*a")--读
a[4]=io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","r"):read("*a")
end--机器码

fien2=io.open(AMI_YDO.."/miux","r"):read("*a")--读
fien4=io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","r"):read("*a")
if fien2=="" then
io.open(AMI_YDO.."/miux","w"):write(md5(rq))--写
io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","w"):write(md5(rq))
fien2=io.open(AMI_YDO.."/miux","r"):read("*a")--读
fien4=io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","r"):read("*a")
a[2]=fien2
a[4]=fien4
end

--[[
local IMEI=io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","r")
local dba=io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","r"):read("*a")--读
if IMEI==nil then
io.open("/storage/emulated/0/Android/data/com.tencent.hxh/cache/code","w"):write(md5(rq))
gg.alert("请先激活防闪辅件1")
while true do
os.exit();
end
else
--MIUX=io.open(AMI_YDO.."/imei","r"):read("*a")--读
--io.open(AMI_YDO.."/miux","w"):write(MIUX)--写
end

if fien[2]==nil then
io.open(AMI_YDO.."/miux","w"):write(md5(rq))--写
a[2]=io.open(AMI_YDO.."/miux","r"):read("*a")--读
gg.alert("请先激活防闪辅件2")
while true do
os.exit();
end
else
local dbb=io.open(AMI_YDO.."/miux","r"):read("*a")--读
if dba==dbb then
sbm=dbb
else
gg.alert("请先激活防闪辅件3")
while true do
os.exit();
end
end
end

if fien[4]==nil then
gg.alert("请先激活防闪辅件")
while true do
os.exit();
end
else
local dbc=io.open("/data/user/0/com.android.settings/code_cache/code","r"):read("*a")--读
if dba==dbc then
sbm=dbc
else
gg.alert("请先激活防闪辅件")
while true do
os.exit();
end
end
end
]]
if fien[3]==nil then
io.open(AMI_YDO.."/lko","w"):write("false")--写
a[3]=io.open(AMI_YDO.."/lko","r"):read("*a")--读
else
a[3]=io.open(AMI_YDO.."/lko","r"):read("*a")--读
end

fien3=io.open(AMI_YDO.."/lko","r"):read("*a")--读
if fien3=="" then
io.open(AMI_YDO.."/lko","w"):write("false")--写
fien3=io.open(AMI_YDO.."/lko","r"):read("*a")--读
a[3]=fien3
end

sbm=a[4]--设备码
km=a[1]--卡密

--判定自动登入
if a[3]=="true" then
a[3]=true
elseif a[3]=="false" then
a[3]=false
end

if a[3]==true then
yanzzzzz(a[1],sbm)
end

hak=gg.prompt({
'现在时间:'..rq.."\n[本脚本使用："..file.msg.api_total.." 次]\n请输入卡密：",
"[自动登入]","[卡密解绑]"
},{
km,
a[3]
},{
'text',--文字
'checkbox',--多选
'checkbox',--多选
})--文本功能

if hak==nil then
gg.setVisible(false)
gg.toast("请重试……")
MAIN_C()
elseif 
hak[3]==true then---[=[ ↓解绑  ]=]-------------------------------------------------------------------------------------------------------------------
gg.toast("开始解绑卡密……")

if hak[1]==km then
jiebang(hak[1],sbm)
else
gg.toast("解绑失败，检查后重试！！！")
---[=[  ↑ 输入卡密跳转解绑卡密  ]=]-------------------------------------------------------------------------------------------------------------------
end
elseif 
hak[1]=="2" then ---[=[  ↓ 邮箱反馈 ]=]-------------------------------------------------------------------------------------------------------------------
b=gg.prompt({
"联系方式(QQ或网名,手机号等)",
"反馈内容",
"取消就是[返回主页面]",
},{
"",
"",
true
},{
'text',
'text',
'checkbox',
})

if b ==nil then
gg.setVisible(false)
gg.toast("取消……")
else

if b[1] ~= "" then
if b[2] ~= "" then
bh="&name="..b[1].."&certno="..b[2]
b=gg.makeRequest(xxxxxxx.."/api/mail/api.php?address="..xxxQQ.."@qq.com"..bh)
if b.code=="200" then
gg.alert("反馈成功[谢谢你的支持]")
else
gg.alert("反馈失败")
end
else
gg.alert("空内容")
end
else
gg.alert("空联系方式")
end
end
--end
---[=[ ↘你们可以自己加购卡 加群什么的  ]=]-------------------------------------------------------------------------------------------------------------------
--elseif hak[1]=="3" then 输入3 干啥干啥
else---[=[  ↓卡密登入  ]=]-------------------------------------------------------------------------------------------------------------------

if hak[2]==true then
io.open(AMI_YDO.."/lko","w"):write("true")--写
elseif hak[2]==false then
io.open(AMI_YDO.."/lko","w"):write("false")--写
end

yanzzzzz(hak[1],sbm)
---[=[  ↑ 输入卡密跳转登入卡密  ]=]-------------------------------------------------------------------------------------------------------------------
end
end
MAIN_C()
end

--------------SL功能区▲----------
ab4387bb2b5ecb6984b689ac89e82c2dsl=function (vip)
function md5(code) local code = tostring(code) local HexTable = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"} local A = 0x67452301 local B = 0xefcdab89 local C = 0x98badcfe local D = 0x10325476 local S11 = 7 local S12 = 12 local S13 = 17 local S14 = 22 local S21 = 5 local S22 = 9 local S23 = 14 local S24 = 20 local S31 = 4 local S32 = 11 local S33 = 16 local S34 = 23 local S41 = 6 local S42 = 10 local S43 = 15 local S44 = 21 local function F(x,y,z) return (x & y) | ((~x) & z) end local function G(x,y,z) return (x & z) | (y & (~z)) end local function H(x,y,z) return x ~ y ~ z end local function I(x,y,z) return y ~ (x | (~z)) end local function FF(a,b,c,d,x,s,ac) a = a + F(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function GG(a,b,c,d,x,s,ac) a = a + G(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function HH(a,b,c,d,x,s,ac) a = a + H(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function II(a,b,c,d,x,s,ac) a = a + I(b,c,d) + x + ac a = (((a & 0xffffffff) << s) | ((a & 0xffffffff) >> 32 - s)) + b return a & 0xffffffff end local function MD5StringFill(s) local len = s:len() local mod512 = len * 8 % 512 local fillSize = (448 - mod512) // 8 if mod512 > 448 then fillSize = (960 - mod512) // 8 end local rTab = {} local byteIndex = 1 for i = 1,len do local index = (i - 1) // 4 + 1 rTab[index] = rTab[index] or 0 rTab[index] = rTab[index] | (s:byte(i) << (byteIndex - 1) * 8) byteIndex = byteIndex + 1 if byteIndex == 5 then byteIndex = 1 end end local b0x80 = false local tLen = #rTab if byteIndex ~= 1 then rTab[tLen] = rTab[tLen] | 0x80 << (byteIndex - 1) * 8 b0x80 = true end for i = 1,fillSize // 4 do if not b0x80 and i == 1 then rTab[tLen + i] = 0x80 else rTab[tLen + i] = 0x0 end end local bitLen = math.floor(len * 8) tLen = #rTab rTab[tLen + 1] = bitLen & 0xffffffff rTab[tLen + 2] = bitLen >> 32 return rTab end function getmd5(s) local fillTab = MD5StringFill(s) local result = {A,B,C,D} for i = 1,#fillTab // 16 do local a = result[1] local b = result[2] local c = result[3] local d = result[4] local offset = (i - 1) * 16 + 1 a = FF(a, b, c, d, fillTab[offset + 0], S11, 0xd76aa478) d = FF(d, a, b, c, fillTab[offset + 1], S12, 0xe8c7b756) c = FF(c, d, a, b, fillTab[offset + 2], S13, 0x242070db) b = FF(b, c, d, a, fillTab[offset + 3], S14, 0xc1bdceee) a = FF(a, b, c, d, fillTab[offset + 4], S11, 0xf57c0faf) d = FF(d, a, b, c, fillTab[offset + 5], S12, 0x4787c62a) c = FF(c, d, a, b, fillTab[offset + 6], S13, 0xa8304613) b = FF(b, c, d, a, fillTab[offset + 7], S14, 0xfd469501) a = FF(a, b, c, d, fillTab[offset + 8], S11, 0x698098d8) d = FF(d, a, b, c, fillTab[offset + 9], S12, 0x8b44f7af) c = FF(c, d, a, b, fillTab[offset + 10], S13, 0xffff5bb1) b = FF(b, c, d, a, fillTab[offset + 11], S14, 0x895cd7be) a = FF(a, b, c, d, fillTab[offset + 12], S11, 0x6b901122) d = FF(d, a, b, c, fillTab[offset + 13], S12, 0xfd987193) c = FF(c, d, a, b, fillTab[offset + 14], S13, 0xa679438e) b = FF(b, c, d, a, fillTab[offset + 15], S14, 0x49b40821) a = GG(a, b, c, d, fillTab[offset + 1], S21, 0xf61e2562) d = GG(d, a, b, c, fillTab[offset + 6], S22, 0xc040b340) c = GG(c, d, a, b, fillTab[offset + 11], S23, 0x265e5a51) b = GG(b, c, d, a, fillTab[offset + 0], S24, 0xe9b6c7aa) a = GG(a, b, c, d, fillTab[offset + 5], S21, 0xd62f105d) d = GG(d, a, b, c, fillTab[offset + 10], S22, 0x2441453) c = GG(c, d, a, b, fillTab[offset + 15], S23, 0xd8a1e681) b = GG(b, c, d, a, fillTab[offset + 4], S24, 0xe7d3fbc8) a = GG(a, b, c, d, fillTab[offset + 9], S21, 0x21e1cde6) d = GG(d, a, b, c, fillTab[offset + 14], S22, 0xc33707d6) c = GG(c, d, a, b, fillTab[offset + 3], S23, 0xf4d50d87) b = GG(b, c, d, a, fillTab[offset + 8], S24, 0x455a14ed) a = GG(a, b, c, d, fillTab[offset + 13], S21, 0xa9e3e905) d = GG(d, a, b, c, fillTab[offset + 2], S22, 0xfcefa3f8) c = GG(c, d, a, b, fillTab[offset + 7], S23, 0x676f02d9) b = GG(b, c, d, a, fillTab[offset + 12], S24, 0x8d2a4c8a) a = HH(a, b, c, d, fillTab[offset + 5], S31, 0xfffa3942) d = HH(d, a, b, c, fillTab[offset + 8], S32, 0x8771f681) c = HH(c, d, a, b, fillTab[offset + 11], S33, 0x6d9d6122) b = HH(b, c, d, a, fillTab[offset + 14], S34, 0xfde5380c) a = HH(a, b, c, d, fillTab[offset + 1], S31, 0xa4beea44) d = HH(d, a, b, c, fillTab[offset + 4], S32, 0x4bdecfa9) c = HH(c, d, a, b, fillTab[offset + 7], S33, 0xf6bb4b60) b = HH(b, c, d, a, fillTab[offset + 10], S34, 0xbebfbc70) a = HH(a, b, c, d, fillTab[offset + 13], S31, 0x289b7ec6) d = HH(d, a, b, c, fillTab[offset + 0], S32, 0xeaa127fa) c = HH(c, d, a, b, fillTab[offset + 3], S33, 0xd4ef3085) b = HH(b, c, d, a, fillTab[offset + 6], S34, 0x4881d05) a = HH(a, b, c, d, fillTab[offset + 9], S31, 0xd9d4d039) d = HH(d, a, b, c, fillTab[offset + 12], S32, 0xe6db99e5) c = HH(c, d, a, b, fillTab[offset + 15], S33, 0x1fa27cf8) b = HH(b, c, d, a, fillTab[offset + 2], S34, 0xc4ac5665) a = II(a, b, c, d, fillTab[offset + 0], S41, 0xf4292244) d = II(d, a, b, c, fillTab[offset + 7], S42, 0x432aff97) c = II(c, d, a, b, fillTab[offset + 14], S43, 0xab9423a7) b = II(b, c, d, a, fillTab[offset + 5], S44, 0xfc93a039) a = II(a, b, c, d, fillTab[offset + 12], S41, 0x655b59c3) d = II(d, a, b, c, fillTab[offset + 3], S42, 0x8f0ccc92) c = II(c, d, a, b, fillTab[offset + 10], S43, 0xffeff47d) b = II(b, c, d, a, fillTab[offset + 1], S44, 0x85845dd1) a = II(a, b, c, d, fillTab[offset + 8], S41, 0x6fa87e4f) d = II(d, a, b, c, fillTab[offset + 15], S42, 0xfe2ce6e0) c = II(c, d, a, b, fillTab[offset + 6], S43, 0xa3014314) b = II(b, c, d, a, fillTab[offset + 13], S44, 0x4e0811a1) a = II(a, b, c, d, fillTab[offset + 4], S41, 0xf7537e82) d = II(d, a, b, c, fillTab[offset + 11], S42, 0xbd3af235) c = II(c, d, a, b, fillTab[offset + 2], S43, 0x2ad7d2bb) b = II(b, c, d, a, fillTab[offset + 9], S44, 0xeb86d391) result[1] = result[1] + a result[2] = result[2] + b result[3] = result[3] + c result[4] = result[4] + d result[1] = result[1] & 0xffffffff result[2] = result[2] & 0xffffffff result[3] = result[3] & 0xffffffff result[4] = result[4] & 0xffffffff end local retStr = '' for i = 1,4 do for _ = 1,4 do local temp = result[i] & 0x0F local str = HexTable[temp + 1] result[i] = result[i] >> 4 temp = result[i] & 0x0F retStr = retStr .. HexTable[temp + 1] .. str result[i] = result[i] >> 4 end end return string.lower(retStr) end return getmd5(code) end

ZZRc4 = {}
ZZMathBit = {}
function ZZMathBit.__xorBit(left, right) return (left + right) == 1 and 1 or 0 end function ZZMathBit.__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 ZZMathBit.xorOp(left, right) return ZZMathBit.__base(left, right, ZZMathBit.__xorBit) end function RC4(text,key,kasi)
  if kasi==false then str = text str=str:gsub("[%s%p]",""):upper() local index=1 local ret="" for index=1,str:len(),2 do ret=ret..string.char(tonumber(str:sub(index,index+1),16)) end text=ret end 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(ZZMathBit.xorOp(schedule[i], c)) end return table.concat(res) end local textLen = string.len(text) local schedule = KSA(key) local k = PRGA(schedule, textLen) str=output(k, text) if kasi==true then str = tostring(str) local index=1 local ret="" for index=1,str:len() do ret=ret..string.format("%02X",str:sub(index):byte()) end return string.lower(ret) else return str end end

function ultra(get,post) local c=gg.makeRequest(get,nil,post).content return c end

a_xl={
"http://cdn3.simpleauth.cn/",
"http://cdn4.simpleauth.cn/",
"http://cdn5.simpleauth.cn/",
"http://cdn2.simpleauth.cn/",
"https://cdn1.simpleauth.cn/",
"http://simpleauth.cn/",
}
function a_X()
a_mi={"线路①","线路②","线路③","线路④","线路⑤","线路⑥"}
a_xh=gg.choice(a_mi,nil,"选择要使用的快速线路")--单选功能
if a_xh==nil then
a_X()
else
xxxxxxx=a_xl[a_xh]
end
end
a_X()

function MAIN_C()
local xxxxxxx_Kami=xxxxxxx.."/api.php?api=kmlogon"
--接口名称[卡密登录]
local xxxxxxx_jieba=xxxxxxx.."/api.php?api=kmunmachine"
--接口名称[卡密解绑]
local xxxxxxx_to_configure=xxxxxxx.."/api.php?api=ini"
--接口名称[应用配置]
local xxxxxxx_Notice=xxxxxxx.."/api.php?api=notice"
--接口名称[应用公告]
---[=[  上面是对接  ]=]-------------------------------------------------------------------------------------------------------------------
local xxxxxxx_APPID="11346"
local xxxxxxx_APPKEY="7bOP8uuEOl8PoN5L"
local xxxxxxx_RC4_key="G000HHDFwwQc92M0"
local xxxbanb="1.0"
local xxxQQ=""

local xxxxxxx_RC4=true
--是否 RC4 加密[false=关 true=开]
--选择 RC4加密-2 否则会乱码
--打开 签名放DATA里:打开

AMI_YDO="/sdcard/Android/"
--卡密 设备码 路径

----------------------------------------------------------------------------------------------------------------------
if xxxxxxx_APPID=="" or xxxxxxx_RC4_key=="" or xxxxxxx_APPKEY=="" then
  gg.alert("对接数据,空...")
  os.exit()
end

----------------------------------------------------------------------------------------------------------------------
Notice=ultra(xxxxxxx_Notice.."&app=".. xxxxxxx_APPID,"")

No=Notice:match('"code":(.-),')
if No ~= nil then
  No=Notice:match('"msg":"(.-)",')
  if No==nil then
    xxxxxxx_RC4=false--判定是否关闭
   else
    gg.alert("公告接口："..No)
    os.exit()
  end
end

if xxxxxxx_RC4 == true then
  Notice=RC4(Notice,xxxxxxx_RC4_key,false)
end

text=string.gsub(Notice,":",'=')
text=text:gsub('"=','=')
text=text:gsub('{"','{')
text=text:gsub(',"',',')
load("Notice="..text)()

if Notice.code == 200 then
gg.alert(Notice.msg.app_gg)
else
gg.alert(Notice.msg)
end
----------------------------------上面是公告------------------------------------------------------------------------------------

file=ultra(xxxxxxx_to_configure.."&app="..xxxxxxx_APPID,"")
No=file:match('"code":(.-),')
if No ~= nil then
  No=file:match('"msg":"(.-)",')
  if No==nil then
    xxxxxxx_RC4=false--判定是否关闭
   else
    gg.alert("外链接接口："..No)
    os.exit()
  end
end

if xxxxxxx_RC4==true then
  file=RC4(file,xxxxxxx_RC4_key,false)
end

text=string.gsub(file,":",'=')
text=text:gsub("https=",'https:')
text=text:gsub("http=",'http:')
text=text:gsub('"=','=')
text=text:gsub(',"',',')
text=text:gsub('{"','{')

load("file="..text)()

if file.code == 200 then
if file.msg.version == xxxbanb then
gg.toast("已是最新版本，无需更新")
else
YU=gg.alert("发现新版本，请更新！:\n"..file.msg.app_update_show,"确定")

if file.msg.app_update_must == 'y' then
gg.alert("作者开启强制更新！","复制链接")
print(" 复制下载 :\n"..file.msg.app_update_url)
gg.copyText(file.msg.app_update_url)
os.exit()
else
gg.alert("尽快更新版本！")
print(" 复制下载 :\n"..file.msg.app_update_url)
gg.copyText(file.msg.app_update_url)
end

end
else
gg.alert(file.msg)
os.exit() 
end

---------------------------------------上面是检查更新-------------------------------------------------------------------------------
function yanzzzzz(km,sbm)

key=md5("kami="..km.."&markcode="..sbm.."&t="..os.time().."&".. xxxxxxx_APPKEY)
--计算签名

Random=md5(RC4(os.time().."极简云",xxxxxxx_RC4_key,true)..xxxxxxx_APPKEY..sbm)
--随机[用来计算是否相等]

bops="kami="..km.."&markcode="..sbm.."&t="..os.time().."&sign="..key
--需要请求的数据

if  xxxxxxx_RC4 == true then
bops="data="..RC4(bops,xxxxxxx_RC4_key,true)
end-- 把请求数据用RC4加密

HUT=ultra(xxxxxxx_Kami.."&app=".. xxxxxxx_APPID,bops.."&value="..Random)
--请求数据

if HUT~=nil then
if  xxxxxxx_RC4 == true then
HUT=RC4(HUT,xxxxxxx_RC4_key,false) 
end-- 把返回的数据用RC4解密

qued=HUT:match('code":(.-),')--获取编号 200是成功
vip=HUT:match('vip":"(.-)"},')--获取 卡密时间
yanzen=HUT:match('check":"(.-)"')--获取随机值
tinme=HUT:match('time":(.-),')--获取时间搓
fanhui=HUT:match('msg":"(.-)",')--获取错误

if qued~="200" then
gg.alert(fanhui)--返回错误
io.open(AMI_YDO.."/slwzxkm","w"):write("")--写
else

if (tinme-os.time())>500 or (tinme-os.time())<-500 then
gg.setVisible(false)
gg.toast("\n本地数据超时！")
else--时间10小于就跳转

if yanzen~=md5(tinme..xxxxxxx_APPKEY..Random) then
gg.setVisible(false)
gg.toast("\n️请不要修改数据！")
else--网络数据是否修改

gg.setVisible(false)
vip1=os.date("%Y".."年".."%m".."月".."%d".."日".."\r".."%H".."时".."%M".."分".."%S".."秒\n",vip)
io.open(AMI_YDO.."/slwzxkm","w"):write(km)--写
kll=gg.alert('\n'.."登入成功:"..'\n'..'\n'.."[到期时间]\n"..vip1,"确定","返回")--获取到期时间
if kll==2 then
io.open(AMI_YDO.."/slwzxlko","w"):write("false")--写
oqvqo(xxxxxxx)
end

io.open("/data/user/0/com.xixuan.xig/shared_prefs/com.xixuan.xigpreferences.xml","w")
io.open("/storage/emulated/0/Android/data/com.xixuan.xig/files/com.xixuan.xigpreferences.xml","w")
io.open("/data/user/0/com.excelliance.dualaid/gameplugins/com.xixuan.xig/shared_prefs/com.xixuan.xigpreferences.xml","w")

--登入成功后的动作----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
btk={"💠","🌀","☯","💮","☣","🌱","✿","✰","🌸","🌼",}
local tsbt = "💠"
sjbt=btk[math.random(1,#btk)]
-------------功能区-------------
local kqgn = " [[开启]]"
local gbgn = " [[关闭]]"
local gn1 = kqgn
--local gn2 = kqgn
--local gn3=kqgn
--local gn4=kqgn
local gn5=kqgn
local gn6=kqgn
--local gn7=kqgn
--local gn9=kqgn
function Main()
menu = gg.multiChoice({
     ".无敌.",
	 ".吃怪0."..gn2..".-(配合无敌！开启后不能移动).",
     ".吃怪1."..gn3..".-(配合无敌！开启后不能移动).",
     ".吃怪2."..gn4..".-(配合无敌！开启后不能移动).",
     ".移动吃怪."..gn9..".\n(若个别怪无法消除请开启吃怪1/2,记得关闭)",	 
	 ".无敌+全屏+增伤.[普通、深渊、遗迹].",
	 ".无敌+增伤.[异界专用,真体需走双路,全队有效].",--2
	 ".无敌+全屏+增伤.[普通,异界].",--3
	 ".无敌+全屏+增伤.(狂战+剑术).",--4	  
	 ".呆怪.",--5
	 ".海战.",--6
	 ".试炼之路.",--8
	 ".加速.超."..gn7,--9
	 ".全局加速<模拟器专用>."..gn5..'\n(请到设置-冻结间隔调成3000).',
	 ".单开菜单.",--10
	 ".64位功能菜单.",--11 	 
".退出脚本."},--11
nil, ".象.\n禁止::勿用排位PK.\n"..os.date("当前时间::%Y年-%m月-%d日 %H时:%M分:%S秒"))
if menu == nil then else
if menu[1] == true then lrwd() end
if menu[2] == true then BOKG() end
if menu[3] == true then BOKGB() end
if menu[4] == true then BOKGC() end
if menu[5] == true then PTTB() end
if menu[6] == true then SYJXWE() end
if menu[7] == true then SYJXX() end
if menu[8] == true then SYJXT() end
if menu[9] == true then zszy() end
if menu[10] == true then sydgg() end
if menu[11] == true then syhz() end
if menu[12] == true then WJDY() end
if menu[13] == true then QJJSC() end
if menu[14] == true then QJJSM() end
if menu[15] == true then AA() end
if menu[16] == true then MainL() end
if menu[17] == true then Exit() end
end
XGCK=-1
while true do
  if gg.isVisible(true) then
    XGCK = 1
    gg.setVisible(false)  
  end
  gg.clearResults()
  if XGCK == 1 then
    Main()
  end
end
end

function MainL()--64位功能菜单
menu = gg.multiChoice({
     ".无敌.",
	 ".吃怪0."..gn2..".-(配合无敌！开启后不能移动).",
     ".吃怪1."..gn3..".-(配合无敌！开启后不能移动).",
     ".吃怪2."..gn4..".-(配合无敌！开启后不能移动).",
	 ".无敌+全屏+增伤.[普通、深渊、遗迹].",
	 ".异界专用.[真体必须走双路,全体有效,不用断网].",--2
	 ".超时空专用.[全体有效,不用断网].",--3
	 ".无敌+全屏+增伤.(狂战+剑术).",--4
	 ".呆怪.",--5
	 ".海战.",--6
	 ".试炼之路.",--8
	 ".全局加速."..gn1.."\n《请到设置-冻结间隔调成3000》.",--9
".返回上级菜单."},--11
nil, ".象.\n禁止::勿用排位PK.\n"..os.date("当前时间::%Y年-%m月-%d日 %H时:%M分:%S秒"))
if menu == nil then else
if menu[1] == true then lrwdL() end
if menu[2] == true then BOKG() end
if menu[3] == true then BOKGB() end
if menu[4] == true then BOKGC() end
if menu[5] == true then SYJXWL() end
if menu[6] == true then SYJXXL() end
if menu[7] == true then SYJXTL() end
if menu[8] == true then zszyL() end
if menu[9] == true then sydgL() end
if menu[10] == true then syhzL() end
if menu[11] == true then WJDYL() end
if menu[12] == true then QJJS() end
if menu[13] == true then Main() end
end
XGKK=-1
while true do
  if gg.isVisible(true) then
    XGKK = 1
    gg.setVisible(false)  
  end
  gg.clearResults()
  if XGKK == 1 then
    MainL()
  end
end
end

function boss()
local DZ=CSM({16384,1067030938,4},{{2,1065353216},})
CSM(DZ,{{0,4,1373602934},},"吃怪")
end

function QJJS()
gg.clearResults()
if gn1 == " [[开启]]" then
gn1 = gbgn
lrjs()
gg.clearResults()
elseif gn1 == " [[关闭]]" then
gg.clearResults()
lrjsgb()
gn1 = kqgn
gg.clearResults()
end
end

function WJDY()--试炼之路
local time=os.clock()
lrwd()
gg.sleep(500)
lrqp(1097859072)--15
--gg.sleep(500)
wmbs(30)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXW()--普通
local time=os.clock()
lrwd()
gg.sleep(500)
lrqp(1097859072)--15
gg.sleep(500)
wmbs(100)
sybg(2)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXWE()--普通二
local time=os.clock()
lrwd()
gg.sleep(500)
lrqp(1097859072)--15
gg.sleep(500)
wmbs(130)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function zszy()--狂战+剑术
local time=os.clock()
lrwd()
lrqp(1097859072)--15
gg.sleep(500)
wmbs(100)
sybg(40)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXX()--幻界
local time=os.clock()
lrwd()
gg.sleep(500)
yjbs(150)--260
gg.sleep(500)
wmbs(150)
--sybg(4)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXT()--团本
local time=os.clock()
lrwd()
gg.sleep(500)
yjbs(150)--260
lrqp(1097859072)--15--(1103626240)25
gg.sleep(500)
wmbs(150)--350
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function wmbs(bs)
local DZ=CSM({32,1108082688,4},{{-10,256},{-3,1},{-2,0},{-1,0},{1,1108082688},})
CSM(DZ,{{-3,4,bs},},"倍伤")
end

function AA()
menub = gg.multiChoice({
  ".无敌.",
  ".霸体.",
  ".倍攻.",
  ".全屏.",
  --".64位测试.",
  ".返回主页"},
nil,".禁止用于排位PK.".."\n.注意:请低调使用.")
if menub == nil then else
if menub[1] == true then lrwd() end
if menub[2] == true then sybt() end
if menub[3] == true then sybg(4) end
if menub[4] == true then lrqp(1103626240) end
--if menub[5] == true then ysx(5) end
if menub[5] == true then Main() end
end
GLWW=-1
while true do
  if gg.isVisible(true) then
   GLWW = 1
    gg.setVisible(false)   
  end
  gg.clearResults()
  if GLWW == 1 then
    AA()
  end
end
end

function syhz()
local time=os.clock()
lrwd()
sybt()
lrqp(1120403456)
gg.sleep(600)
wmbs(20)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function lrjs()
local DZ=CSM({4,1022739087,4},{{-1,1073741824},{-2,1065353216},})
CSM(DZ,{{-2,4,1072064102,true},},"全局加速")
end

function lrjsgb()
gg.clearList()
gg.clearResults()
local DZ=CSM({4,1022739087,4},{{-1,1073741824},{-2,1072064102},})
CSM(DZ,{{-2,4,1065353216},},"全局加速关闭")
end

function QJJSM()
gg.clearResults()
if gn5 == " [[开启]]" then
gn5 = gbgn
lrjsM()
gg.clearResults()
elseif gn5 == " [[关闭]]" then
gg.clearResults()
lrjsgbM()
gn5 = kqgn
gg.clearResults()
end
end

function lrjsM()
local DZ=CSM({32,1022739087,4},{{-1,1073741824},{-2,1065353216},})
CSM(DZ,{{-2,4,1072064102,true},},"全局加速")
end

function lrjsgbM()
gg.clearList()
gg.clearResults()
local DZ=CSM({32,1022739087,4},{{-1,1073741824},{-2,1072064102},})
CSM(DZ,{{-2,4,1065353216},},"全局加速关闭")
end

function lrwd()
local DZ=CSM({32,16777216,4},{{-1,256},{2,1},{17,9},{22,1065353216},})
CSM(DZ,{{22,4,-971227136},},"无敌")
end

function lrqp(r)
local DZ=CSM({32,1065353215,4},{{-2,1065353216,4},{-6,864026624},{2,864026624},{-7,3,4},{48,864026624},})
CSM(DZ,{{6,4,r},{7,4,r},{8,4,r},},"范围伤害")
end

function sybt()
gg.clearResults()
gg.setRanges(32)
    local name="霸体"
    local dataType = gg.TYPE_FLOAT
    local tb1 = {{7.8472714e-44, 0},{2.24207754e-42, 8},}
    local tb2 = {{0, 4,false},} 
    SearchWrite(tb1, tb2, dataType ,name)
gg.clearResults()
end

function ysx(g)
gg.clearResults()
local memory = 32
local array = {
{["lv"] = 16777216, ["type"] = gg.TYPE_DWORD},
{["lv"] = 1063963361, ["hv"] = 1065905876, ["offset"] = 8, ["type"] = 4}
}
local isok, data = app.memorysearch(memory, array)
if isok then
for i = 1, #data do
--app.memorywrite(data[i] -36, 16, 2.0)--移速
app.memorywrite(data[i] -48, 16, g)--攻速
end
gg.toast("攻速开启成功")
else
gg.toast("开启失败")
end
gg.clearResults()
end

function yjdg()
gg.clearResults()
gg.setRanges(32)
gg.searchNumber("251;38;53;105;109::350", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.refineNumber("251;38;53;105;109::350", 4)
gg.refineNumber("38", 4)
gg.getResults(1000)
gg.editAll("39", 4)
gg.toast("呆怪已开启")
else
gg.toast("开启失败")
end
gg.clearResults()
end

function yjbs(k)
gg.clearResults()
gg.setRanges(32)
gg.searchNumber("1;0;35F;35F::21", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.refineNumber("1;35F;35F::21", 4)
gg.refineNumber("1", 4)
gg.getResults(99999)
gg.editAll(k, 4)
gg.toast("增伤已开启")
else
gg.toast("开启失败")
end
gg.clearResults()
end

function sybg(k)
gg.clearResults()
gg.setRanges(32)
gg.searchNumber("0~1;0.5~3.5F::25", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.refineNumber("1;1;0;0;0;0;0.5~3.5F::25", 4)
gg.refineNumber("1;0::5", 4)
gg.refineNumber("1", 4)
gg.getResults(5000)
gg.editAll(k, 4)
gg.toast("增伤已开启")
else
gg.toast("开启失败")
end
gg.clearResults()
end

function sydgg()
gg.clearResults()
yjdg()
gg.setRanges(32)
    local name="呆怪"
    local dataType = gg.TYPE_DWORD
    local tb1 = {{251, 0},{105, 0x158},{109, 0x15C},}
    local tb2 = {{39, 0x84,false},} 
    SearchWrite(tb1, tb2, dataType ,name)
gg.clearResults()
end

function sydg()
while true do
gg.sleep(1000)
if gg.isVisible(true)then break 
else
gg.clearResults()
local memory = 32
local array = {
{["lv"] = 251, ["type"] = gg.TYPE_DWORD},
{["lv"] = 105, ["offset"] = 344, ["type"] = 4},
{["lv"] = 109, ["offset"] = 348, ["type"] = 4},
}
local isok, data = app.memorysearch(memory, array)
if isok then
for i = 1, #data do
app.memorywrite(data[i] +132, 4, 39)
end
--gg.toast("呆怪开启成功")
else
gg.toast("开启失败")
end
end
--gg.clearList()
gg.clearResults()
end
end

--------64位功能--------
function SYJXWL()--普通二
local time=os.clock()
lrwdL()
gg.sleep(500)
lrqpL(1097859072)--15
gg.sleep(500)
wmbs(130)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function zszyL()--狂战+剑术
local time=os.clock()
lrwdL()
lrqpL(1097859072)--15
gg.sleep(500)
wmbsL(100)
sybg(30)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXXL()--幻界
local time=os.clock()
lrwdL()
gg.sleep(500)
yjbs(150)--260
gg.sleep(500)
wmbsL(150)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function SYJXTL()--团本
local time=os.clock()
lrwdL()
gg.sleep(500)
yjbs(150)--260
lrqpL(1097859072)--15--(1103626240)25
gg.sleep(500)
wmbsL(150)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function lrwdL()--64位
local DZ=CSM({32,16777216,4},{{-1,256},{2,1},{19,9},{24,1065353216},})
CSM(DZ,{{24,4,-971227136},},"无敌")
end

function lrqpL(r)--64位
local DZ=CSM({32,1065353215,4},{{-2,1065353216,4},{-6,864026624},{2,864026624},{54,864026624},})
CSM(DZ,{{6,4,r},{7,4,r},{8,4,r},},"范围伤害")
end

function wmbsL(bs)
local DZ=CSM({32,1108082688,4},{{-3,1},{-2,0},{-1,0},{1,1108082688},})
CSM(DZ,{{-3,4,bs},},"倍伤")
end

function WJDYL()--试炼之路
local time=os.clock()
lrwdL()
gg.sleep(500)
lrqpL(1097859072)--15
--gg.sleep(500)
wmbs(30)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function syhzL()--海战
local time=os.clock()
lrwdL()
lrqpL(1120403456)
gg.sleep(600)
wmbs(20)
gg.toast("开启成功,耗时"..os.clock()-time.."s")
end

function yjdgL()
gg.clearResults()
gg.setRanges(32)
gg.searchNumber("251;38;53;105;109::366", 4, false, gg.SIGN_EQUAL,0,-1)
local Count=gg.getResultCount()
if (Count > 0) then
gg.refineNumber("251;38;53;105;109::366", 4)
gg.refineNumber("38", 4)
gg.getResults(1000)
gg.editAll("39", 4)
gg.toast("呆怪已开启")
else
gg.toast("开启失败")
end
gg.clearResults()
end

function sydgL()
gg.clearResults()
yjdgL()
gg.setRanges(32)
    local name="呆怪"
    local dataType = gg.TYPE_DWORD
    local tb1 = {{251, 0},{105, 0x15C},{109, 0x160},}
    local tb2 = {{39, 0x88,false},} 
    SearchWrite(tb1, tb2, dataType ,name)
gg.clearResults()
end

function Exit()
gg.clearList()
gg.clearResults()
print(".欢迎使用."..'\n'..".象.")
os.exit()
end

function ZRZY()
--gg.alert("温馨提示::\n新设备此操作只需操作一次即可！！！")
io.open("/data/user/0/com.xixuan.xig/shared_prefs/com.xixuan.xigpreferences.xml","w")
io.open("/storage/emulated/0/Android/data/com.xixuan.xig/files/com.xixuan.xigpreferences.xml","w")
io.open("/data/user/0/com.excelliance.dualaid/gameplugins/com.xixuan.xig/shared_prefs/com.xixuan.xigpreferences.xml","w")
gg.toast("资源已注入")
end

local bm = gg.getTargetPackage()
local PKG = string.match
if PKG(bm,"slwz") == "slwz" then Main()
elseif PKG(bm,"com.sjsh.mi") == "com.sjsh.mi" then Main()
elseif PKG(bm,"com.jsxqe.g14") == "com.jsxqe.g14" then Main()
elseif PKG(bm,"com.jjywx.ylca") == "com.jjywx.ylca" then Main()
elseif PKG(bm,"com.wxxnj.ylca") == "com.wxxnj.ylca" then Main()
elseif PKG(bm,"com.jsxqe.g5") == "com.jsxqe.g5" then Main()
else
gg.alert("温馨提示::"..'\n'.."检测到未匹配到此脚本的进程!!!\n请先选择游戏进程再开启本脚本!!！")
gg.copyText(bm)
print("已复制进程包名")
while true do     
os.exit();
end
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end
end
end
else
gg.setVisible(false)
gg.toast("\n️(▔_▔) 请检查网络！")
end

end
---[=[  卡密登入↑ ]=]----------------------------------------------
function jiebang(km,sbm)
gg.setVisible(false)
key=md5("kami="..km.."&markcode="..sbm.."&t="..os.time().."&".. xxxxxxx_APPKEY)

bops="kami="..km.."&markcode="..sbm.."&t="..os.time().."&sign="..key

if  xxxxxxx_RC4 == true then
bops= "data="..RC4(bops,xxxxxxx_RC4_key,true) 
end

HUT=ultra(xxxxxxx_jieba.."&app=".. xxxxxxx_APPID,bops)

if  xxxxxxx_RC4 == true then
HUT=RC4(HUT,xxxxxxx_RC4_key,false) 
end-- xxxxxxx_Base64

qued=HUT:match('code":(.-),')
fanhui=HUT:match('msg":"(.-)",')
yanzen=HUT:match('check":"(.-)"')
tinme=HUT:match('time":(.-),')
gg.toast(fanhui)
end

---[=[  解绑卡密↑ ]=]----------------------------------------------------
rq=os.date("%Y".."年".."%m".."月".."%d".."日".." ".."%H".."时".."%M".."分".."%S".."秒")
local a={}
fien={
io.open(AMI_YDO.."/slwzxkm","r"),
io.open(AMI_YDO.."/miux","r"),
io.open(AMI_YDO.."/slwzxlko","r"),
io.open("/data/user/0/com.android.settings/code_cache/code","r")
}

if fien[1]==nil then
io.open(AMI_YDO.."/slwzxkm","w"):write("")--写
a[1]=io.open(AMI_YDO.."/slwzxkm","r"):read("*a")--读
else
a[1]=io.open(AMI_YDO.."/slwzxkm","r"):read("*a")--读
end--卡密

local IMEI=io.open(AMI_YDO.."/imei","r")
local dba=io.open(AMI_YDO.."/imei","r"):read("*a")--读
if IMEI==nil then
gg.alert("请先激活防闪辅件")
while true do
os.exit();
end
else
--MIUX=io.open(AMI_YDO.."/imei","r"):read("*a")--读
--io.open(AMI_YDO.."/miux","w"):write(MIUX)--写
end

if fien[2]==nil then
gg.alert("请先激活防闪辅件")
while true do
os.exit();
end
else
local dbb=io.open(AMI_YDO.."/miux","r"):read("*a")--读
if dba==dbb then
--sbm=dbb
else
gg.alert("请先激活防闪辅件")
while true do
os.exit();
end
end
end

if fien[4]==nil then
gg.alert("请先激活防闪辅件")
while true do
os.exit();
end
else
local dbc=io.open("/data/user/0/com.android.settings/code_cache/code","r"):read("*a")--读
if dba==dbc then
sbm=dbc
else
gg.alert("请先激活防闪辅件")
while true do
os.exit();
end
end
end

--[[
if fien[2]==nil then
io.open(AMI_YDO.."/miux","w"):write(md5(rq))--写
a[2]=io.open(AMI_YDO.."/miux","r"):read("*a")--读
else
a[2]=io.open(AMI_YDO.."/miux","r"):read("*a")--读
end--fien[2]--机器码

fien2=io.open(AMI_YDO.."/miux","r"):read("*a")--读
if fien2=="" then
io.open(AMI_YDO.."/miux","w"):write(md5(rq))--写
fien2=io.open(AMI_YDO.."/miux","r"):read("*a")--读
a[2]=fien2
end
]]
if fien[3]==nil then
io.open(AMI_YDO.."/slwzxlko","w"):write("false")--写
a[3]=io.open(AMI_YDO.."/slwzxlko","r"):read("*a")--读
else
a[3]=io.open(AMI_YDO.."/slwzxlko","r"):read("*a")--读
end

fien3=io.open(AMI_YDO.."/slwzxlko","r"):read("*a")--读
if fien3=="" then
io.open(AMI_YDO.."/slwzxlko","w"):write("false")--写
fien3=io.open(AMI_YDO.."/slwzxlko","r"):read("*a")--读
a[3]=fien3
end

--sbm=a[2]--设备码
km=a[1]--卡密

--判定自动登入
if a[3]=="true" then
a[3]=true
elseif a[3]=="false" then
a[3]=false
end

if a[3]==true then
yanzzzzz(a[1],sbm)
end

hak=gg.prompt({
'现在时间:'..rq.."\n[本脚本使用："..file.msg.api_total.." 次]\n请输入卡密：",
"[自动登入]","[卡密解绑]"
},{
km,
a[3]
},{
'text',--文字
'checkbox',--多选
'checkbox',--多选
})--文本功能

if hak==nil then
gg.setVisible(false)
gg.toast("请重试……")
MAIN_C()
elseif 
hak[3]==true then---[=[ ↓解绑  ]=]-------------------------------------------------------------------------------------------------------------------
gg.toast("开始解绑卡密……")

if hak[1]==km then
jiebang(hak[1],sbm)
else
gg.toast("解绑失败，检查后重试！！！")
---[=[  ↑ 输入卡密跳转解绑卡密  ]=]-------------------------------------------------------------------------------------------------------------------
end
elseif 
hak[1]=="2" then ---[=[  ↓ 邮箱反馈 ]=]-------------------------------------------------------------------------------------------------------------------
b=gg.prompt({
"联系方式(QQ或网名,手机号等)",
"反馈内容",
"取消就是[返回主页面]",
},{
"",
"",
true
},{
'text',
'text',
'checkbox',
})

if b ==nil then
gg.setVisible(false)
gg.toast("取消……")
else

if b[1] ~= "" then
if b[2] ~= "" then
bh="&name="..b[1].."&certno="..b[2]
b=gg.makeRequest(xxxxxxx.."/api/mail/api.php?address="..xxxQQ.."@qq.com"..bh)
if b.code=="200" then
gg.alert("反馈成功[谢谢你的支持]")
else
gg.alert("反馈失败")
end
else
gg.alert("空内容")
end
else
gg.alert("空联系方式")
end
end
--end
---[=[ ↘你们可以自己加购卡 加群什么的  ]=]-------------------------------------------------------------------------------------------------------------------
--elseif hak[1]=="3" then 输入3 干啥干啥
else---[=[  ↓卡密登入  ]=]-------------------------------------------------------------------------------------------------------------------

if hak[2]==true then
io.open(AMI_YDO.."/slwzxlko","w"):write("true")--写
elseif hak[2]==false then
io.open(AMI_YDO.."/slwzxlko","w"):write("false")--写
end

yanzzzzz(hak[1],sbm)
---[=[  ↑ 输入卡密跳转登入卡密  ]=]-------------------------------------------------------------------------------------------------------------------
end
end
MAIN_C()
end

------权限测试------
function QXCS()
io.open("/data/user/0/com.excelliance.dualaid/gameplugins/com.xixuan.xig/shared_prefs/com.xixuan.xigpreferences.xml","w")
io.open("/data/user/0/com.xixuan.xig/shared_prefs/com.xixuan.xigpreferences.xml","w")
end

--QXCS()

local bm = gg.getTargetPackage()
local PKG = string.match
if PKG(bm,"com.tencent.hxh") == "com.tencent.hxh" then ab4387bb2b5ecb6984b689ac89e82c2dlr(vip)
elseif PKG(bm,"ryqmx") == "ryqmx" then ab4387bb2b5ecb6984b689ac89e82c2dlr(vip)
elseif PKG(bm,"slwz") == "slwz" then ab4387bb2b5ecb6984b689ac89e82c2dsl(vip)
elseif PKG(bm,"com.sjsh.mi") == "com.sjsh.mi" then ab4387bb2b5ecb6984b689ac89e82c2dsl(vip)
elseif PKG(bm,"com.jsxqe.g14") == "com.jsxqe.g14" then ab4387bb2b5ecb6984b689ac89e82c2dsl(vip)
elseif PKG(bm,"com.jjywx.ylca") == "com.jjywx.ylca" then ab4387bb2b5ecb6984b689ac89e82c2dsl(vip)
elseif PKG(bm,"com.wxxnj.ylca") == "com.wxxnj.ylca" then ab4387bb2b5ecb6984b689ac89e82c2dsl(vip)
elseif PKG(bm,"com.jsxqe.g5") == "com.jsxqe.g5" then ab4387bb2b5ecb6984b689ac89e82c2dsl(vip)
--elseif PKG(bm,"com.sjsh.mi") == "com.sjsh.mi" then ab4387bb2b5ecb6984b689ac89e82c2dsl(vip)
else
gg.alert("温馨提示::"..'\n'.."检测到未匹配到此脚本的进程!!\n请先选择游戏进程再开启本脚本!!")
gg.copyText(bm)
print("已复制进程包名")
--QXCS()
while true do     
os.exit();
end
end
--2
