mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
19 lines
47 KiB
JavaScript
19 lines
47 KiB
JavaScript
|
/*
|
|||
|
活动名称:京东汽车抽奖
|
|||
|
环境变量:jd_car_threads // 控制并发线程数(正整数),默认1,最大5,尽量使用默认值,否则请开启代理运行
|
|||
|
jd_car_interval // 自定义运行间隔时长(整数,单位毫秒),默认1000
|
|||
|
jd_car_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_car_pinFilter // 账号pin过滤,多个用@进行分割
|
|||
|
|
|||
|
高并发脚本,谨慎使用并发
|
|||
|
活动限制IP严重,建议使用代理
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('京东汽车抽奖')
|
|||
|
var iil='jsjiami.com.v7';const I1iI1l=iii1II;(function(IlI1ll,ll11l,III111,liIll1,l1llli,iI1lII,ll11iI){return IlI1ll=IlI1ll>>0x1,iI1lII='hs',ll11iI='hs',function(l1i1I,l1llll,I1I1ll,lil1i,liiiil){const l1i1l=iii1II;lil1i='tfi',iI1lII=lil1i+iI1lII,liiiil='up',ll11iI+=liiiil,iI1lII=I1I1ll(iI1lII),ll11iI=I1I1ll(ll11iI),I1I1ll=0x0;const IIIIli=l1i1I();while(!![]&&--liIll1+l1llll){try{lil1i=parseInt(l1i1l(0xa8,'N3j7'))/0x1+parseInt(l1i1l(0x237,'s!Df'))/0x2*(parseInt(l1i1l(0x211,'*3l2'))/0x3)+-parseInt(l1i1l(0x9e,'j4v4'))/0x4*(parseInt(l1i1l(0x88,'iz5N'))/0x5)+parseInt(l1i1l(0x198,'BnvZ'))/0x6*(parseInt(l1i1l(0x6d,'MFYr'))/0x7)+-parseInt(l1i1l(0x204,'bGu3'))/0x8*(parseInt(l1i1l(0x85,'293o'))/0x9)+parseInt(l1i1l(0x9a,'N3j7'))/0xa+parseInt(l1i1l(0x114,'6$]@'))/0xb*(parseInt(l1i1l(0x1e1,'p@EZ'))/0xc);}catch(lllIi){lil1i=I1I1ll;}finally{liiiil=IIIIli[iI1lII]();if(IlI1ll<=liIll1)I1I1ll?l1llli?lil1i=liiiil:l1llli=liiiil:I1I1ll=liiiil;else{if(I1I1ll==l1llli['replace'](/[TewbgIOYHRfxnqPCMh=]/g,'')){if(lil1i===l1llll){IIIIli['un'+iI1lII](liiiil);break;}IIIIli[ll11iI](liiiil);}}}}}(III111,ll11l,function(lil1l,lllIl,Iliii,illlii,I1lIIi,l1i1i,I1iI1i){return lllIl='\x73\x70\x6c\x69\x74',lil1l=arguments[0x0],lil1l=lil1l[lllIl](''),Iliii=`\x72\x65\x76\x65\x72\x73\x65`,lil1l=lil1l[Iliii]('\x76'),illlii=`\x6a\x6f\x69\x6e`,(0x16f644,lil1l[illlii](''));});}(0x180,0xeb5ea,Iii11l,0xc2),Iii11l)&&(iil=0x16f6);function iii1II(_0x23c0f8,_0x1ff5eb){const _0x4af0a2=Iii11l();return iii1II=function(_0x5e2953,_0x1ff06c){_0x5e2953=_0x5e2953-0x68;let _0x38735f=_0x4af0a2[_0x5e2953];if(iii1II['qWnTBv']===undefined){var _0x1d571b=function(_0x1f2ecf){const _0x3d3b6e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4d37b1='',_0x4dc722='';for(let _0x30b3fe=0x0,_0x5696c3,_0x536983,_0x47c33c=0x0;_0x536983=_0x1f2ecf['charAt'](_0x47c33c++);~_0x536983&&(_0x5696c3=_0x30b3fe%0x4?_0x5696c3*0x40+_0x536983:_0x536983,_0x30b3fe++%0x4)?_0x4d37b1+=String['fromCharCode'](0xff&_0x5696c3>>(-0x2*_0x30b3fe&0x6)):0x0){_0x536983=_0x3d3b6e['indexOf'](_0x536983);}for(let _0x168fa9=0x0,_0x1ca0e0=_0x4d37b1['length'];_0x168fa9<_0x1ca0e0;_0x168fa9++){_0x4dc722+='%'+('00'+_0x4d37b1['charCodeAt'](_0x168fa9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4dc722);};const _0x107667=function(_0x45e01c,_0xc8e0c4){let _0x2bc9a7=[],_0xa549e5=0x0,_0x4c9788,_0x186708='';_0x45e01c=_0x1d571b(_0x45e01c);let _0x3713ad;for(_0x3713ad=0x0;_0x3713ad<0x100;_0x3713ad++){_0x2bc9a7[_0x3713ad]=_0x3713ad;}for(_0x3713ad=0x0;_0x3713ad<0x100;_0x3713ad++){_0xa549e5=(_0xa549e5+_0x2bc9a7[_0x3713ad]+_0xc8e0c4['charCodeAt'](_0x3713ad%_0xc8e0c4['length']))%0x100,_0x4c9788=_0x2bc9a7[_0x3713ad],_0x2bc9a7[_0x3713ad]=_0x2bc9a7[_0xa549e5],_0x2bc9a7[_0xa549e5]=_0x4c9788;}_0x3713ad=0x0,_0xa549e5=0x0;for(let _0x2e3f3c=0x0;_0x2e3f3c<_0x45e01c['length'];_0x2e3f3c++){_0x3713ad=(_0x3713ad+0x1)%0x100,_0xa549e5=(_0xa549e5+_0x2bc9a7[_0x3713ad])%0x100,_0x4c9788=_0x2bc9a7[_0x3713ad],_0x2bc9a7[_0x3713ad]=_0x2bc9a7[_0xa549e5],_0x2bc9a7[_0xa549e5]=_0x4c9788,_0x186708+=String['fromCharCode'](_0x45e01c['charCodeAt'](_0x2e3f3c)^_0x2bc9a7[(_0x2bc9a7[_0x3713ad]+_0x2bc9a7[_0xa549e5])%0x100]);}return _0x186708;};iii1II['VsINbp']=_0x107667,_0x23c0f8=arguments,iii1II['qWnTBv']=!![];}const _0x5c44d4=_0x4af0a2[0x0],_0x446ffa=_0x5e2953+_0x5c44d4,_0x144ce9=_0x23c0f8[_0x446ffa];return!_0x144ce9?(iii1II['gnYFGV']===undefined&&(iii1II['gnYFGV']=!![]),_0x38735f=iii1II['VsINbp'](_0x38735f,_0x1ff06c),_0x23c0f8[_0x446ffa]=_0x38735f):_0x38735f=_0x144ce9,_0x38735f;},iii1II(_0x23c0f8,_0x1ff5eb);}const jdCookie=require('./jdCookie'),notify=require(I1iI1l(0x1fe,'lip5')),common=require('./utils/Rebels_jdCommon'),{H5st}=require(I1iI1l(0x240,'H#Vn'));console[I1iI1l(0x22b,'4Xl(')](''),console[I1iI1l(0x186,'N3*h')](I1iI1l(0x1e8,'6$]@')+$[I1iI1l(0xb0,'kOl0')]+'变量说明=========='),console[I1iI1l(0x1ea,'s)q%')](I1iI1l(0x20e,'6$]@')),console[I1iI1l(0x241,'lip5')](I1iI1l(0x1de,'4Xl(')),console[I1iI1l(0x80,'6$]@')](I1iI1l(0x238,'28I!')),console[I1iI1l(0x17b,'kXxq')](I1iI1l(0x22e,'2xBg')),console[I1iI1l(0x193,'s!Df')](I1iI1l(0
|
|||
|
// 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"])
|