mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
24 lines
64 KiB
JavaScript
24 lines
64 KiB
JavaScript
|
/*
|
|||
|
活动名称:签到有礼(超级无线V2)
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v2/<10023/10040>/<模板id>/?activityId=<活动id>&shopId=<店铺id>
|
|||
|
环境变量:jd_lzkj_v2_sign_url // 活动链接
|
|||
|
jd_lzkj_v2_sign_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_lzkj_v2_sign_notify // 是否推送通知(true/false),默认不推送
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('签到有礼(超级无线V2)')
|
|||
|
const jdCookie = require('./jdCookie')
|
|||
|
const common = require('./function/jdCommon')
|
|||
|
const notify = require('./function/sendJDNotify')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { wuxianDefense } = require('./function/jdCrypto')
|
|||
|
const { lzkj_interaction_v2_savePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const ilIill1I=iIlI1i1i;(function(lIl1lll,l1lillI,illi1i1I,lilI1I1l,I11iiIi,IiIli1l,IlliIIIi){return lIl1lll=lIl1lll>>0x9,IiIli1l='hs',IlliIIIi='hs',function(I11IIl1I,IIlIl1I1,lI11iI,iIlilIlI,lilI1liI){const iIiiIili=iIlI1i1i;iIlilIlI='tfi',IiIli1l=iIlilIlI+IiIli1l,lilI1liI='up',IlliIIIi+=lilI1liI,IiIli1l=lI11iI(IiIli1l),IlliIIIi=lI11iI(IlliIIIi),lI11iI=0x0;const liI11lii=I11IIl1I();while(!![]&&--lilI1I1l+IIlIl1I1){try{iIlilIlI=-parseInt(iIiiIili(0x1d8,'7JZY'))/0x1*(-parseInt(iIiiIili(0x3ad,'7JZY'))/0x2)+-parseInt(iIiiIili(0x3e8,'Dn^P'))/0x3+-parseInt(iIiiIili(0x33d,'l9i7'))/0x4*(parseInt(iIiiIili(0x467,'oJX3'))/0x5)+-parseInt(iIiiIili(0x32c,'Lzy@'))/0x6+parseInt(iIiiIili(0x32f,'oN)F'))/0x7+-parseInt(iIiiIili(0x250,'HhdG'))/0x8+parseInt(iIiiIili(0x238,'b#qH'))/0x9*(parseInt(iIiiIili(0x427,'8vSw'))/0xa);}catch(iI1Il11l){iIlilIlI=lI11iI;}finally{lilI1liI=liI11lii[IiIli1l]();if(lIl1lll<=lilI1I1l)lI11iI?I11iiIi?iIlilIlI=lilI1liI:I11iiIi=lilI1liI:lI11iI=lilI1liI;else{if(lI11iI==I11iiIi['replace'](/[qExGknTlOQgJVLrtRNDuMIS=]/g,'')){if(iIlilIlI===IIlIl1I1){liI11lii['un'+IiIli1l](lilI1liI);break;}liI11lii[IlliIIIi](lilI1liI);}}}}}(illi1i1I,l1lillI,function(lilI11I1,I11IIII1,IIl111I,il1li1II,II1iIiIl,IIiI111l,l11I1iil){return I11IIII1='\x73\x70\x6c\x69\x74',lilI11I1=arguments[0x0],lilI11I1=lilI11I1[I11IIII1](''),IIl111I=`\x72\x65\x76\x65\x72\x73\x65`,lilI11I1=lilI11I1[IIl111I]('\x76'),il1li1II=`\x6a\x6f\x69\x6e`,(0x16ebb3,lilI11I1[il1li1II](''));});}(0x19600,0xf0ea2,iIIIIlI1,0xcd),iIIIIlI1)&&(iil=0xcd);const activityUrl=process[ilIill1I(0x267,'oN)F')][ilIill1I(0x4ab,'@u(T')]||'',joinMember=process[ilIill1I(0x2ec,'raCN')][ilIill1I(0x3bb,'v$Z(')]===ilIill1I(0x47d,'HhdG'),isNotify=process[ilIill1I(0x348,'hTdV')][ilIill1I(0x322,'zKSZ')]===ilIill1I(0x4c0,'Dn^P');let cookie='',originCookie='';function iIIIIlI1(){const IiIl111l=(function(){return[...[iil,'VQEqjlRLsjQDiJOangGmkiT.ucLoSMmNrt.Iqvx7==','EXNcGmoOyq','wetdSCk6BW','koobLEE4OoADL+AwVEMvUEodOa','WRRdQCoWwCkE','W4BdSSkqWOqM','WPxcSWddVSoE','car1uCoA','iSo1W6W','f8kln8kZEMi','77+p5BEV5OI75yQK6iEB5yUR55Md6k+D5Psf6lA05z2s5z+RWQhcKG','WO3cHCo/D2PBuG','rmowWQBdMSkRW7Hk','77+X5PMh5lU+5yYy5P+e6iwL5P6h5PER5O2M772G6kYD6ikf57cn5lY46igG6l+h6kcn5y6G6AEq776i','n8oXWOpcLZmmgxNcJXi','WQvCWPnwW7C','uIZcNvWKW6BcLmkj','W74gymkfp2JcOG','W6lcUu1hWPaw','De7dISksELVdPaJcJCkww8ow','WO8VtSkw','AdtdHZtcHmkbWPtcSCo9WOZdSKlcMKKP','W77dH8kkWQqR','W7VdQXOkCmkOAKmzWQm','W4ZdImkAWP4BhvW','AoE7L+ADUE+/PEs5RoASS+AvVEEcGoAFQ+wrSmkz','56IQ5Rom8kcqNG','WQ7cPmkGWQhcOW','WObrWQT2W6S','WQBcVgTNwZSrEHjAW7JcI8kfWQOOtKhcSCkdWPSBW4W5WPDzWPRcHW','cCkgk8kWuMhcSq','FSkhW68gW6NdTMHKW48','WPRcKNi','wSoVW4pcQJC','sItcGfG5W6tcN8ktW4LrxCoKW4JdVJe','pSkXh8oDtCoUWQdcGG','5RsZ5yUT5Bkn5PYQ5B6M5AEr77YB5B2D5AEE5PwB6zsm772D','W6RcVhDRgJWFzq','tSo2cqK','sN/cSCkZva','WQpcI1VcK8kJ','uWqOW6VcVa','A+AiPEs7ISkF','WOGVvSksAmoEW5VcRa','5AwLe2/dRq','WOBcICoIzwDqtG','WQL5DfDlkfiYrCkHpCoyW4ldV0hcMmogWPiLW64WyG','rmkbW5yPW6y','zCoeW5qdsZy2BrbpWP5+','6i635y+9W7ZcTNLrW7udWPpLP4JOTjO','lSkrq8oXWP8','WPddKaH9DgWVa8orW53cH8oNWR0z','FmkaW6G5W6ldMW','W5DNW69RlInK','cCk3d8k2xq','p8okW7/dM8kM','orJcL8oAiWRcOIlcQmkqrSogWRe','wCkqW7alW6e','zuxcKCkLFa','emkfW6xcNCo7WQWCWPVcKJ1mWRKp','xglcL8kYEW','WOVcPbNdQCoHWQfTW7ldSa','WR8NeH5JdXe','W7ZcQu1LWOOA','5lMC5lIT5lM88lQeOE+4MG','W67cNeLCoq','W4bJW7nEWPymtcizW5KwW5Hv','EJddUuxdIh4','WPdcMmkXCG','W55JW6H5','vCo9W7hcKr4','WOxdIKXzuY4','W6ddMCouuq','WQLSWRLYbhqyW59kWQrWgb0','umo6hrtcMSoFW6K','iSoxWRdcHY8','bSkOgSoGwq','WRqRgq','ECotcXBcTa','p2vpWP0','W7JdRae','B8kdW6CiW63dJq','eCoQWO7dHCkHWOtdOmkTxW','WPf8WRrlW5ezdcD5W5Di','AwaG','W6RcVvDb','wmoKWOpdR8ka','44kE5O2O56Ad44cL6k+R5yAu6iYf5yYJWQFcTmoyr8k3lq','WONcJSo/yxLi','WPRcOb7dJ8oBWRXQ','WRVcP2NcHCkjFvVdGa','DqhdOqVdHColWO5grc7dKGG','W6dcUvrcWOunumksWRyp','cWT8vSoLW4xcO1u','WPtcRGO','WOBdL0i','jSoUW4/dG8kz','WQBcTmkxuCkn','i8oPW6W','eWT1ELi','aUIUSUAYSEwKUEI1RSkT4P2TW4C','W4RNUAVMNBRVVllKUlhMRAhMLRZNG5lMNO/LKOVdHa','W67dMCkPWO0r','W7aqymkQjwdcSuNcQmkT','BetdGa','nCo9WPpcMW','WOnVWQXlW5m','FMpcUSkY','W7Wwz8kWmM7cOa','WRdcN2ddSM0','fXjktLJ
|
|||
|
|
|||
|
// 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"])
|