faker3/jd_lzkj_v2_birthday.js

24 lines
65 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称生日礼包超级无线V2
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v2/20002/<模板id>/?activityId=<活动id>&shopId=<店铺id>
环境变量jd_lzkj_v2_birthday_url // 活动链接
jd_lzkj_v2_birthday_opencard // 是否入会true/false默认不入会
jd_lzkj_v2_birthday_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 il='jsjiami.com.v7';const ilI1i1I=lIliIlIl;function lIliIlIl(_0x1f26a6,_0x2999b8){const _0x223bba=I1Ii1I1();return lIliIlIl=function(_0x3dbbf1,_0x3454a1){_0x3dbbf1=_0x3dbbf1-0x192;let _0x3fc187=_0x223bba[_0x3dbbf1];if(lIliIlIl['Qdhgdl']===undefined){var _0x188514=function(_0x1938e1){const _0x5f4e41='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x234cc5='',_0x18cc0b='';for(let _0x13cbd4=0x0,_0x3ffe89,_0x4f0fd7,_0x15ebc8=0x0;_0x4f0fd7=_0x1938e1['charAt'](_0x15ebc8++);~_0x4f0fd7&&(_0x3ffe89=_0x13cbd4%0x4?_0x3ffe89*0x40+_0x4f0fd7:_0x4f0fd7,_0x13cbd4++%0x4)?_0x234cc5+=String['fromCharCode'](0xff&_0x3ffe89>>(-0x2*_0x13cbd4&0x6)):0x0){_0x4f0fd7=_0x5f4e41['indexOf'](_0x4f0fd7);}for(let _0x4eac8f=0x0,_0x3f7c08=_0x234cc5['length'];_0x4eac8f<_0x3f7c08;_0x4eac8f++){_0x18cc0b+='%'+('00'+_0x234cc5['charCodeAt'](_0x4eac8f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x18cc0b);};const _0x46f249=function(_0x35903f,_0x3f0d67){let _0x1b9d51=[],_0x592876=0x0,_0x5190d9,_0x5c4ec2='';_0x35903f=_0x188514(_0x35903f);let _0x220fc6;for(_0x220fc6=0x0;_0x220fc6<0x100;_0x220fc6++){_0x1b9d51[_0x220fc6]=_0x220fc6;}for(_0x220fc6=0x0;_0x220fc6<0x100;_0x220fc6++){_0x592876=(_0x592876+_0x1b9d51[_0x220fc6]+_0x3f0d67['charCodeAt'](_0x220fc6%_0x3f0d67['length']))%0x100,_0x5190d9=_0x1b9d51[_0x220fc6],_0x1b9d51[_0x220fc6]=_0x1b9d51[_0x592876],_0x1b9d51[_0x592876]=_0x5190d9;}_0x220fc6=0x0,_0x592876=0x0;for(let _0x2bcfc9=0x0;_0x2bcfc9<_0x35903f['length'];_0x2bcfc9++){_0x220fc6=(_0x220fc6+0x1)%0x100,_0x592876=(_0x592876+_0x1b9d51[_0x220fc6])%0x100,_0x5190d9=_0x1b9d51[_0x220fc6],_0x1b9d51[_0x220fc6]=_0x1b9d51[_0x592876],_0x1b9d51[_0x592876]=_0x5190d9,_0x5c4ec2+=String['fromCharCode'](_0x35903f['charCodeAt'](_0x2bcfc9)^_0x1b9d51[(_0x1b9d51[_0x220fc6]+_0x1b9d51[_0x592876])%0x100]);}return _0x5c4ec2;};lIliIlIl['aYNWOh']=_0x46f249,_0x1f26a6=arguments,lIliIlIl['Qdhgdl']=!![];}const _0x430928=_0x223bba[0x0],_0x27b8f0=_0x3dbbf1+_0x430928,_0x5875fa=_0x1f26a6[_0x27b8f0];return!_0x5875fa?(lIliIlIl['wTVPxd']===undefined&&(lIliIlIl['wTVPxd']=!![]),_0x3fc187=lIliIlIl['aYNWOh'](_0x3fc187,_0x3454a1),_0x1f26a6[_0x27b8f0]=_0x3fc187):_0x3fc187=_0x5875fa,_0x3fc187;},lIliIlIl(_0x1f26a6,_0x2999b8);}function I1Ii1I1(){const i1ll1l1I=(function(){return[...[il,'qqjyksUYYjeiatXmi.pCcobTmVH.UvY7lTOpywrq==','W4FJGktNUQVMNldMLBlPL5hJGzO','bY9Bvv07hCk3iW','B8ohgXRcRSoP','WQWnhmkRW6abWRldN8kRW6n9W4G','WORdM8kUWOpcMSoHwCksW5NdSKX8WRO','f8oulSkjWQa','fSkCiJhcMa','c8k0WQ9ywCkJEq','cSktjdBcLq','WRihgmkNW6C','W7VdOmkvCCkPW7xcKCoIbCkHWP8r','oCowamkR','kthdO8kcW7y','cSk+WRS','tfNdQflcT8kc','WO/NUANMN6FVVypKUktMR5VMLBRNGAxMNPhLKQr/','WQhcP8oqmCoVW7ZdMmk6','kw8UtvO','WP7cNSo+gCoQ','W4m+W5e','fZFdGSksW5zYWPVcIenAWP50W68L','WOOnWRldSw3cScG','WPhdJJ8fWOW','WOBdMZJcNXqLW70','tW4xWQi2WP0cmca','WPKTkW','WQZcVCohm8oLWRBcG8oflCkQ','5Rsf5yQe5lMd6zMh5BMo6zcC5l+M5zkW5y2b5lIv','v8kvWP/cQLVcOZW','r8kVxc55WPq','WOtdN8kPWQVcPq','WOBdHtlcJcmJW6a','W5dcT3zcW7ZcLmk1WOSSWQ8','xmoKDs/dPa','eSoZaCklWQy','mUw8MUwLMUAxV+MwI++9Iq','WOZdPSoyWPFdKmkhevO4W6i','WOFdLmkUWOC','r8kODXf1','WPedWRRdPvRcTZu','WQdcVCoajmoK','gJpdJmkPW48','jxddTmosW4K','uh/dSg0AiCo6','WOVcNJjY','W6lNUi7MNP/VViZKUOBMR5xML4RNG7BMNjVLK6nK','vSkFWOS','8kwKV++7Lmo45lYE5OkE5yIo','4PQejEIVHUwHL+whRoAJQEw9MEASKEEHJEEzGUMrU+AmJa','WPtdJs/cLqC/W7RcJSkOWPpdSmoc','A8kFWRVdGW','pSoyemkV','W5NcV0v8W5G','WO/dOSooWRFcJ8kpe0CpW6rGmfPXza','A8oUDY3dPa','5PYs6ioN6iYM5y+F55wx5OMK6yU95P+95lYW5Ogj776G','gIVdG8k6W6i','m8oobapdImoUW6VdHmkdW7VdMgxdRsNcKs9FWP3cOcNcTCoj','uCk8WOxdTSo5','WPnZWOniW5JdMCovW5T/umoEw3i','ruDJws0','WOVcMIvHk1SL','5yw06ygh6koF6AoS5yYX','emkDWR94ya','n8opW77dTmkgfa','FUobI+E7UUADO+AxHEMwQoobPq','emoKWO4','WQhdGmkJWOlcNSkoity','W6fpuM3dTG','W43dLCkMWP4e','5BUf6zcP5zkl56AZ77+slW','W69qrv7dNq','gsj5tLOMeCkI','cgpdPW','rCkOwXfYWR5fs8o8','v2RdMKC4','WQRcVw1EpW','WQ7cSSkN','W7jBteVdIvxdJsnRWRldQ8oK','WO/dNbdcJSo7','qwTvAbZcUdm','ASo9sYxdMG','W4NcSmohW4DA','WORcUuPhoG','WOZdR8k1WQxcOW','W6BdJCk5WOtcHmkhkdiX','FHHEqcVdImkg','WPtcRwLhnW','WOJcS8oLWQdcN2q','isHmtN09gCk0','5yQe5ysV5BQx6zov5l6c5zkC5AwN6lAn772T5RAU
// 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"])