function getdsyunyz(infon) infog=infon if infog["appid"]==nil then print("缺少appkey变量") os.exit() end if infog["appkey"]==nil then print("缺少appkey变量") os.exit() end if infog["rc4_key"]==nil then print("缺少rc4_key变量") os.exit() end if infog["version"]==nil then print("缺少version变量") os.exit() end if infog["mi"]==nil then print("缺少mi变量") os.exit() end dsyunyz={} GFURLGG="http://shiyan.tbit.xin/yz/" local function md5xxxxxx(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) local tLen = #rTab rTab[tLen + 1] = bitLen & 0xffffffff rTab[tLen + 2] = bitLen >> 32 return rTab end function getmb5(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 getmb5(code) end local function json2true(str, from, to) return true, from + 3 end local function json2false(str, from, to) return false, from + 4 end local function json2null(str, from, to) return nil, from + 3 end local function json2nan(str, from, to) return nil, from + 2 end local numberchars = { ['-'] = true, ['+'] = true, ['.'] = true, ['0'] = true, ['1'] = true, ['2'] = true, ['3'] = true, ['4'] = true, ['5'] = true, ['6'] = true, ['7'] = true, ['8'] = true, ['9'] = true } local function json2number(str, from, to) local i = from + 1 while (i <= to) do local char = string.sub(str, i, i) if not numberchars[char] then break end i = i + 1 end local num = tonumber(string.sub(str, from, i - 1)) if not num then gg.alert(string.format('JSON格式错误,在位置:%d 处有无效数字', from)) os.exit() end return num, i - 1 end local function json2string(str, from, to) local ignor = false for i = from + 1, to do local char = string.sub(str, i, i) if not ignor then if char == fuhao then return string.sub(str, from + 1, i - 1), i elseif char == '\\' then ignor = true end else ignor = false end end gg.alert(string.format('JSON格式错误,字符串没有找到结尾,在位置:%d 处', from)) os.exit() end local function json2array(str, from, to) local result = {} from = from or 1 local pos = from + 1 local to = to or string.len(str) while (pos <= to) do local char = string.sub(str, pos, pos) if char == fuhao then result[#result + 1], pos = json2string(str, pos, to) elseif char == '[' then result[#result + 1], pos = json2array(str, pos, to) elseif char == '{' then result[#result + 1], pos = json2table(str, pos, to) elseif char == ']' then return result, pos elseif (char == 'f' or char == 'F') then result[#result + 1], pos = json2false(str, pos, to) elseif (char == 't' or char == 'T') then result[#result + 1], pos = json2true(str, pos, to) elseif (char == 'n') then result[#result + 1], pos = json2null(str, pos, to) elseif (char == 'N') then result[#result + 1], pos = json2nan(str, pos, to) elseif numberchars[char] then result[#result + 1], pos = json2number(str, pos, to) end pos = pos + 1 end gg.alert(string.format('JSON格式错误,数组没有找到结尾,在位置:%d 处', from)) os.exit() end function _G.json2table(str, from, to) local result = {} from = from or 1 local pos = from + 1 local to = to or string.len(str) local key while (pos <= to) do local char = string.sub(str, pos, pos) if char == fuhao then if not key then key, pos = json2string(str, pos, to) else result[key], pos = json2string(str, pos, to) key = nil end elseif char == '[' then if not key then key, pos = json2array(str, pos, to) else result[key], pos = json2array(str, pos, to) key = nil end elseif char == '{' then if not key then key, pos = json2table(str, pos, to) else result[key], pos = json2table(str, pos, to) key = nil end elseif char == '}' then return result, pos elseif (char == 'f' or char == 'F') then result[key], pos = json2false(str, pos, to) key = nil elseif (char == 't' or char == 'T') then result[key], pos = json2true(str, pos, to) key = nil elseif (char == 'n') then result[key], pos = json2null(str, pos, to) key = nil elseif (char == 'N') then result[key], pos = json2nan(str, pos, to) key = nil elseif numberchars[char] then if not key then key, pos = json2number(str, pos, to) else result[key], pos = json2number(str, pos, to) key = nil end end pos = pos + 1 end gg.alert(string.format('JSON格式错误,表没有找到结尾,在位置:%d 处', from)) os.exit() end fuhao = '"' local jsonfuncs = { [fuhao] = json2string, ['['] = json2array, ['{'] = json2table, ['f'] = json2false, ['F'] = json2false, ['t'] = json2true, ['T'] = json2true } function jsonxxxxxx(str) local char = string.sub(str, 1, 1) local func = jsonfuncs[char] if func == nil then gg.alert(string.format("JSON格式错误,无效的头部字符:[ %s ]", char)) os.exit() end if func then return func(str, 1, string.len(str)) end if numberchars[char] then return json2number(str, 1, string.len(str)) end end local function rc4xxxxxx(text, key, kasi) text=tostring(text) local function xorBit(left, right) return (left + right) == 1 and 1 or 0 end local function 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 local function xorOp(left, right) return base(left, right, xorBit) end local function KSA(key) local keyLen = #key local schedule, 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, j, k = 0, 0, {} 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 res = {} for i = 1, #text do res[i] = string.char(xorOp(schedule[i], text:byte(i))) end return table.concat(res) end local m = 0 if not kasi then text = text:gsub("[%s%p]", ""):upper() local ret = "" for index = 1, #text, 2 do m = m + 1 local hexValue = tonumber(text:sub(index, index + 1), 16) ret = ret .. string.char(hexValue) end text = ret end local textLen = #text local schedule = KSA(key) local k = PRGA(schedule, textLen) local str = output(k, text) if kasi then return str:gsub('.', function(c) return string.format('%02X', c:byte()) end):lower() else return str end end local ulrd=load(string.dump(function (...) local data=gg.makeRequest(...) if data.code==200 then return data.content else gg.alert("您网络可能出现了问题,请更换更加稳定的网络!") os.exit() return "" end end)) local function x() local file=io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","r") if file then return file:read("*a") else io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","w+"):write(""):close() return "" end end local function c() local file=io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."checkbox","r") if file then if file:read("*all")=="true" then file:close() return true else return false end else io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."checkbox","w+"):write("true"):close() return true end end local miei=function () local mieii=md5xxxxxx(""..os.time()*1000+611*os.time()-999999)..math.random(521) local file=io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."miei","r") if file then return file:read("*a") else io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."miei","w+"):write(mieii):close() return mieii end end function ultra(get,post) local c=gg.makeRequest(get,nil,post).content return c 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 local ulrd=function (...) local data=gg.makeRequest(...) if data.code==200 then return data.content else gg.alert("您网络可能出现了问题,请更换更加稳定的网络!") os.exit() return "" end end ulrd("https://m.baidu.com") --验证是否有网络 网络是否正常 --上面是配置内容 local appcode=200 --判断是否登录成功的返回码 local apptime=50 --时间延迟验证 50-180 秒 --如果一直有时间超时请设置99999 local appAPIkm=GFURLGG.."/api.php?api=kmlogon&app="..infog["appid"] --卡密接口 local appAPIkmjb=GFURLGG.."/api.php?api=kmunmachine&app="..infog["appid"] --卡密解绑接口 local appAPImie=GFURLGG.."/api.php?api=ini&app="..infog["appid"] local appAPInotice=GFURLGG.."/api.php?api=notice&app="..infog["appid"] function dsyunyz.ini() Notice=ultra(appAPInotice) No=Notice:match('"code":(.-),') if No ~= nil then No=Notice:match('"msg":"(.-)",') if No==nil then infog["mi"]=false--判定是否关闭 else gg.alert("公告接口:"..No)--对话框 os.exit() end end if infog["mi"] == true then Notice=RC4(Notice,infog["rc4_key"],false) end ggname=Notice:match('"name":"(.-)",')--获取应用名称 Notice=Notice:match('"app_gg":"(.-)"},')--获取公告 Notice="Notice='"..Notice.."'" load(Notice)() if Notice=="" then else Notice=Notice.."\n" end if Notice==nil then No=Notice:match('"code":(.-),') if No ~= nil then No=Notice:match('"msg":"(.-)",') if No==nil then infog["mi"]=false--判定是否关闭 else gg.alert("公告接口:"..No)--对话框 os.exit() end end end xxcisu="无法获取" gongxing=ultra(appAPImie) No=gongxing:match('"code":(.-),') if No ~= nil then No=gongxing:match('"msg":"(.-)",') if No==nil then infog["mi"]=false--判定是否关闭 else gg.alert("应用配置接口:"..No)--对话框 os.exit() end end if infog["mi"] == true then gongxing=RC4(gongxing,infog["rc4_key"],false) end xxcisu=gongxing:match('"api_total":"(.-)"}')--启动次数 if gongxing==nil then No=gongxing:match('"code":(.-),') if No ~= nil then No=gongxing:match('"msg":"(.-)",') if No==nil then infog["mi"]=false--判定是否关闭 else gg.alert("应用配置接口:"..No)--对话框 os.exit() end end end if xxcisu==nil then xxcisu="1" end end function dsyunyz.start() dsyunyz.ini() gg.toast("正在检测新版本,请稍后") ::go1:: if gg.isVisible(true) then FX1 = nil gg.setVisible(false) end if FX1 == nil then goto go2 end goto go1 ::go2:: fien={io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","r")} if fien[1]==nil then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","w"):write("")--写 end km=io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","r"):read("*a")--读 zddl=io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","r"):read("*a")--读 if zddl=="true" then zddl=true elseif zddl=="false" then zddl=false end if zddl==true then local miei=miei() --创建设备码 local time=os.time() --时间搓 local value=md5xxxxxx(""..os.time()*1000+611*os.time()-999999) local skeyg=md5xxxxxx("kami="..km.."&markcode="..miei.."&t="..time.."&".. infog["appkey"]) local msg=rc4xxxxxx("kami="..km.."&markcode="..miei.."&t="..time.."&sign="..skeyg,infog["rc4_key"],true) local data=ulrd(appAPIkm,nil,"data="..msg.."&value="..value) local msg=jsonxxxxxx(rc4xxxxxx(data,infog["rc4_key"],false)) local check=md5xxxxxx(msg.time..infog["appkey"]..value) if time-msg.time < -apptime or time-msg.time > apptime or check ~= msg.check then gg.alert("验证超时") io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 goto go1 end if msg.code ~= appcode then gg.alert(msg.msg)--对话框 io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 goto go1 end DLMB=gg.alert("到期时间:\n" ..os.date("%Y".."年".."%m".."月".."%d".."日 %H".."时".."%M".."分".."%S".."秒",msg.msg.vip),"确定","取消自动登录") if DLMB==2 then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 end return end local prompt=gg.prompt({ ggname.." v"..infog["version"].."\n"..Notice.."全网累计启动次数:"..xxcisu.."\n请输入卡密: ", "自动登录", "卡密解绑", "购买卡密", "退出", },{x(),zddl},{"text","checkbox","checkbox","checkbox","checkbox"} ) if prompt==nil then FX1=999 goto go1 end if prompt[5]==true then os.exit() end if prompt[4]==true then if type(gg.goURL)~=table then KW=gg.alert("跳转链接:\n"..kawang,"复制","打开") if KW==1 then gg.alert("链接复制成功") gg.copyText(kawang) goto go1 end if KW==2 then gg.goURL(kawang) goto go1 end if KW~=nil then goto go1 end else gg.alert("链接复制成功") gg.copyText(kawang) goto go1 end end if prompt[1]=='' then gg.alert("卡密不能为空") io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","w+"):write('') goto go1 end if prompt[2] and prompt[3] and prompt[4]==true then infog={ appid = "10066", --APPID appkey = "vUL65O5TVe5UooD5", --APPKEY rc4_key = "666P4tMhhd66740H", --RC4密钥 version = "1.0", --版本号 mi = true, --加密开关 } local appAPIkm="https://dsyun.dsyfh.xyz/api.php?api=kmlogon&app="..infog["appid"] local miei=miei() --创建设备码 local time=os.time() --时间搓 local value=md5xxxxxx(""..os.time()*1000+611*os.time()-999999) local skeyg=md5xxxxxx("kami="..prompt[1].."&markcode="..miei.."&t="..time.."&".. infog["appkey"]) local msg=rc4xxxxxx("kami="..prompt[1].."&markcode="..miei.."&t="..time.."&sign="..skeyg,infog["rc4_key"],true) local data=ulrd(appAPIkm,nil,"data="..msg.."&value="..value) local msg=jsonxxxxxx(rc4xxxxxx(data,infog["rc4_key"],false)) local check=md5xxxxxx(msg.time..infog["appkey"]..value) if time-msg.time < -apptime or time-msg.time > apptime or check ~= msg.check then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","w"):write(prompt[1])--写 gg.alert("验证超时") goto go1 end if msg.code ~= appcode then gg.alert("不能多选哦!")--对话框 io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","w"):write(prompt[1])--写 io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 goto go1 end DLMB=gg.alert("到期时间:\n" ..os.date("%Y".."年".."%m".."月".."%d".."日 %H".."时".."%M".."分".."%S".."秒",msg.msg.vip),"确定","取消自动登录") if DLMB==2 then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 end io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","w"):write(prompt[1])--写 return end if prompt[2] and prompt[3] or prompt[2] and prompt[4] or prompt[3] and prompt[4]==true then gg.alert("请不要多选!") goto go1 end if prompt[2]==true then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("true")--写 end if prompt[2]==false then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 end if prompt[1] then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."km","w+"):write(prompt[1]):close() io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."checkbox","w+"):write("true"):close() else io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."checkbox","w+"):write("false"):close() end --保存卡密 local miei=miei() --创建设备码 local time=os.time() --时间搓 local km=prompt[1] --卡密 if prompt[3] then--卡密解绑 local value=md5xxxxxx(""..os.time()*1000+611*os.time()-999999) local skeyg=md5xxxxxx("kami="..km.."&markcode="..miei.."&t="..time.."&".. infog["appkey"]) local msg=rc4xxxxxx("kami="..km.."&markcode="..miei.."&t="..time.."&sign="..skeyg,infog["rc4_key"],true) local data=ulrd(appAPIkmjb,nil,"data="..msg.."&value="..value) local msg=jsonxxxxxx(rc4xxxxxx(data,infog["rc4_key"],false)) local check=md5xxxxxx(msg.time..infog["appkey"]..value) gg.alert(msg.msg)--对话框 goto go1 end local value=md5xxxxxx(""..os.time()*1000+611*os.time()-999999) local skeyg=md5xxxxxx("kami="..km.."&markcode="..miei.."&t="..time.."&".. infog["appkey"]) local msg=rc4xxxxxx("kami="..km.."&markcode="..miei.."&t="..time.."&sign="..skeyg,infog["rc4_key"],true) local data=ulrd(appAPIkm,nil,"data="..msg.."&value="..value) local msg=jsonxxxxxx(rc4xxxxxx(data,infog["rc4_key"],false)) local check=md5xxxxxx(msg.time..infog["appkey"]..value) if time-msg.time < -apptime or time-msg.time > apptime or check ~= msg.check then gg.alert("验证超时") io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 goto go1 end if msg.code ~= appcode then gg.alert(msg.msg)--对话框 io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 goto go1 end DLMB=gg.alert("到期时间:\n" ..os.date("%Y".."年".."%m".."月".."%d".."日 %H".."时".."%M".."分".."%S".."秒",msg.msg.vip),"确定","取消自动登录") if DLMB==2 then io.open(gg.CACHE_DIR.."/"..infog["SQ"]..infog["appid"].."dl","w"):write("false")--写 end return end ret="1" return ret end --阿民不处 --放在脚本最上面