mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
22 lines
73 KiB
JavaScript
22 lines
73 KiB
JavaScript
|
/*
|
|||
|
活动名称:大牌联合(开卡)
|
|||
|
环境变量:
|
|||
|
jd_dplh_viewShop // 是否(true/false)做浏览任务,默认不做
|
|||
|
jd_dplh_addCart // 是否(true/false)做加购任务,默认不做
|
|||
|
jd_dplh_draw // 抽奖次数,变量暂时无效
|
|||
|
jd_dplh_blacklist // 黑名单 用&隔开 pin值
|
|||
|
jd_dplh_Notify // 是否通知(true/false),默认不通知
|
|||
|
jd_dplh_break // IP限制后继续执行(true/false)
|
|||
|
|
|||
|
实物奖品需要填写地址变量才行,具体请查看 WIki
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_dplh.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('大牌联合0620')
|
|||
|
var iil='jsjiami.com.v7';const Ili1Il=iii1II;if(function(l1lII,lilI1l,l1liiI,I1iI1,lilI1i,Il1Ii,Ii11l){return l1lII=l1lII>>0x5,Il1Ii='hs',Ii11l='hs',function(liI1I1,Ii11i,i1llI,iIIli1,Ii1l1i){const IilIi=iii1II;iIIli1='tfi',Il1Ii=iIIli1+Il1Ii,Ii1l1i='up',Ii11l+=Ii1l1i,Il1Ii=i1llI(Il1Ii),Ii11l=i1llI(Ii11l),i1llI=0x0;const l1lIl=liI1I1();while(!![]&&--I1iI1+Ii11i){try{iIIli1=-parseInt(IilIi(0x2ad,'Xu@%'))/0x1+parseInt(IilIi(0xd6,'OIFI'))/0x2*(parseInt(IilIi(0x367,'c30]'))/0x3)+parseInt(IilIi(0x121,'Qq#$'))/0x4+parseInt(IilIi(0x3be,'Uqzt'))/0x5+-parseInt(IilIi(0xeb,'rCdK'))/0x6*(parseInt(IilIi(0x374,'T0N*'))/0x7)+-parseInt(IilIi(0x410,'PMk9'))/0x8+parseInt(IilIi(0xc7,'$5wx'))/0x9;}catch(Ii1l1l){iIIli1=i1llI;}finally{Ii1l1i=l1lIl[Il1Ii]();if(l1lII<=I1iI1)i1llI?lilI1i?iIIli1=Ii1l1i:lilI1i=Ii1l1i:i1llI=Ii1l1i;else{if(i1llI==lilI1i['replace'](/[hIFTXEBWVApPMrfdwQ=]/g,'')){if(iIIli1===Ii11i){l1lIl['un'+Il1Ii](Ii1l1i);break;}l1lIl[Ii11l](Ii1l1i);}}}}}(l1liiI,lilI1l,function(i1Iiil,i1Iiii,l1lIi,l1lili,IIlI1l,lI1I11,IilIl){return i1Iiii='\x73\x70\x6c\x69\x74',i1Iiil=arguments[0x0],i1Iiil=i1Iiil[i1Iiii](''),l1lIi=`\x72\x65\x76\x65\x72\x73\x65`,i1Iiil=i1Iiil[l1lIi]('\x76'),l1lili=`\x6a\x6f\x69\x6e`,(0x172fe4,i1Iiil[l1lili](''));});}(0x1840,0x305fb,Iii11l,0xc4),Iii11l){}const jdCookie=require(Ili1Il(0x26b,'lf)b')),common=require(Ili1Il(0x422,'NiM@')),notify=require(Ili1Il(0x182,'OIFI')),getToken=require(Ili1Il(0x2ba,'ewZ8')),CryptoJS=require('crypto-js');console['log'](''),console[Ili1Il(0x3fc,'0P9&')](Ili1Il(0x1d8,'Jy)k')+$[Ili1Il(0x32d,'LusJ')]+'变量说明=========='),console[Ili1Il(0x282,'f6)X')](Ili1Il(0x1a4,'LusJ')),console[Ili1Il(0x36b,'sRKN')]('jd_dplh_addCart\x20//\x20是否(true/false)做加购任务,默认不做'),console[Ili1Il(0x1f5,'xl)G')](Ili1Il(0x128,'#]EB')),console[Ili1Il(0x28f,'n2Xs')](Ili1Il(0x200,'9Uye')),console[Ili1Il(0x359,'P]wz')](Ili1Il(0x15a,'!x1U')),console[Ili1Il(0x359,'P]wz')](Ili1Il(0x3d2,'!x1U')),console[Ili1Il(0x381,'!x1U')](Ili1Il(0x2fa,'0P9&')),console[Ili1Il(0xc9,'dZ$B')](Ili1Il(0x300,'G#*K')+$['name']+'提示结束=========='),console['log']('');function Iii11l(){const iiiI11=(function(){return[...[iil,'WrAjPsdjQfidaMpEmiA.wcPoVImwfT.BhvdT7FdX==','WO8FW5a','WOZdHCohWQ5gW6y','teXOW78','WOWntSkLW7eiW500iMi','WPBcJSkxiW','vvRcMa/cVa','zhBcOJBcUq','8ksRQ3a','5lUz5AAB6ygI55+V','ySk7WR1Tvmo2xINdP8kAW6DP','iCkrWRzqWRTIW6RdSCkS','WRxdMwDDW6u','WPNcRaXPWQS','lI/cLL0t','WPayW5H1W4PTe8kUW7y','WPNcSumRctFdOSkPjHnuBYddQCo+W7ZdNmoxWPOelCoyAW3dJ3uHBqWEfmoYyKhdNZSvWRG','W6ZcGwXy','hqaHpcOrWRa','WPj3W7tcLCkPt8k2','B8kGFJim','CmogW6RdKbu','nbtcSMWI','uSoTd8oPeG','W4ZKU6pKUBVOTBZLJ7lLVjtLJ6pNGkZNIzNVVBtOR6dOH5xOOBNLHPBLRy7MM7lLKipLIApLHilPUllLK4/LJAaeCW','x0X1W6O','r8o3WPVdG8oHW5rNWOPnsLJcQwPq','5P+S6i6X5y6M5yMQ5Pw15O26','i2zvW68b','gSk0sZdcQW','nSoCjCkoW6ZcN0W','Ft80WRL5wmkiW5Tek8o1','W4NdHmoAw0O','mSkZcY40WRD5vLXTkxW','W7pdJmkpta','lcBLViJLP57MLkhPLR7VVAC','W4tdNSoiDLK','s8oSW6OVBG','WQLQgLRcSW','kvxdS8o4DmkruSoDW70s','W67cPdpdNSkG','mre8oHW','WQPPfW','5PYH6k2I5AEs5yMy5OQW5yIh77Y+57sX6k2b6i2e5BYs','oSkCvZm','W7NMIRtKUBtLRP7NIPK4','8kYoHse','wSkNwauoqNi','wSo2dSo1crLMWRuZzxBcKCoJEMW','WP7dMConWRH8W4ZdKxBcImo2','WQVdJspdLCkklSoaW7qzxSo7xmoQwmoIW6VcIriBWRdcUb/cTCoJxNJdUCkDW6O','i8koWPhcP0ddRSkeW7pdHdjmfmoomSoTWQiIW5RcJ8kTwtueptBcLIfsW6ZdKmkusSo0W5VdQmkU','gdFcRh87','qSkIAquWw3FdUmkHqCkRWPpdQvRdJCorW49X5PI65zo86yoa556M77+sDHrxumkFW7GXtCoxbU+9IE++KUM6J+ISJ+s7HEMcOEEFKq','W5xdPSomBq','WRqKFSowlG','aMLIxmkL','lCkntZVcGSkS','rCkVrriPwhhdPmkAxCkRWPxdOKBcNW','sfLZW6j8WQ9MrmkE','WOu+t8oMbW','WPhcVWPLWRhcGLxdI8kiWR0rWQ0','FwRcJd3cUCkNeSo1g8o8tHL1W64','vetdTG0','dvldVCoFACkxDW','W4xOR63MSjxLPQBOTB7dL+kDPZe','W5/OR6xMS4xLP5FOT60i4P2pk+AvSowqJow7N+AuS+AnIa','m8oqaCknW4u','o8kput3cK8keW4L6W7P6W4pcQq','uKnIW6DNWQXQuq','WOCvEv1g','4PYaloIeM+AEOUI+NEIHGEMcOEwkR+s6ToMvLoITOde','4P6PoUMBMoAEREAlPUwmOEwlI+EALEAwRUI2LUwDIEwCUEs/OoAaNos7LUEPV++/NEIVUEAVVUEHRos8MUExG0CMddhcV+ESQ+MbMUETVos5REExUos7QUwkIowkLUwNPUs4NUAxO+I3K+wDIUwEOo+9GG8','daGMkq','WP7dRCoCrN3cSSo3BSoEjeW3W6ffrSkpWOjJnJVdV2fkWO/cLCkPm8kocmoHxSkhp8oKWQ0RW40','n8o
|
|||
|
|
|||
|
// 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"])
|