KR/jd_opencardL336.js

25 lines
122 KiB
JavaScript
Raw Normal View History

2023-09-26 00:24:22 +08:00
/*
9.26-10.2 好酒不见 佳肴思念
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 9.26-10.2 好酒不见 佳肴思念 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#9.26-10.2 好酒不见 佳肴思念
11 11 11 11 * jd_opencardL336.js, tag=9.26-10.2 好酒不见 佳肴思念, enabled=true
*/
const $ = new Env('9.26-10.2 好酒不见 佳肴思念')
var version_='jsjiami.com.v7';const ill1ii1I=llIil1I1;(function(lliIliiI,li111iiI,I1iI11iI,Iiii1l1I,lllIilli,liliIil,lIi1Ii1I){return lliIliiI=lliIliiI>>0x6,liliIil='hs',lIi1Ii1I='hs',function(Il1liiil,iI1l11i1,li11Iili,Il1Ilill,il1liIi1){const i1Ii1IIl=llIil1I1;Il1Ilill='tfi',liliIil=Il1Ilill+liliIil,il1liIi1='up',lIi1Ii1I+=il1liIi1,liliIil=li11Iili(liliIil),lIi1Ii1I=li11Iili(lIi1Ii1I),li11Iili=0x0;const liIIiIl1=Il1liiil();while(!![]&&--Iiii1l1I+iI1l11i1){try{Il1Ilill=parseInt(i1Ii1IIl(0x418,'WhAh'))/0x1*(parseInt(i1Ii1IIl(0x350,'ol%a'))/0x2)+parseInt(i1Ii1IIl(0x1e4,'DSaw'))/0x3+-parseInt(i1Ii1IIl(0x3ed,'!CH$'))/0x4+-parseInt(i1Ii1IIl(0x57b,'l!FS'))/0x5+parseInt(i1Ii1IIl(0x2a6,'hXb^'))/0x6*(-parseInt(i1Ii1IIl(0x308,'8auC'))/0x7)+parseInt(i1Ii1IIl(0x37e,'!CH$'))/0x8*(-parseInt(i1Ii1IIl(0x43c,'qoXV'))/0x9)+parseInt(i1Ii1IIl(0x23d,'ycTv'))/0xa;}catch(lilliIll){Il1Ilill=li11Iili;}finally{il1liIi1=liIIiIl1[liliIil]();if(lliIliiI<=Iiii1l1I)li11Iili?lllIilli?Il1Ilill=il1liIi1:lllIilli=il1liIi1:li11Iili=il1liIi1;else{if(li11Iili==lllIilli['replace'](/[DhRfUbuJWAYMHnGEkNl=]/g,'')){if(Il1Ilill===iI1l11i1){liIIiIl1['un'+liliIil](il1liIi1);break;}liIIiIl1[lIi1Ii1I](il1liIi1);}}}}}(I1iI11iI,li111iiI,function(il1l,lI1iIii,lii1ill1,Ili1llI1,IIlilii,lIlIIIi,iii1I1il){return lI1iIii='\x73\x70\x6c\x69\x74',il1l=arguments[0x0],il1l=il1l[lI1iIii](''),lii1ill1=`\x72\x65\x76\x65\x72\x73\x65`,il1l=il1l[lii1ill1]('\x76'),Ili1llI1=`\x6a\x6f\x69\x6e`,(0x13fedb,il1l[Ili1llI1](''));});}(0x2fc0,0xa8de0,II111lIl,0xc1),II111lIl)&&(version_=II111lIl);const i1Iiil1l=$[ill1ii1I(0x400,'l!FS')]()?require(ill1ii1I(0x5ee,'s4^t')):'',ilIl=$[ill1ii1I(0x698,'DSaw')]()?require(ill1ii1I(0x65b,'IWw!')):'';let i1iil1iI=$[ill1ii1I(0x659,'WHUE')]()?process[ill1ii1I(0x63e,'ycTv')][ill1ii1I(0x4de,'qoXV')]?process[ill1ii1I(0x380,'DQOa')]['opencard_draw']:'0':$[ill1ii1I(0x5e0,'3L(V')](ill1ii1I(0x4a0,'eg6!'))?$[ill1ii1I(0x39b,'s4^t')](ill1ii1I(0x4d9,'ycTv')):'0',I1Iill1l=$[ill1ii1I(0x25e,'eg6!')]()?process['env'][ill1ii1I(0x6ba,'v*bc')]?process[ill1ii1I(0x2d5,'l!FS')]['opencard_addCart']:![]:$[ill1ii1I(0x245,'KVtv')](ill1ii1I(0x642,'^46D'))?$[ill1ii1I(0x5ec,'cYZ&')]('opencard_addCart'):![];const illI1l1I=require(ill1ii1I(0x4dc,'v*bc')),Il1ii11l=require('./function/krh5st'),ii11IIil=require('./function/jdCommon'),llIlIIII=require('./function/krwxSavePrize');let iii111ii=ill1ii1I(0x424,'ycTv'),IllIl1II=[],I1ilIi1I='',i1i1lli={};if($[ill1ii1I(0x400,'l!FS')]()){Object['keys'](i1Iiil1l)[ill1ii1I(0x641,'049W')](I1ll1l11=>{IllIl1II['push'](i1Iiil1l[I1ll1l11]);});if(process[ill1ii1I(0x304,'TKvh')][ill1ii1I(0x5e5,'v*bc')]&&process[ill1ii1I(0x380,'DQOa')][ill1ii1I(0x569,'KVtv')]===ill1ii1I(0x17f,'ZfQY'))console[ill1ii1I(0x37f,'8auC')]=()=>{};}else IllIl1II=[$[ill1ii1I(0x67f,'[Ds(')](ill1ii1I(0x649,'4M*A')),$[ill1ii1I(0x54c,'TKvh')](ill1ii1I(0x300,'l!FS')),...IlliIl1($[ill1ii1I(0x191,'JFrh')](ill1ii1I(0x606,'zu[i'))||'[]')[ill1ii1I(0x342,'3L(V')](lii11I1l=>lii11I1l[ill1ii1I(0x453,'IN9E')])][ill1ii1I(0x207,']8kB')](IllIIIiI=>!!IllIIIiI);function II111lIl(){const Iliiil1I=(function(){return[...[version_,'hJjWYsAjHGifahbmkiuM.nhcENouRlm.vU7MDbJG==','ySoGECoehI7cOuqWW5q','W7SfgGtdTG','scVdPYTSpCoktSksW5hcLW','W5PeWRVdVbe','ACkDzmo4FspdL8owW64','qSkJsqlcG8kQgHq2WO5XW5PJ','WQ7dSCotFmoN','WRuLowOOW5mvBby','WPxcJSk4W4pdQW','W4hcGHZdT8kq','WPCFbuWY','amkMB8o2va','mge5C8ol','oKyhxSoBWRa','5RIz5OUe5PYw5l27','WQmNjhe','nhVdGCkQCCkpp8oADW','zCkFmSolAW','WRe0p2OOW5CEEqRcG8oQpa','rdpdL8oU','W7RdMf58ya','rSksu8oPFG','nvGkm8oi','W7NcQZTnbG','WQ0GW5RcQmo/','WQtdU2GewSoTW5lLVAFLP7VJG6FKUkFKUjpOTidLJBy','vCkWxSolBGJdPSo0','WO1kW5BcHSooWOdcOSkW','CCk/z8owya','yCkwpLJdPNBcOKFdT8kgdXe','BCkJxqxcHa','W7xcPGOahvzyo3yJaCosW4CYWOzXWOSzxCosW67cMG7cQSoWWQuoyGRdLa','WP4hvmkkcCkRrmkGW5JcNtZdNcW','kSk7W5ykW63dL8k3WQ/dIW','77+t54cL5yEX5RwS5yME6zg/5O2D5yMS5B6l5REE5yQs5P60556p5ys15lYw6kAq5yM7776e6iIy5PEp5Aw36lAR6k2h5zYU5OUI55Qw5AAj5zcQ5lMB5AoR5yEp5PES6lA25z2f5z2Q6Aoj5y2877Yup+IVV+wDUEAxRowlToMbMoEEJ+EALEs4JowWGEAvIUwfGEI/V+IHLEAqKEs9GE++VUI2V+I8JowlU+AxQ+AXOowhOUwJKUwhHUwNQUwrMoAvSoI1T+wCNowFM+wnLoEBQoAoS+w9MUEwGU
// 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"])