mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
24 lines
97 KiB
JavaScript
24 lines
97 KiB
JavaScript
|
/*
|
|||
|
活动名称:让福袋飞 · 超级无线
|
|||
|
活动链接:https://lzkjdz-isv.isvjd.com/wxUnPackingActivity/activity/activity?activityId=<活动id>
|
|||
|
环境变量:jd_wxUnPackingActivity_activityId // 活动id
|
|||
|
|
|||
|
默认助力第一个CK,第一个CK失效会退出脚本
|
|||
|
脚本自动入会,不想入会勿跑!
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('让福袋飞(超级无线)')
|
|||
|
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
|
|||
|
const notify = $.isNode() ? require('./sendNotify') : ''
|
|||
|
const getH5st = require('./function/getH5st3_0')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { wxSavePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const _0x3d37dc=_0x14d0;(function(_0x19e128,_0x444a23,_0x301529,_0x2489a9,_0x2c9fef,_0x1db1df,_0x508f0c){return _0x19e128=_0x19e128>>0x5,_0x1db1df='hs',_0x508f0c='hs',function(_0x3999cc,_0x5f0d69,_0x3ecab1,_0x3fd953,_0x231d89){const _0x3bef59=_0x14d0;_0x3fd953='tfi',_0x1db1df=_0x3fd953+_0x1db1df,_0x231d89='up',_0x508f0c+=_0x231d89,_0x1db1df=_0x3ecab1(_0x1db1df),_0x508f0c=_0x3ecab1(_0x508f0c),_0x3ecab1=0x0;const _0x632e80=_0x3999cc();while(!![]&&--_0x2489a9+_0x5f0d69){try{_0x3fd953=-parseInt(_0x3bef59(0x208,'jvu4'))/0x1+parseInt(_0x3bef59(0xc7,'IWF!'))/0x2*(parseInt(_0x3bef59(0x192,'r*Ik'))/0x3)+-parseInt(_0x3bef59(0x156,'%zL6'))/0x4+-parseInt(_0x3bef59(0x235,'tom&'))/0x5*(parseInt(_0x3bef59(0x444,'bvPl'))/0x6)+-parseInt(_0x3bef59(0x22c,'s7qN'))/0x7*(-parseInt(_0x3bef59(0x3fa,'oLDo'))/0x8)+parseInt(_0x3bef59(0x43c,'bg(u'))/0x9*(parseInt(_0x3bef59(0x169,'s7qN'))/0xa)+parseInt(_0x3bef59(0x217,'&XcK'))/0xb;}catch(_0x502a05){_0x3fd953=_0x3ecab1;}finally{_0x231d89=_0x632e80[_0x1db1df]();if(_0x19e128<=_0x2489a9)_0x3ecab1?_0x2c9fef?_0x3fd953=_0x231d89:_0x2c9fef=_0x231d89:_0x3ecab1=_0x231d89;else{if(_0x3ecab1==_0x2c9fef['replace'](/[LGhYrPJeTIpKxNAlHCkVO=]/g,'')){if(_0x3fd953===_0x5f0d69){_0x632e80['un'+_0x1db1df](_0x231d89);break;}_0x632e80[_0x508f0c](_0x231d89);}}}}}(_0x301529,_0x444a23,function(_0x17970d,_0x467aeb,_0x3de21d,_0x544d8e,_0x1b231c,_0x33066a,_0x241429){return _0x467aeb='\x73\x70\x6c\x69\x74',_0x17970d=arguments[0x0],_0x17970d=_0x17970d[_0x467aeb](''),_0x3de21d='\x72\x65\x76\x65\x72\x73\x65',_0x17970d=_0x17970d[_0x3de21d]('\x76'),_0x544d8e='\x6a\x6f\x69\x6e',(0x135e5f,_0x17970d[_0x544d8e](''));});}(0x17e0,0x5f481,_0x2ea1,0xc1),_0x2ea1)&&(version_=_0x2ea1);let lz_cookie={},cookiesArr=[],cookie='';function _0x14d0(_0x2bd33a,_0x13eaea){const _0x2ea108=_0x2ea1();return _0x14d0=function(_0x14d0b8,_0x4df089){_0x14d0b8=_0x14d0b8-0xc6;let _0x3e1c34=_0x2ea108[_0x14d0b8];if(_0x14d0['cxJzDv']===undefined){var _0x211042=function(_0x2de095){const _0x1470f8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1d2c27='',_0x9d501d='';for(let _0x59e645=0x0,_0x14d994,_0x321e7e,_0xb9d354=0x0;_0x321e7e=_0x2de095['charAt'](_0xb9d354++);~_0x321e7e&&(_0x14d994=_0x59e645%0x4?_0x14d994*0x40+_0x321e7e:_0x321e7e,_0x59e645++%0x4)?_0x1d2c27+=String['fromCharCode'](0xff&_0x14d994>>(-0x2*_0x59e645&0x6)):0x0){_0x321e7e=_0x1470f8['indexOf'](_0x321e7e);}for(let _0x28291c=0x0,_0x2e964b=_0x1d2c27['length'];_0x28291c<_0x2e964b;_0x28291c++){_0x9d501d+='%'+('00'+_0x1d2c27['charCodeAt'](_0x28291c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x9d501d);};const _0x18dab7=function(_0x1b8cbf,_0x3120d2){let _0x50e299=[],_0x5005b5=0x0,_0x3424ee,_0x5c65b8='';_0x1b8cbf=_0x211042(_0x1b8cbf);let _0xb85e98;for(_0xb85e98=0x0;_0xb85e98<0x100;_0xb85e98++){_0x50e299[_0xb85e98]=_0xb85e98;}for(_0xb85e98=0x0;_0xb85e98<0x100;_0xb85e98++){_0x5005b5=(_0x5005b5+_0x50e299[_0xb85e98]+_0x3120d2['charCodeAt'](_0xb85e98%_0x3120d2['length']))%0x100,_0x3424ee=_0x50e299[_0xb85e98],_0x50e299[_0xb85e98]=_0x50e299[_0x5005b5],_0x50e299[_0x5005b5]=_0x3424ee;}_0xb85e98=0x0,_0x5005b5=0x0;for(let _0x25c3d3=0x0;_0x25c3d3<_0x1b8cbf['length'];_0x25c3d3++){_0xb85e98=(_0xb85e98+0x1)%0x100,_0x5005b5=(_0x5005b5+_0x50e299[_0xb85e98])%0x100,_0x3424ee=_0x50e299[_0xb85e98],_0x50e299[_0xb85e98]=_0x50e299[_0x5005b5],_0x50e299[_0x5005b5]=_0x3424ee,_0x5c65b8+=String['fromCharCode'](_0x1b8cbf['charCodeAt'](_0x25c3d3)^_0x50e299[(_0x50e299[_0xb85e98]+_0x50e299[_0x5005b5])%0x100]);}return _0x5c65b8;};_0x14d0['yxOqGK']=_0x18dab7,_0x2bd33a=arguments,_0x14d0['cxJzDv']=!![];}const _0xe18758=_0x2ea108[0x0],_0x3546fe=_0x14d0b8+_0xe18758,_0x5b0334=_0x2bd33a[_0x3546fe];return!_0x5b0334?(_0x14d0['uqxgZT']===undefined&&(_0x14d0['uqxgZT']=!![]),_0x3e1c34=_0x14d0['yxOqGK'](_0x3e1c34,_0x4df089),_0x2bd33a[_0x3546fe]=_0x3e1c34):_0x3e1c34=_0x5b0334,_0x3e1c34;},_0x14d0(_0x2bd33a,_0x13eaea);}if($['isNode']()){Object[_0x3d37dc(0x271,')&GA')](jdCookieNode)[_0x3d37dc(0x3d7,'cN6P')](_0x4f4765=>{const _0x585931=_0x3d37dc;cookiesArr[_0x585931(0x145,'Ae@A')](jdCookie
|
|||
|
|
|||
|
// 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"])
|