mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
25 lines
79 KiB
JavaScript
25 lines
79 KiB
JavaScript
|
/*
|
|||
|
活动名称:签到有礼(超级无线)
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<10023/10040>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=<10023/10040>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
环境变量:jd_lzkj_daySign_url // 活动链接
|
|||
|
jd_lzkj_daySign_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_lzkj_daySign_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')
|
|||
|
const { loreal_savePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';function iIliiI1(_0x3f5a41,_0x29717e){const _0x23e4b4=liIiliiI();return iIliiI1=function(_0xdda53d,_0xf91cfc){_0xdda53d=_0xdda53d-0x9b;let _0x2668d3=_0x23e4b4[_0xdda53d];if(iIliiI1['yivhAK']===undefined){var _0x29a4eb=function(_0x80f52a){const _0x50ce82='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x597399='',_0x3b60f8='';for(let _0x424386=0x0,_0x5c10e5,_0x2429fd,_0x1cb6b2=0x0;_0x2429fd=_0x80f52a['charAt'](_0x1cb6b2++);~_0x2429fd&&(_0x5c10e5=_0x424386%0x4?_0x5c10e5*0x40+_0x2429fd:_0x2429fd,_0x424386++%0x4)?_0x597399+=String['fromCharCode'](0xff&_0x5c10e5>>(-0x2*_0x424386&0x6)):0x0){_0x2429fd=_0x50ce82['indexOf'](_0x2429fd);}for(let _0x4ad414=0x0,_0x36d24b=_0x597399['length'];_0x4ad414<_0x36d24b;_0x4ad414++){_0x3b60f8+='%'+('00'+_0x597399['charCodeAt'](_0x4ad414)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3b60f8);};const _0x2b1e4c=function(_0x245430,_0x169386){let _0x19ca61=[],_0x4cb1d1=0x0,_0x33bda1,_0x2f7d18='';_0x245430=_0x29a4eb(_0x245430);let _0x49499a;for(_0x49499a=0x0;_0x49499a<0x100;_0x49499a++){_0x19ca61[_0x49499a]=_0x49499a;}for(_0x49499a=0x0;_0x49499a<0x100;_0x49499a++){_0x4cb1d1=(_0x4cb1d1+_0x19ca61[_0x49499a]+_0x169386['charCodeAt'](_0x49499a%_0x169386['length']))%0x100,_0x33bda1=_0x19ca61[_0x49499a],_0x19ca61[_0x49499a]=_0x19ca61[_0x4cb1d1],_0x19ca61[_0x4cb1d1]=_0x33bda1;}_0x49499a=0x0,_0x4cb1d1=0x0;for(let _0xc68fd=0x0;_0xc68fd<_0x245430['length'];_0xc68fd++){_0x49499a=(_0x49499a+0x1)%0x100,_0x4cb1d1=(_0x4cb1d1+_0x19ca61[_0x49499a])%0x100,_0x33bda1=_0x19ca61[_0x49499a],_0x19ca61[_0x49499a]=_0x19ca61[_0x4cb1d1],_0x19ca61[_0x4cb1d1]=_0x33bda1,_0x2f7d18+=String['fromCharCode'](_0x245430['charCodeAt'](_0xc68fd)^_0x19ca61[(_0x19ca61[_0x49499a]+_0x19ca61[_0x4cb1d1])%0x100]);}return _0x2f7d18;};iIliiI1['qmAtHp']=_0x2b1e4c,_0x3f5a41=arguments,iIliiI1['yivhAK']=!![];}const _0x239614=_0x23e4b4[0x0],_0x5a71d9=_0xdda53d+_0x239614,_0x92b419=_0x3f5a41[_0x5a71d9];return!_0x92b419?(iIliiI1['ZnnOLd']===undefined&&(iIliiI1['ZnnOLd']=!![]),_0x2668d3=iIliiI1['qmAtHp'](_0x2668d3,_0xf91cfc),_0x3f5a41[_0x5a71d9]=_0x2668d3):_0x2668d3=_0x92b419,_0x2668d3;},iIliiI1(_0x3f5a41,_0x29717e);}const li1IIll1=iIliiI1;(function(l1iIiil1,llii1I1l,lliIliiI,IiliIi,llIiiiI1,ll1IIi1I,I1Illl1l){return l1iIiil1=l1iIiil1>>0x7,ll1IIi1I='hs',I1Illl1l='hs',function(II1Ilii1,iI1ii111,ii1Ili1I,i1illl11,I1iIIlii){const IlllIlII=iIliiI1;i1illl11='tfi',ll1IIi1I=i1illl11+ll1IIi1I,I1iIIlii='up',I1Illl1l+=I1iIIlii,ll1IIi1I=ii1Ili1I(ll1IIi1I),I1Illl1l=ii1Ili1I(I1Illl1l),ii1Ili1I=0x0;const i1l1III1=II1Ilii1();while(!![]&&--IiliIi+iI1ii111){try{i1illl11=parseInt(IlllIlII(0x40d,'XCcL'))/0x1*(-parseInt(IlllIlII(0x43d,'1vS9'))/0x2)+parseInt(IlllIlII(0x450,'2z66'))/0x3*(-parseInt(IlllIlII(0x221,'(u4D'))/0x4)+parseInt(IlllIlII(0x2d9,'nVPh'))/0x5+parseInt(IlllIlII(0x4ab,'eRHb'))/0x6+parseInt(IlllIlII(0x230,'z$WR'))/0x7+-parseInt(IlllIlII(0x142,'*Tx]'))/0x8*(parseInt(IlllIlII(0x4fd,'11FH'))/0x9)+-parseInt(IlllIlII(0x359,'dIp$'))/0xa;}catch(I1ll1l1I){i1illl11=ii1Ili1I;}finally{I1iIIlii=i1l1III1[ll1IIi1I]();if(l1iIiil1<=IiliIi)ii1Ili1I?llIiiiI1?i1illl11=I1iIIlii:llIiiiI1=I1iIIlii:ii1Ili1I=I1iIIlii;else{if(ii1Ili1I==llIiiiI1['replace'](/[PUVRAlBuInCHGtNhTFDkf=]/g,'')){if(i1illl11===iI1ii111){i1l1III1['un'+ll1IIi1I](I1iIIlii);break;}i1l1III1[I1Illl1l](I1iIIlii);}}}}}(lliIliiI,llii1I1l,function(llIiIlIl,iili1i1,iI11ili1,Ilil1iiI,IIllI,liiI1li1,IIIiIIl){return iili1i1='\x73\x70\x6c\x69\x74',llIiIlIl=arguments[0x0],llIiIlIl=llIiIlIl[iili1i1](''),iI11ili1=`\x72\x65\x76\x65\x72\x73\x65`,llIiIlIl=llIiIlIl[iI11ili1]('\x76'),Ilil1iiI=`\x6a\x6f\x69\x6e`,(0x16f59d,llIiIlIl[Ilil1iiI](''));});}(0x6400,0xd20d4,liIiliiI,0xca),liIiliiI)&&(iil=liIiliiI);const activityUrl=process[li1IIll1(0x130,'1TVo')][li1IIll1(0x23e,'9Rhq')]||'',joinMember=process[li1IIll1(0x1ef,'%E!r')][li1IIll1(0x165,'1TVo')]===li1IIll1(0x9f,'8)l5'),isNotify=process[li1IIll1(0x44c,'eRHb')][li1IIll1(0x2d1,'!Z!L')]===li1IIll1(0x411,'XCcL');let cookie='';const cookiesArr=Object[li1IIll1(0x352,'OwtX')](jdCookie)[li1IIll1(0x2c1,'Sj4Y')](iI1111i1=>
|
|||
|
|
|||
|
// 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"])
|