mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
19 lines
134 KiB
JavaScript
19 lines
134 KiB
JavaScript
|
/*
|
|||
|
活动名称:大牌联合(开卡)
|
|||
|
环境变量:
|
|||
|
jd_dplh_viewShop // 是否(true/false)做浏览任务,默认不做
|
|||
|
jd_dplh_addCart // 是否(true/false)做加购任务,默认不做
|
|||
|
jd_dplh_draw // 抽奖次数,变量暂时无效
|
|||
|
jd_dplh_blacklist // 黑名单 用&隔开 pin值
|
|||
|
jd_dplh_Notify // 是否通知(true/false),默认不通知
|
|||
|
jd_dplh_break // IP限制后继续执行(true/false)
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_dplh.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('大牌联合1120')
|
|||
|
function wdtSyjN(){}var Vd83Ihx=Object['defineProperty'],M53o9g8,Y1FGnK,jFoRBv,N2z7grH,vpLGMX,k4MXtqE,rhGlvVH,K23YYK,pcHPOVx,h5iRz6H,CdoXo1x,N0NhwxP,Lg4wMDr,UGr5Xf,XllyR7b,ITvxZA,Uh0VRY,JORsUaR,RxOgsUE;function FLdjqjz(wdtSyjN){return M53o9g8[wdtSyjN>-0x4f?wdtSyjN<-0x4f?wdtSyjN-0x61:wdtSyjN+0x4e:wdtSyjN+0x60]}M53o9g8=css_kh();function IkMbIE(wdtSyjN,Vd83Ihx){return Y1FGnK(wdtSyjN,'\x6c\x65\x6e\x67\x74\x68',{value:Vd83Ihx,configurable:FLdjqjz(0x31)})}wdtSyjN(Y1FGnK=Object.defineProperty,jFoRBv=zhpJdmD((wdtSyjN,Vd83Ihx)=>{return Vd83Ihx(wdtSyjN())},0x2)(SA_Uch,_Y4WeW));var fPZLzWB=[],GyNJKc=[rtGdBM2(FLdjqjz(-0x30)),rtGdBM2(0x1),'8)r|9hlT','>q|VRoV:',rtGdBM2(FLdjqjz(-0x24)),rtGdBM2(FLdjqjz(-0x2a)),rtGdBM2(0x4),rtGdBM2(0x5),'OI0mG|;D',rtGdBM2(0x6),']X_3eO|A8BX5"H?BSa]3;&r(vftRL,Z;5tOGS;iI=m','OI0mG|0{<7r&E<t;Nwdm',rtGdBM2(0x7),'OI0mG|0{:M+P*k3+3=!f','\x4f\x49\x30\x6d\x47\x7c\x30\x7b\x3c\x37\x68\x77\x68\x4f\x42\x3b\x7b\x43\x63','OI0mG|0{:M!:GkV','OI0mG|0{<7T{P%V','\x4f\x49\x30\x6d\x47\x7c\x30\x7b\x3a\x4d\x25\x71\x59\x4d\x6f\x5f\x69\x6f','OI0mG|0{:M|:Nh>b',rtGdBM2(0x8),rtGdBM2(0x9),rtGdBM2(FLdjqjz(0x3a)),rtGdBM2(FLdjqjz(-0xc)),rtGdBM2(FLdjqjz(-0xa)),rtGdBM2(FLdjqjz(-0x20)),rtGdBM2(0xe),rtGdBM2(FLdjqjz(-0x2c)),'Th0,|K,sxM','\u007c\u0077\u004b\u0066\u0077\u0079\u0058\u007a\u0041',rtGdBM2(FLdjqjz(-0x28)),rtGdBM2(0x11),'nISMVK~D;}{|eG',rtGdBM2(0x12),rtGdBM2(FLdjqjz(-0xf)),rtGdBM2(0x14),rtGdBM2(0x15),rtGdBM2(0x16),rtGdBM2(FLdjqjz(-0x13)),rtGdBM2(0x18),rtGdBM2(FLdjqjz(-0x16)),rtGdBM2(FLdjqjz(-0x18)),rtGdBM2(0x1b),rtGdBM2(0x1c),rtGdBM2(0x1d),rtGdBM2(0x1e),rtGdBM2(FLdjqjz(-0x1d)),rtGdBM2(FLdjqjz(0x46)),rtGdBM2(0x21),rtGdBM2(0x22),rtGdBM2(FLdjqjz(-0x7)),rtGdBM2(0x1a),'H~UY:f2xH6=#N@<!Dzf*Qf%KBurr>[6Z?z|M%5T<exkg$EsN11$V9n9_$6DC$[A~|=g*rusKgz<&2A',rtGdBM2(0x24),rtGdBM2(FLdjqjz(-0x26)),rtGdBM2(0x26),')]YNG5hA~&0v|LW{n"Ky',rtGdBM2(0x27),rtG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||
|
// 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"])
|