faker2/jd_fruit_help.js

25 lines
104 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
2024-06-30 07:49:09 +00:00
东东水果:脚本更新地址 jd_fruit_help.js
更新时间2021-5-18
2024-06-28 07:27:40 +00:00
活动入口京东APP我的-更多工具-东东农场
2024-06-30 07:49:09 +00:00
==========================Quantumultx=========================
[task_local]
#东东农场助力池互助
20 4,16 * * * jd_fruit_help.js, tag=东东农场助力池互助, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true
=========================Loon=============================
[Script]
cron "20 4,16 * * *" script-path=jd_fruit_help.js,tag=东东农场助力池互助
2024-06-28 07:27:40 +00:00
2024-06-30 07:49:09 +00:00
=========================Surge============================
东东农场助力池互助 = type=cron,cronexp="20 4,16 * * *",wake-system=1,timeout=3600,script-path=jd_fruit_help.js
2024-06-28 07:27:40 +00:00
2024-06-30 07:49:09 +00:00
=========================小火箭===========================
东东农场助力池互助 = type=cron,script-path=jd_fruit_help.js, cronexpr="20 4,16 * * *", timeout=3600, enable=true
2024-06-28 07:27:40 +00:00
*/
2024-06-30 07:49:09 +00:00
const $ = new Env('东东农场助力池水滴互助')
var _0xodK='jsjiami.com.v7';const _0x1a1d53=_0x30d1;(function(_0x468702,_0x246dc3,_0x51cef2,_0x39e62b,_0x1a2377,_0x15065e,_0x2a6228){return _0x468702=_0x468702>>0x1,_0x15065e='hs',_0x2a6228='hs',function(_0x52bd44,_0x3ae624,_0x2b9e17,_0x39c25d,_0x22b932){const _0x4491d8=_0x30d1;_0x39c25d='tfi',_0x15065e=_0x39c25d+_0x15065e,_0x22b932='up',_0x2a6228+=_0x22b932,_0x15065e=_0x2b9e17(_0x15065e),_0x2a6228=_0x2b9e17(_0x2a6228),_0x2b9e17=0x0;const _0x3c697b=_0x52bd44();while(!![]&&--_0x39e62b+_0x3ae624){try{_0x39c25d=-parseInt(_0x4491d8(0x472,'E$Aa'))/0x1+parseInt(_0x4491d8(0x37d,'Q@MK'))/0x2*(parseInt(_0x4491d8(0x3c0,'O9!B'))/0x3)+parseInt(_0x4491d8(0x3f7,'aWnA'))/0x4*(-parseInt(_0x4491d8(0x15f,'L8^O'))/0x5)+parseInt(_0x4491d8(0x4f7,'E&NC'))/0x6+-parseInt(_0x4491d8(0x374,'ibh7'))/0x7*(-parseInt(_0x4491d8(0x4ca,'XAw*'))/0x8)+-parseInt(_0x4491d8(0x2f8,'d&L#'))/0x9*(parseInt(_0x4491d8(0x425,'$&i%'))/0xa)+-parseInt(_0x4491d8(0x47c,'Ilyx'))/0xb*(-parseInt(_0x4491d8(0x1e9,'pHWT'))/0xc);}catch(_0x45e9ef){_0x39c25d=_0x2b9e17;}finally{_0x22b932=_0x3c697b[_0x15065e]();if(_0x468702<=_0x39e62b)_0x2b9e17?_0x1a2377?_0x39c25d=_0x22b932:_0x1a2377=_0x22b932:_0x2b9e17=_0x22b932;else{if(_0x2b9e17==_0x1a2377['replace'](/[wIeFOUXpdJByMGqgQlhD=]/g,'')){if(_0x39c25d===_0x3ae624){_0x3c697b['un'+_0x15065e](_0x22b932);break;}_0x3c697b[_0x2a6228](_0x22b932);}}}}}(_0x51cef2,_0x246dc3,function(_0x22de4e,_0x230401,_0x58bda7,_0x2a49b3,_0x52c661,_0x5ab9a4,_0x1397ec){return _0x230401='\x73\x70\x6c\x69\x74',_0x22de4e=arguments[0x0],_0x22de4e=_0x22de4e[_0x230401](''),_0x58bda7='\x72\x65\x76\x65\x72\x73\x65',_0x22de4e=_0x22de4e[_0x58bda7]('\x76'),_0x2a49b3='\x6a\x6f\x69\x6e',(0x174cde,_0x22de4e[_0x2a49b3](''));});}(0x190,0x9ae0c,_0xbb4f,0xca),_0xbb4f)&&(_0xodK=_0xbb4f);const common=require(_0x1a1d53(0x21b,'ZL5L')),{H5st}=require(_0x1a1d53(0x38b,'Q@MK'));let cookiesArr=[],cookie='',jdFruitShareArr=[],isBox=![],notify,allMessage='',shareCodes=[],codeType=0x1;const JD_ZLC_URL=process[_0x1a1d53(0x20b,'woPQ')][_0x1a1d53(0x2cf,'b47*')]?process[_0x1a1d53(0x2ad,'aWnA')][_0x1a1d53(0x47d,'woPQ')]:_0x1a1d53(0x51f,'d&L#');let newShareCodes=[],newHelpShareCodes=[],message='',subTitle='',option={},isFruitFinished=![];const retainWater=$['isNode']()?process[_0x1a1d53(0x388,'9SsI')][_0x1a1d53(0x286,'Jcbl')]?process['env'][_0x1a1d53(0x1f8,'aWnA')]:0x64:$[_0x1a1d53(0x2dc,'aa8w')]('retainWater')?$['getdata']('retainWater'):0x64;let jdNotify=!![],jdFruitBeanCard=![],randomCount=$[_0x1a1d53(0x302,'CNMl')]()?0x14:0x5;const JD_API_HOST=_0x1a1d53(0x2f7,'L8^O'),urlSchema=_0x1a1d53(0x1a4,'E&NC');let uuid=randomString(0x28),addressid=randomString(0xa,_0x1a1d53(0x2d0,'9SsI')),sid=randomString(0x20,'1234567890qwertyuiopasdfghjklzxcvbnm'),un_area=randomString(0x2,'1234567890')+'-'+randomString(0x4,'1234567890')+'-'+randomString(0x4,'1234567890')+'-'+randomString(0x5,_0x1a1d53(0x480,'T*iQ')),lng=_0x1a1d53(0x4c9,'b5mA')+Math[_0x1a1d53(0x216,'9#Qe')](Math[_0x1a1d53(0x1b0,'d&L#')]()*0x383+0x64),lat=_0x1a1d53(0x262,'E$Aa')+Math[_0x1a1d53(0x3d1,'Fs4D')](Math[_0x1a1d53(0x1b0,'d&L#')]()*0x383+0x64),appId='',NowHour=new Date()['getHours'](),llhelp=!![];const fs=require('fs');let boolneedUpdate=![],strShare=_0x1a1d53(0x18d,'CNMl'),Fileexists=fs['existsSync'](strShare),TempShareCache=[];Fileexists&&(console[_0x1a1d53(0x497,'f!J9')](_0x1a1d53(0x275,'Fs4D')),TempShareCache=fs[_0x1a1d53(0x3d5,'&7#e')](strShare,_0x1a1d53(0x4e8,'b5mA')),TempShareCache&&(TempShareCache=TempShareCache[_0x1a1d53(0x3e1,'E&NC')](),TempShareCache=JSON[_0x1a1d53(0x24f,'MrwD')](TempShareCache)));let lnrun=0x0,llgetshare=![],NoNeedCodes=[];!(async()=>{const _0x52885f=_0x1a1d53,_0x15539e={'BJcii':_0x52885f(0x1ba,'9SsI'),'MJIdF':function(_0xc8775e,_0x595e4a){return _0xc8775e===_0x595e4a;},'WWzmb':function(_0x286791,_0x1e71d2){return _0x286791===_0x1e71d2;},'maljC':_0x52885f(0x40a,'Zmdw'),'mjTkr':function(_0x574444,_0x268d53){return _0x574444===_0x268d53;},'KuHBf':'WlGdb','nUJPp':_0x52885f(0x3c7,'K&PX'),'qWUnX':_0x52885f(0x471,'!PV0'),'JAIVM':function(_0x5d534b,_0x93bd1){return _0x5d534b!==_0x93bd1;},'hdfKm':function(_0x206315){return _
2024-06-28 07:27:40 +00:00
// 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"])