KR/jd_opencardL329.js

25 lines
114 KiB
JavaScript
Raw Normal View History

2023-08-17 00:55:53 +08:00
/*
8.17-8.24 降暑囤货 嗨购一夏
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 8.17-8.24 降暑囤货 嗨购一夏 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#8.17-8.24 降暑囤货 嗨购一夏
11 11 11 11 * jd_opencardL329.js, tag=8.17-8.24 降暑囤货 嗨购一夏, enabled=true
*/
const $ = new Env('8.17-8.24 降暑囤货 嗨购一夏')
var version_='jsjiami.com.v7';const i111i1=iii1II;(function(i1Il1l,I11IlI,IiIIlI,IIi1I1,lIiilI,i111II,I11Il1){return i1Il1l=i1Il1l>>0x6,i111II='hs',I11Il1='hs',function(IiIIl1,IiiiI1,i111I1,I11Ili,IIi1II){const l1IIIi=iii1II;I11Ili='tfi',i111II=I11Ili+i111II,IIi1II='up',I11Il1+=IIi1II,i111II=i111I1(i111II),I11Il1=i111I1(I11Il1),i111I1=0x0;const li1lIl=IiIIl1();while(!![]&&--IIi1I1+IiiiI1){try{I11Ili=parseInt(l1IIIi(0x644,'#mOB'))/0x1+-parseInt(l1IIIi(0x588,'O&[a'))/0x2*(parseInt(l1IIIi(0x4dc,'E@$5'))/0x3)+-parseInt(l1IIIi(0x250,'Gu[]'))/0x4*(parseInt(l1IIIi(0x5b8,'bmbf'))/0x5)+parseInt(l1IIIi(0x591,'4f*s'))/0x6+parseInt(l1IIIi(0x6a2,'Et#5'))/0x7*(-parseInt(l1IIIi(0x427,'%gKO'))/0x8)+-parseInt(l1IIIi(0x64c,'9Lgr'))/0x9+parseInt(l1IIIi(0x651,'h5yj'))/0xa*(parseInt(l1IIIi(0x698,'96Ch'))/0xb);}catch(li1lIi){I11Ili=i111I1;}finally{IIi1II=li1lIl[i111II]();if(i1Il1l<=IIi1I1)i111I1?lIiilI?I11Ili=IIi1II:lIiilI=IIi1II:i111I1=IIi1II;else{if(i111I1==lIiilI['replace'](/[xpLBNMOUnqhFQJKuwPdG=]/g,'')){if(I11Ili===IiiiI1){li1lIl['un'+i111II](IIi1II);break;}li1lIl[I11Il1](IIi1II);}}}}}(IiIIlI,I11IlI,function(IiIIil,iilill,IiIIii,lIiili,lIiill,iilili,Il1lIi){return iilill='\x73\x70\x6c\x69\x74',IiIIil=arguments[0x0],IiIIil=IiIIil[iilill](''),IiIIii='\x72\x65\x76\x65\x72\x73\x65',IiIIil=IiIIil[IiIIii]('\x76'),lIiili='\x6a\x6f\x69\x6e',(0x139c03,IiIIil[lIiili](''));});}(0x2f40,0x8ba23,Iii11l,0xbf),Iii11l)&&(version_=Iii11l);function Iii11l(){const iiIlli=(function(){return[version_,'QPujdJsKnjpPiphOamiLN.GcFoBwmnUu.NxMvqM7==','xmowWRy6cG','W4rdB2BdL8o3WQ4/W4tcLSkeW4FKVQBPGjZOR6lKUjfz','W78yxW','hSowWOWAyG','dHBcSSo0WONdMSoVwSotdI8srCoOWOjnW5C','rKWbW7TK','W5OTgvar','jGvHW6GKh8oW','wmkAn8kWF1NdOxS5W4C','zSkxjCkXE33dQW','W6LptSoiW6XO','WRqyC0ZcUSoLAfddUa','WOSspYlcJW','cSkbW6T6W4zfbuddQ0G','W6FdSSoAt8kSA2pdPqhcOW','5QYQW5lPHPVMLBlLVjRLJBS','5lMg6lgpW7dWLBkc','vHDG','lmo9fmk2W5a','W4dcUmouW7dcR8kkgGyIa0r9wISomSkogCowDCoy','yCkWguNcSG','zx0VW6T0','z8kDmq','4PYvWPpMTjJORixOVz/PGBdMG5RKU4mBW51FW53INl7dPoAEU+wjN+EjJ+AcM+AURow4JSk5oflcIG','WRGMW4JcRmky','W4xcGqpcPqJcKIhdNW','smkFWR0CjW','W5hcRKT0W6K','nCk7qmoSW6u','WONdOCoCe0FcGa','W4ferLu','x8kAbSk6Da','44kl6lEA5y+z','DCkkWP4rnSoExSoNWQZcMcm','W7e1n3y0W6i','WRddTJxcNsG','kcVcL8o3WP8','W7ZdLSogW7dcMmkbcHC','xSojWRlcTSo6','WRRdH8oIW6/cKW','WOyWWRnmimkc','W4ZdI8ohW5BcV8knaG','W79Qse4v','q8o6WO7cKmoG','WR3cIe9kW7JdK8k2dHRcQ0DLrSovW5jBFCoiWR7cTgP0jq','bSkiW6muWOT0W5O','W6DesSoGW4G','WO49W6/cGSke','WOytkemJicWnW4u','yGrzzSov','WPtcJMfQWRlcH2jIW5i','6iYz5y61sCkXiSoZzSkQ5AEi6lEG','WRhdUZdcGWC','W6BdVCoAtmkxAhq','W6xcPSk7WO/dILH8dxavWQi','WOddVSorW67cR8kiaWO','W6OWs8o3W50','WPxcSCkhW43dNG','WOdcRfJcGCo4','W6xcTCkDWQJdTa','e1FcI8kCaKRdR0vSWQa9','WPuGWRrri8keW7X2Feu','W6XZW612na','W4xdSSogW5dcSa','ymkUsSoWWR1ZCSoUgW','amkEW6qzWPL0','WOqrlKGDadeF','WOzSWR5nW4ddVG','bmoTCSkaDmoFCMpdNmoeW60','WP3dP8oEW6ZcTq','qhRcV8owAG','W7FcK0K','W5BdMXtcHsFcMs7cHNfNEoISVUAXHEwMPEI1Io+9MEISHUAJL+ACSEE8TUI0JoMgJUITTG','W6bgW5zanG','p8knW7r2W54','5B6f5y2b6i6E5BYA5lIy','WPuvp0mJdqeeW5/dVmoD','jSohWPRdJa8','WPSLWQvxamkFW4XT','bHVcSSo4WO3dLSoOv8oPogC','rCozBCk7tW','W7BdOCoBACknAvddOX0','imo6WO7dStK','WR9OFa','rx/cGSo+BSoPFSokW4icW4KgzCorkLzaW5JcMGXVWRLxWPrgWQ8WbbRcOSk+W6ldH8o1ESk9WO3dJvJcQXpdVSoSWROJW4FcJcy8WOPZibxcR3elWRitomoirgBdQmo+W7nKe8kqW6eUg8omWOtcNfCyv8orW49LcvpdNCojW6DXDIH/ef5n','WP4fmMe4dqSgW4VdTComW7tdLSon','W4zprSoMW7D/WOBdHG','WQu8e3ui','W4CnxSk7p8o9Fmk7WORcJmo8WRS5','wvmk','W7ldSmoDtCkiz3tdSZRcOW','W7ZcP8kJWPpdPq','W5y1zSknjW','pSk4WPFdNbG','WQ0zCgZcRSo+','WPa0WRry','W5FdRhpdJmk0W6a0','W6pcOmk7WRpdJ1r6pvCxW7a','WPSmpsZcMCkVW5rTWPBdJ8ok','WRNdVbdcMX4','BHTVrSo7tmoz','WQ3cV8kJW4RdLCk5W4ivFSopCCogWO/cJ8kkEbH6y8kwbMhdVGHJWQ/dICoDWO9NW5DXW6bglgtcQSobWRGDW7aYW6BdPCo2WQT9oSkcASoPjaX5dmkHW57cI8ohW54GW4m7kq3dTJGGmbFdTSkMy2DZahJcSIC4W5pcLgKNWP5vaa','y8kJfgFcGW','W6PqtmoJW517WR7dPJFcQmkYWQW','W4udW5y','zmoxFmkcCa','b8kbW7GFWPG','WOFdUCowW6dcUCkMca','WP0FjJO','WQCgWPr0dW','xvpcGmk0eKRdLv5JWPC3WOj0tSoqjWbpWP1PW4HVW4pdO2auW74','W6RcPmkIWOm','mmooWRWGrq','W6Xvvfyb','WQuxy0G','WOOwpsVcI8kPW6DRWO/dGSonWP7cJ8o4','qmkfwSo2WOS','WRm0pM
// 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"])