jdpro/jd_dpqd_sign.js

11 lines
86 KiB
JavaScript
Raw Permalink Normal View History

2024-06-28 07:47:44 +00:00
/*
活动名称批量店铺签到
活动链接https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=<token>
环境变量jd_dpqd_tokens // 活动令牌,多个用英文逗号分割
58 59 23 * * * jd_dpqd_sign.js
*/
const $ = new Env('批量店铺签到')
2024-10-25 15:00:20 +00:00
function ol1mTGU(){}var DojL9T4=Object['defineProperty'],QZ8Mc2z,YChsOc,nWcsoil,C8HqWy,YaJXKw,onm3B0f,g93eXBD,ug41mJs,QsspQcw,O_Hhkf,Mufr1d,l9Gr8rS,LQ4EEBr,vvH5ag,GU8aoM,h4Fir2,A0wujY,TT1yBsq,jeKs_TL,Nu6ydTj;function Bl5pGW(ol1mTGU){return QZ8Mc2z[ol1mTGU<-0x15?ol1mTGU+0x36:ol1mTGU+0x14]}QZ8Mc2z=HRzdof();function uPHVmC2(ol1mTGU,DojL9T4){return YChsOc(ol1mTGU,'length',{value:DojL9T4,configurable:!0x0})}ol1mTGU(YChsOc=Object.defineProperty,nWcsoil=CDCW6Cv((ol1mTGU,DojL9T4)=>{return DojL9T4(ol1mTGU())},0x2)(rwRd8yP,Qg570g));var HvhUAV=[],bOuM6f=[iCeFMXQ(0x0),iCeFMXQ(Bl5pGW(0x11)),iCeFMXQ(Bl5pGW(0x6)),iCeFMXQ(Bl5pGW(0xa)),'%*kQ|>o0','|FHqZZH$J,',iCeFMXQ(Bl5pGW(0x3)),iCeFMXQ(0x5),'k|s",$l6X`bFfiOSZxq`FA`m!`bFR+,u[cCLTJe$JVK>o}QS!#MzW$<_>vyZaif',iCeFMXQ(Bl5pGW(0xd)),iCeFMXQ(0x7),iCeFMXQ(Bl5pGW(0x1b)),iCeFMXQ(Bl5pGW(0x18)),iCeFMXQ(0xa),iCeFMXQ(Bl5pGW(0x2e)),iCeFMXQ(0xc),iCeFMXQ(0xd),iCeFMXQ(0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$I,(}m^7>=r5L9i~fX,$7Li:~Krq`}zS0v;,?`b',iCeFMXQ(0x48),iCeFMXQ(0x7d
2024-06-28 07:47:44 +00:00
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"])