KR/jd_opencardL338.js

25 lines
128 KiB
JavaScript
Raw Normal View History

2023-10-20 01:01:08 +08:00
/*
10.20-10.26 预售来袭 狂欢开抢
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 10.20-10.26 预售来袭 狂欢开抢 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#10.20-10.26 预售来袭 狂欢开抢
11 11 11 11 * jd_opencardL338.js, tag=10.20-10.26 预售来袭 狂欢开抢, enabled=true
*/
const $ = new Env('10.20-10.26 预售来袭 狂欢开抢')
2023-10-24 11:50:24 +08:00
var version_='jsjiami.com.v7';function li1iI1Il(_0x54150b,_0x1ecb1b){const _0x1aeaa6=li1II1II();return li1iI1Il=function(_0x3cfbcb,_0x20adf4){_0x3cfbcb=_0x3cfbcb-0xde;let _0x2a553f=_0x1aeaa6[_0x3cfbcb];if(li1iI1Il['ExSUrW']===undefined){var _0x5bbc4f=function(_0x41d950){const _0x29b33b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x165c73='',_0x13c994='';for(let _0x4f5c59=0x0,_0x248039,_0x3696a3,_0x436c4d=0x0;_0x3696a3=_0x41d950['charAt'](_0x436c4d++);~_0x3696a3&&(_0x248039=_0x4f5c59%0x4?_0x248039*0x40+_0x3696a3:_0x3696a3,_0x4f5c59++%0x4)?_0x165c73+=String['fromCharCode'](0xff&_0x248039>>(-0x2*_0x4f5c59&0x6)):0x0){_0x3696a3=_0x29b33b['indexOf'](_0x3696a3);}for(let _0x1c79dd=0x0,_0x1807f1=_0x165c73['length'];_0x1c79dd<_0x1807f1;_0x1c79dd++){_0x13c994+='%'+('00'+_0x165c73['charCodeAt'](_0x1c79dd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x13c994);};const _0x335b23=function(_0x5d6c7a,_0x4ad3a3){let _0x1e9105=[],_0x520117=0x0,_0xac2d2b,_0x376029='';_0x5d6c7a=_0x5bbc4f(_0x5d6c7a);let _0x545433;for(_0x545433=0x0;_0x545433<0x100;_0x545433++){_0x1e9105[_0x545433]=_0x545433;}for(_0x545433=0x0;_0x545433<0x100;_0x545433++){_0x520117=(_0x520117+_0x1e9105[_0x545433]+_0x4ad3a3['charCodeAt'](_0x545433%_0x4ad3a3['length']))%0x100,_0xac2d2b=_0x1e9105[_0x545433],_0x1e9105[_0x545433]=_0x1e9105[_0x520117],_0x1e9105[_0x520117]=_0xac2d2b;}_0x545433=0x0,_0x520117=0x0;for(let _0x45a0eb=0x0;_0x45a0eb<_0x5d6c7a['length'];_0x45a0eb++){_0x545433=(_0x545433+0x1)%0x100,_0x520117=(_0x520117+_0x1e9105[_0x545433])%0x100,_0xac2d2b=_0x1e9105[_0x545433],_0x1e9105[_0x545433]=_0x1e9105[_0x520117],_0x1e9105[_0x520117]=_0xac2d2b,_0x376029+=String['fromCharCode'](_0x5d6c7a['charCodeAt'](_0x45a0eb)^_0x1e9105[(_0x1e9105[_0x545433]+_0x1e9105[_0x520117])%0x100]);}return _0x376029;};li1iI1Il['RVmque']=_0x335b23,_0x54150b=arguments,li1iI1Il['ExSUrW']=!![];}const _0x95a24b=_0x1aeaa6[0x0],_0x32caa1=_0x3cfbcb+_0x95a24b,_0xfe627f=_0x54150b[_0x32caa1];return!_0xfe627f?(li1iI1Il['zUMRPH']===undefined&&(li1iI1Il['zUMRPH']=!![]),_0x2a553f=li1iI1Il['RVmque'](_0x2a553f,_0x20adf4),_0x54150b[_0x32caa1]=_0x2a553f):_0x2a553f=_0xfe627f,_0x2a553f;},li1iI1Il(_0x54150b,_0x1ecb1b);}const I1lIII1=li1iI1Il;(function(iIiiI11i,i11I1IIl,liiiiIIl,lIillll,i1ll1Iil,iIlllIli,llII1lII){return iIiiI11i=iIiiI11i>>0x3,iIlllIli='hs',llII1lII='hs',function(liIIiiil,l1i11lI,iliil1Ii,il1Ilii,I1iI1lI1){const iiilllii=li1iI1Il;il1Ilii='tfi',iIlllIli=il1Ilii+iIlllIli,I1iI1lI1='up',llII1lII+=I1iI1lI1,iIlllIli=iliil1Ii(iIlllIli),llII1lII=iliil1Ii(llII1lII),iliil1Ii=0x0;const i1iIiI11=liIIiiil();while(!![]&&--lIillll+l1i11lI){try{il1Ilii=-parseInt(iiilllii(0x2a9,'qJlJ'))/0x1*(-parseInt(iiilllii(0x666,'aP!G'))/0x2)+-parseInt(iiilllii(0x472,'hL(s'))/0x3*(-parseInt(iiilllii(0x406,'TbEL'))/0x4)+-parseInt(iiilllii(0x5d7,'&9Zn'))/0x5+-parseInt(iiilllii(0x623,'cjT!'))/0x6*(-parseInt(iiilllii(0x477,'qJlJ'))/0x7)+parseInt(iiilllii(0x30f,'hF3G'))/0x8+-parseInt(iiilllii(0x2dc,'@cFl'))/0x9*(-parseInt(iiilllii(0x21f,'yh)o'))/0xa)+-parseInt(iiilllii(0x5e1,'Gpjc'))/0xb*(parseInt(iiilllii(0x1d8,'%BnZ'))/0xc);}catch(Ii11i1i1){il1Ilii=iliil1Ii;}finally{I1iI1lI1=i1iIiI11[iIlllIli]();if(iIiiI11i<=lIillll)iliil1Ii?i1ll1Iil?il1Ilii=I1iI1lI1:i1ll1Iil=I1iI1lI1:iliil1Ii=I1iI1lI1;else{if(iliil1Ii==i1ll1Iil['replace'](/[ueWghONIEKSAnQxBfR=]/g,'')){if(il1Ilii===l1i11lI){i1iIiI11['un'+iIlllIli](I1iI1lI1);break;}i1iIiI11[llII1lII](I1iI1lI1);}}}}}(liiiiIIl,i11I1IIl,function(l1iliiI1,iIIIi11I,lIli1i1l,lI11iiii,iIlill1,iliIiii,iI1i1ll1){return iIIIi11I='\x73\x70\x6c\x69\x74',l1iliiI1=arguments[0x0],l1iliiI1=l1iliiI1[iIIIi11I](''),lIli1i1l=`\x72\x65\x76\x65\x72\x73\x65`,l1iliiI1=l1iliiI1[lIli1i1l]('\x76'),lI11iiii=`\x6a\x6f\x69\x6e`,(0x144294,l1iliiI1[lI11iiii](''));});}(0x5e0,0x81552,li1II1II,0xbe),li1II1II)&&(version_=li1II1II);const iiIiillI=$[I1lIII1(0x2a4,'(6Pm')]()?require(I1lIII1(0x181,'P5kW')):'',lIiiiil1=$[I1lIII1(0x172,'TbEL')]()?require(I1lIII1(0x5a8,'4WQ4')):'';let IIiIi1=$[I1lIII1(0x459,'t02i')]()?process[I1lIII1(0x4cc,'$eSa')][I1lIII1(0x3ac,'[3pE')]?process[I1lIII1(0x23d,'2pb4')
2023-10-20 01:01:08 +08:00
// prettier-ignore
function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])