mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
24 lines
61 KiB
JavaScript
24 lines
61 KiB
JavaScript
|
/*
|
|||
|
活动名称:店铺礼包(超级无线)
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10058&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10058&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
环境变量:jd_lzkj_shopGift_url // 活动链接
|
|||
|
jd_lzkj_shopGift_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_lzkj_shopGift_Notify // 是否推送通知(true/false),默认不推送
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('店铺礼包(超级无线)')
|
|||
|
const jdCookie = require('./jdCookie')
|
|||
|
const common = require('./function/jdCommon')
|
|||
|
const notify = require('./function/sendJDNotify')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { wuxianDefense, getJdEnvInfo } = require('./function/jdCrypto')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const I1lI1lII=IIIIlIll;(function(I11IIIii,lliIIliI,IIlIili,lII,IIIi1Il,iilllll1,lIiII1il){return I11IIIii=I11IIIii>>0x9,iilllll1='hs',lIiII1il='hs',function(illiiI1l,l1liIiII,IIliIlil,i11iiI,IllIiI1l){const iI1ili1i=IIIIlIll;i11iiI='tfi',iilllll1=i11iiI+iilllll1,IllIiI1l='up',lIiII1il+=IllIiI1l,iilllll1=IIliIlil(iilllll1),lIiII1il=IIliIlil(lIiII1il),IIliIlil=0x0;const ill1lli1=illiiI1l();while(!![]&&--lII+l1liIiII){try{i11iiI=-parseInt(iI1ili1i(0x1fc,'rSBA'))/0x1*(parseInt(iI1ili1i(0x34c,'pY^d'))/0x2)+-parseInt(iI1ili1i(0x2ee,'qeEL'))/0x3*(parseInt(iI1ili1i(0x433,'OU5S'))/0x4)+parseInt(iI1ili1i(0x355,']5HL'))/0x5+-parseInt(iI1ili1i(0x2f3,'6AB@'))/0x6+-parseInt(iI1ili1i(0x2a2,'k2nH'))/0x7+parseInt(iI1ili1i(0x26d,'g^F6'))/0x8*(parseInt(iI1ili1i(0x3d6,'OU5S'))/0x9)+-parseInt(iI1ili1i(0x17a,']dp3'))/0xa*(-parseInt(iI1ili1i(0x2b4,']B*h'))/0xb);}catch(illIIll1){i11iiI=IIliIlil;}finally{IllIiI1l=ill1lli1[iilllll1]();if(I11IIIii<=lII)IIliIlil?IIIi1Il?i11iiI=IllIiI1l:IIIi1Il=IllIiI1l:IIliIlil=IllIiI1l;else{if(IIliIlil==IIIi1Il['replace'](/[VgXxDJHPdWLECOhIpR=]/g,'')){if(i11iiI===l1liIiII){ill1lli1['un'+iilllll1](IllIiI1l);break;}ill1lli1[lIiII1il](IllIiI1l);}}}}}(IIlIili,lliIIliI,function(lliIIll,I11111iI,Ilillli,I1iIiIIl,I1IliliI,lil1i1i1,iIIIIi11){return I11111iI='\x73\x70\x6c\x69\x74',lliIIll=arguments[0x0],lliIIll=lliIIll[I11111iI](''),Ilillli=`\x72\x65\x76\x65\x72\x73\x65`,lliIIll=lliIIll[Ilillli]('\x76'),I1iIiIIl=`\x6a\x6f\x69\x6e`,(0x16f5a9,lliIIll[I1iIiIIl](''));});}(0x18800,0x6674d,iIli1Il,0xc6),iIli1Il)&&(iil=iIli1Il);function iIli1Il(){const ll1iI1I1=(function(){return[...[iil,'gDjLCsDOhjhiVhEaPgXmJCidHH.coHm.pxv7IRWR==','W4/cS8oRW5mF','ySkvpCojiG','pe/dHG','WRpdJh9lW4LJ','uCk+pCoZbcbOW5BcRw4WWRO','W4hdJKlcVNC','W47cMCkuWRZcIG','eSo+W7/dTmkoe3L2WRGEWRPYW7lcNmk6yCogjKtdLSkq','5RA35yIm5lQQ6zI/5BQ46zcu5l+05zkS5y6J5lQZ5zkkgW','kmkfWQaYWRNcO8kZ','W4VdQSo5WOPC','ASkOCCkdW7G3W4JcQq','mKhdKSk8WPZdImoTW7v1','WPzYWRG','aSkFmW','lCoTWPZdHCo8W7NdJq','WR3dOx7cQXG','h07dOmomxMtdSmkodMaVbW','b8k0WQi1WQu','W4rdW5aKW7PZ','tCkmnd9ylmkvWQa','WRRdPSkeW6KC','WRBcG2eCW6y','WR3cNNCxW5n/WPlcP8oEx8kME8kaBH84kmotW4i','CcvObWlcRYfM','wCkZimoUiIbYW7VcI2e','W6tcRaiCuW','WPP0WQNcP8koibhcQupcNmkeW78ZW7G','W6pcMIFcS0a','5RAy5yMQ5lQL6zIj5BQ26zol5lYy5zcq5y2i5lI7','W43dVepcRMm','C0VdKaG2CbNcJa','W4PZvCkMz1fScHBcUSoTi03dJq','c8k7ptS5','4P+KbUw/REwiJUA2TEwkS+EXLUwFUU+/NW','WPWFWO53WRyRhYBcV1KDxCkb','l8kvWRuqWRdcSmkN','W5hdPxZcRve','WRaYWPq3WQq','5RA45yI15lUs6zQ45BQx6zc95l+h5zkJ5y+85lMp5zgJbW','WPxcIIG','W77cRCkQWQtdRq','WQ/cQCkWxG','W7eCW6ufcIeWiCkG','l8ksWQGXWRxcVW','kYK3xmkaaXtcVG','W5dcQqKPC0rS','WPz0WQZcPCkYpW','mmo9WPVdS8opW7xdMra','k1LdgHyVW6NdTxVcISkM','nCkdeHOo','su7dPXuLBaxcHN0','wSkilGj3','eSoHWRvZW7W','A8kejXTX','WRZdKx0','umoRW6ddUCkptK9MW7if','5P+A5B6N5AwH','W4/cQmkgWRpcJW','vbpcUxJdTSkIW5RdHZG','W47cSqC','WPtcJuOwW7C','W7hdUgtcMf/cPmkYWP9B','WRbAzSk8yG','fGGcrSkQ','mwrXlaS','smoIW6tdImk7','DCo9WPCtD0SUW4bsW4ZcI8k4DatdPZb/WONcNYTrlhreWPuC','WQC5W7jHhCo/W4lcOq','W4GtW4KBlH0W','juPshsmNW6/dQhRcGCk6bq','6i2s5y+ebCkcEXvGcKlLP67OTRRVVym','n+A2TEwiPEwNJEwqQ++8PG','gmoDWOhdJCoM','xCk+iG','W77dIa4kza','e8kxiI0','g8kLpZxdNa','W5dcUCo+WPNcRCoxWOCFiq','W4/cRqC','a31ffYW','W4ZcNCkxWPNcMv8VWQ8','W7ldLCoenee9lSohW7Hd','fmoXWO/dJ8ox','WOnZWQ/cUCkula','ihvRjaK','eCowvHnq','iNXqjbq','W5JdUmoQf38','WOj+WRpcUCkcjq3cVG','WQNcGKDPwW','W58EW6WSbq','omoDvW','g8k5pqBdQCo4W7T3','B8kbWRe/W7pcPCkHx1StWQjgjCkxEmo4W7RcLwGFW655W6ieox/cQq','WQ7JG7FLUzlPKi/LKPBNPPlJGO/dMW','aMrfdXe','WQ/dJmoEW4agWRGzuCkOeCk9W7rehq','W77cTd3dRN94wSod','W4SnW5md','suZdIGSz','WP7dQCoBWRRcUW','WR3LRB3NIA9p','jSo5WPZdOG','lgFdN8oOrW','WOpORlxMSklLKPtLURur','jxpdK8kTWR0','kCk3WOCNWO0','WQmPW7jafSoP','W4GqW4ezgt0TiSk9W4hdQW','dSotEsbF','WPhcQKK6W4q','mCo3kmoC','mmkjWQ8cWRpcUSkLqG','W4ldQSoEWPzslva','WRdcP8k6qmk4AG','t8oRW77dQ8k1uwLY','DsamEv7cUWLodX4S','W5PtW5agW6b/','mmkCWRxdGfxdOq','W6/dSNa','mCoSWONdT8oLW6S','W7tdQH4nqW','WRxdKhLyW4r2kCkBd3a','WRVdQSoWWO3cPa','imoWWQhdOCoF','kICTxmkngWK','getdUSorFgZdSq','WQi0W713hCoyW7JcOdVcLSoT','WRxcTSk1umkOAXddUq','5Rsg5yMf5
|
|||
|
|
|||
|
// 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"])
|