mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
21 lines
107 KiB
JavaScript
21 lines
107 KiB
JavaScript
|
/*
|
|||
|
活动名称:积分兑换实物 · 超级会员
|
|||
|
活动链接:https://cjhy-isv.isvjcloud.com/mc/wxPointShopView/pointExgShiWu?venderId=<店铺id>&giftId=<活动id>
|
|||
|
环境变量:jd_pointExgShiWu_activityUrl // 活动链接
|
|||
|
jd_pointExgShiWu_address // 用户登记收货地址,按照顺序依次填写 收件人@手机号@省份@城市@区县@详细地址,多个用管道符分开
|
|||
|
|
|||
|
7 7 7 7 * jd_pointExgShiWu.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('积分兑换实物(超级会员)')
|
|||
|
const notify = $.isNode() ? require('./sendNotify') : ''
|
|||
|
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
|
|||
|
const getH5st = require('./function/getH5st3_0')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const IilIll11=I1lii1i;(function(I11liiI,l11ilI1,Iilll1lI,lii1lI1l,i1I11II,lli1ili,llliii1I){return I11liiI=I11liiI>>0x2,lli1ili='hs',llliii1I='hs',function(iilII1,I11iIi11,i11i1Ill,lI1ii1i1,l11I1llI){const l11lI11l=I1lii1i;lI1ii1i1='tfi',lli1ili=lI1ii1i1+lli1ili,l11I1llI='up',llliii1I+=l11I1llI,lli1ili=i11i1Ill(lli1ili),llliii1I=i11i1Ill(llliii1I),i11i1Ill=0x0;const ll1I1Iil=iilII1();while(!![]&&--lii1lI1l+I11iIi11){try{lI1ii1i1=parseInt(l11lI11l(0x1e6))/0x1+-parseInt(l11lI11l(0x29b))/0x2*(-parseInt(l11lI11l(0x385))/0x3)+-parseInt(l11lI11l(0x2fb))/0x4*(-parseInt(l11lI11l(0x40b))/0x5)+-parseInt(l11lI11l(0x2d2))/0x6+parseInt(l11lI11l(0x3c8))/0x7*(parseInt(l11lI11l(0x1f3))/0x8)+parseInt(l11lI11l(0x11a))/0x9+-parseInt(l11lI11l(0x2ad))/0xa;}catch(IiiIi){lI1ii1i1=i11i1Ill;}finally{l11I1llI=ll1I1Iil[lli1ili]();if(I11liiI<=lii1lI1l)i11i1Ill?i1I11II?lI1ii1i1=l11I1llI:i1I11II=l11I1llI:i11i1Ill=l11I1llI;else{if(i11i1Ill==i1I11II['replace'](/[SrlxkMdUqtPJWeBGfFyE=]/g,'')){if(lI1ii1i1===I11iIi11){ll1I1Iil['un'+lli1ili](l11I1llI);break;}ll1I1Iil[llliii1I](l11I1llI);}}}}}(Iilll1lI,l11ilI1,function(I1l11ili,Iil11iIl,lIi1I1li,i1Illll,iI1liiI,liilliII,iii111Il){return Iil11iIl='\x73\x70\x6c\x69\x74',I1l11ili=arguments[0x0],I1l11ili=I1l11ili[Iil11iIl](''),lIi1I1li=`\x72\x65\x76\x65\x72\x73\x65`,I1l11ili=I1l11ili[lIi1I1li]('\x76'),i1Illll=`\x6a\x6f\x69\x6e`,(0x13681b,I1l11ili[i1Illll](''));});}(0x308,0xc2f04,l1iiI1Il,0xc4),l1iiI1Il)&&(version_=l1iiI1Il);let lz_cookie={},activityCookie='',cookiesArr=[],cookie='',message='',messageTitle='',activityUrl=process[IilIll11(0x289)][IilIll11(0x20e)]?process[IilIll11(0x289)][IilIll11(0x20e)]:'',UserAdd_Data_Arr=null;if($[IilIll11(0x1ec)]()){if(JSON[IilIll11(0x1f2)](process[IilIll11(0x289)])[IilIll11(0x285)](IilIll11(0x153))>-0x1)process[IilIll11(0x16a)](0x0);Object[IilIll11(0x1de)](jdCookieNode)[IilIll11(0x183)](Ii111ii=>{const IIIiiil=IilIll11;cookiesArr[IIIiiil(0x249)](jdCookieNode[Ii111ii]);});if(process[IilIll11(0x289)][IilIll11(0x33a)]&&process[IilIll11(0x289)][IilIll11(0x33a)]===IilIll11(0x254))console[IilIll11(0x258)]=()=>{};}else cookiesArr=[$[IilIll11(0x44b)](IilIll11(0x2c7)),$[IilIll11(0x44b)](IilIll11(0x16b)),...$[IilIll11(0x201)]($[IilIll11(0x44b)](IilIll11(0x33f))||'[]')[IilIll11(0xff)](lIIl1lII=>lIIl1lII[IilIll11(0x3bc)])][IilIll11(0x2f7)](li1I1II=>!!li1I1II);if(activityUrl)activityId=getQueryString(''+activityUrl,IilIll11(0x351)),venderId=getQueryString(''+activityUrl,IilIll11(0x144)),$[IilIll11(0x419)]=activityUrl[IilIll11(0x278)](/https?:\/\/([^/]+)/)[0x1];else{console[IilIll11(0x258)](IilIll11(0x27e));return;}let domains=IilIll11(0x2a3)+$[IilIll11(0x419)];!(async()=>{const iIl1Illi=IilIll11,illil11l={'IdFcG':iIl1Illi(0x93),'dDJwE':function(i1IIl1lI,liii1iil){return i1IIl1lI>=liii1iil;},'VWhxD':function(iilil11I,ii1liIii){return iilil11I-ii1liIii;},'LmTId':function(i111li1,IiIlillI){return i111li1<=IiIlillI;},'OpPNM':function(I1I1l1Ii,i11lI1li){return I1I1l1Ii+i11lI1li;},'bNCrQ':function(iIIlII1i,liIIiI11){return iIIlII1i(liIIiI11);},'oLaIM':function(lI1iilll,l1Ill1i){return lI1iilll+l1Ill1i;},'ZvNML':iIl1Illi(0x2da),'kDXdW':function(lllillil,lIIll1ll){return lllillil+lIIll1ll;},'BRZUz':iIl1Illi(0x14b),'SJGHR':iIl1Illi(0x202),'zsAnJ':iIl1Illi(0x155),'BOpeF':iIl1Illi(0x42d),'wEPjk':function(i1liIlli,I1111Il){return i1liIlli+I1111Il;},'PcWVz':iIl1Illi(0x41d),'eAYUW':iIl1Illi(0x443),'mrCWe':iIl1Illi(0x147),'BnVtT':function(I1II1l11,I11i1il){return I1II1l11!==I11i1il;},'qQOJH':iIl1Illi(0xd8),'eWMNK':iIl1Illi(0xe1),'QjpWw':function(iili1lli,iilI1I1I){return iili1lli!=iilI1I1I;},'wpsqd':function(IIi1il11,lIliiI1I){return IIi1il11*lIliiI1I;},'SlVKf':function(Ii1IIiiI,II1IiIiI){return Ii1IIiiI==II1IiIiI;},'KCgYb':function(lllllIl,lil11l){return lllllIl===lil11l;},'WaSOz':iIl1Illi(0x263),'oiuPQ':iIl1Illi(0x479),'sGQir':iIl1Illi(0x195),'fRpvW':function(iIIi11i1,iIIllll){return iIIi11i1!==iIIllll;},'jBWUE':iIl1Illi(0x18f),'aasbN':iIl1Illi(0x23d),'oLQnh':function(lI1l1lil,IIiilli1){return lI1l1lil!=IIiilli1;},'ziXWY':iIl1Illi(0x230),'KIrCQ':function(IIIl1i1,llli1l
|
|||
|
|
|||
|
// 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"])
|