ab22a390752305680f3da8a1de1bfbf87e=function (vip) --从这里开始 function Main() local vipStr = os.date("%Y-%m-%d %H:%M:%S", vip) menu = gg.choice({ "开发示例1", "开发示例", }, nil, "开发示例·到期时间:"..vipStr.."\n原一验证") if menu == 1 then ID1() end if menu == 2 then ID2() end XGCK=-1 end function ID1() end function ID2() end cs = '' while(true)do if gg.isVisible(true) then XGCK=1 gg.setVisible(false) end gg.clearResults() if XGCK==1 then Main() end end end --从这里结束 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 response = gg.makeRequest(get,nil,post) if response and response.code == 200 then return response.content else return nil end end xxxxxxx="https://haraichi.top" --这里是接口,API接口保持不动 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 --false等于,true等于开,这个是是否开启RC4 local xxxxxxx_APPID="1"--APP标识 local xxxxxxx_APPKEY="1k3vdEEcRze4Dk34"--APPKEY local xxxxxxx_RC4_key="LL2drwJnNDD1"--RC4KEY local xxxbanb="1.0"--版本 local xxxQQ="" if xxxxxxx_APPID=="" or xxxxxxx_RC4_key=="" or xxxxxxx_APPKEY=="" then gg.alert("配置文件错误:缺少必要参数") os.exit() end FILES_DIR="/sdcard/Android/" Notice=ultra(xxxxxxx_Notice.."&app=".. xxxxxxx_APPID,"") if Notice == nil or Notice == "" then else 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) if Notice == nil then Notice = "" end end Notice=Notice:match('"app_gg":"(.-)"},') if Notice and Notice ~= "" then gg.alert(Notice,"确定") end end xxcisu="无法获取" gongxing=ultra(xxxxxxx_to_configure.."&app=".. xxxxxxx_APPID,"") if gongxing == nil or gongxing == "" then gongxing = '{"code":200,"msg":"ok","data":{"version":"'..xxxbanb..'","app_update_show":"","app_update_url":"未提交URL","app_update_must":"","api_total":"0"}}' end No=gongxing:match('"code":(.-),') if No ~= nil then No=gongxing:match('"msg":"(.-)",') if No==nil then xxxxxxx_RC4=false else gg.alert("应用配置接口:"..No) os.exit() end end if xxxxxxx_RC4 == true then gongxing=RC4(gongxing,xxxxxxx_RC4_key,false) if gongxing == nil then gongxing = '{"code":200,"msg":"ok","data":{"version":"'..xxxbanb..'","app_update_show":"","app_update_url":"未提交URL","app_update_must":"","api_total":"0"}}' end end xxxxbanben=gongxing:match('"version":"(.-)",') xxxxgxnr=gongxing:match('app_update_show":"(.-)",') xxxxlianjie=gongxing:match('"app_update_url":"(.-)"') xxcisu=gongxing:match('"api_total":"(.-)"}') if xxxxbanben == nil then xxxxbanben = xxxbanb end if xxxxgxnr == nil then xxxxgxnr = "" end if xxxxlianjie == nil then xxxxlianjie = "未提交URL" end if xxcisu == nil then xxcisu = "0" end local function compareVersions(v1, v2) local t1 = {} local t2 = {} for part in string.gmatch(v1, "([^.]+)") do table.insert(t1, tonumber(part) or 0) end for part in string.gmatch(v2, "([^.]+)") do table.insert(t2, tonumber(part) or 0) end for i = 1, math.max(#t1, #t2) do local n1 = t1[i] or 0 local n2 = t2[i] or 0 if n1 > n2 then return 1 elseif n1 < n2 then return -1 end end return 0 end if compareVersions(xxxxbanben, xxxbanb) > 0 then if xxxxlianjie == "未提交URL" or xxxxlianjie == "" then gg.alert("发现新版本但未配置更新链接,请联系作者") os.exit() end local update_content = "发现新版本!\n当前版本:"..xxxbanb.."\n最新版本:"..xxxxbanben if xxxxgxnr and xxxxgxnr ~= "" then update_content = update_content.."\n\n更新内容:\n"..xxxxgxnr end update_content = update_content.."\n\n请选择更新方式:" bhh=gg.alert(update_content,"下载脚本","复制链接") if bhh == 1 then gg.alert("错误,接口有误") elseif bhh == 2 then if gg.copyText then gg.copyText(xxxxlianjie) gg.alert("更新链接已复制到剪贴板\n\n链接:"..xxxxlianjie.."\n\n请在浏览器中打开链接进行更新。") else gg.alert("更新链接:\n"..xxxxlianjie.."\n\n请复制此链接到浏览器中打开。") end end 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 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 qued=HUT:match('code":(.-),') vip=HUT:match('vip":"(.-)"},') yanzen=HUT:match('check":"(.-)"') tinme=HUT:match('time":(.-),') fanhui=HUT:match('msg":"(.-)",') if qued~="200" then gg.alert(fanhui) else if (tinme-os.time())>10 or (tinme-os.time())<-10 then gg.setVisible(false) gg.toast("数据超时") else if yanzen~=md5(tinme..xxxxxxx_APPKEY..Random) then gg.setVisible(false) gg.toast("数据校验失败") else gg.setVisible(false) vip1=os.date("%Y".."年".."%m".."月".."%d".."日".."\r".."%H".."时".."%M".."分".."%S".."秒\n",vip) io.open(FILES_DIR.."/km","w"):write(km) kll=gg.alert("到期时间:"..vip1,"确定","返回") if kll==2 then io.open(FILES_DIR.."/lko","w"):write("false") end ab22a390752305680f3da8a1de1bfbf87e(vip) end end end else gg.setVisible(false) gg.toast("网络连接失败") 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 HUT == nil then gg.alert("解绑失败:网络连接错误") return end if xxxxxxx_RC4 == true then HUT=RC4(HUT,xxxxxxx_RC4_key,false) if HUT == nil then gg.alert("解绑失败:数据解密错误") return end end qued=HUT:match('code":(.-),') fanhui=HUT:match('msg":"(.-)",') if qued == nil or fanhui == nil then gg.alert("解绑失败:服务器返回数据格式错误") return end if qued == "200" then gg.alert("解绑成功:"..fanhui) else gg.alert("解绑失败:"..fanhui) end end rq=os.date("%Y".."年".."%m".."月".."%d".."日".." ".."%H".."时".."%M".."分".."%S".."秒") local a={} fien={io.open(FILES_DIR.."/km","r"),io.open(FILES_DIR.."/miux","r"),io.open(FILES_DIR.."/lko","r")} if fien[1]==nil then io.open(FILES_DIR.."/km","w"):write("") a[1]=io.open(FILES_DIR.."/km","r"):read("*a") else a[1]=io.open(FILES_DIR.."/km","r"):read("*a") end if fien[2]==nil then io.open(FILES_DIR.."/miux","w"):write(md5(rq)) a[2]=io.open(FILES_DIR.."/miux","r"):read("*a") else a[2]=io.open(FILES_DIR.."/miux","r"):read("*a") end fien2=io.open(FILES_DIR.."/miux","r"):read("*a") if fien2=="" then io.open(FILES_DIR.."/miux","w"):write(md5(rq)) fien2=io.open(FILES_DIR.."/miux","r"):read("*a") a[2]=fien2 end if fien[3]==nil then io.open(FILES_DIR.."/lko","w"):write("false") a[3]=io.open(FILES_DIR.."/lko","r"):read("*a") else a[3]=io.open(FILES_DIR.."/lko","r"):read("*a") end fien3=io.open(FILES_DIR.."/lko","r"):read("*a") if fien3=="" then io.open(FILES_DIR.."/lko","w"):write("false") fien3=io.open(FILES_DIR.."/lko","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 cs = '' XGCK = 1 while(true)do if gg.isVisible(true) then XGCK=1 gg.setVisible(false) end if XGCK==1 then rq=os.date("%Y".."年".."%m".."月".."%d".."日".." ".."%H".."时".."%M".."分".."%S".."秒") local notice_content = "━═━═━◥原一验证系统◤━═━═━\n验证地址:https://haraichi.top\n\n当前时间:"..rq.."\n使用次数:"..xxcisu.."\n版本号:"..xxxbanb.."\n\n请确保网络正常后输入卡密进行验证\n支持功能:卡密登录|设备解绑|自动登录" hak=gg.prompt({ notice_content, '自动登录', '解绑卡密' },{ km, a[3], false },{ 'text', 'checkbox', 'checkbox' }) if hak==nil then gg.setVisible(false) gg.toast("操作取消") XGCK = -1 else if hak[2]==true then io.open(FILES_DIR.."/lko","w"):write("true") a[3]=true elseif hak[2]==false then io.open(FILES_DIR.."/lko","w"):write("false") a[3]=false end if hak[3]==true then jiebang(hak[1],sbm) else yanzzzzz(hak[1],sbm) end end end end --本实例由原一验证官方开发 --禁止转载,否则后果自负。