KR/jd_fruit_help.js

37 lines
94 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
东东水果:脚本更新地址 jd_fruit_help.js
更新时间2021-5-18
活动入口京东APP我的-更多工具-东东农场
==========================Quantumultx=========================
[task_local]
2023-08-25 03:43:26 +08:00
#东东农场内部互助
2023-07-27 16:14:01 +08:00
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=东东农场内部互助
=========================Surge============================
东东农场内部互助 = type=cron,cronexp="20 4,16 * * *",wake-system=1,timeout=3600,script-path=jd_fruit_help.js
=========================小火箭===========================
东东农场内部互助 = type=cron,script-path=jd_fruit_help.js, cronexpr="20 4,16 * * *", timeout=3600, enable=true
*/
const $ = new Env('东东农场内部水滴互助');
2023-08-25 11:05:55 +08:00
let cookiesArr = [],
cookie = '',
jdFruitShareArr = [],
isBox = false,
notify,
allMessage = '';
let shareCodes = [ // 这个列表填入你要助力的好友的shareCode
// //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开
// '5853550f71014282912b76d95beb84c0@b58ddba3317b44ceb0ac86ea8952998c@8d724eb95e3847b6a1526587d1836f27@a80b7d1db41a4381b742232da9d22443@ce107b8f64d24f62a92292180f764018@c73ea563a77d4464b273503d3838fec1@0dd9a7fd1feb449fb1bf854a3ec0e801',
// //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开
// '5853550f71014282912b76d95beb84c0@b58ddba3317b44ceb0ac86ea8952998c@8d724eb95e3847b6a1526587d1836f27@a80b7d1db41a4381b742232da9d22443@ce107b8f64d24f62a92292180f764018@c73ea563a77d4464b273503d3838fec1@0dd9a7fd1feb449fb1bf854a3ec0e801',
]
let newShareCodes=[];
2023-08-26 15:18:52 +08:00
var version_='jsjiami.com.v7';const lIllI1iI=Il11liil;(function(lliI1liI,ili1liI1,I1lllI1i,iii11lll,l1II1Ii,iiI11II,liillI11){return lliI1liI=lliI1liI>>0x9,iiI11II='hs',liillI11='hs',function(lliII1Il,I1IiI1l,llIlilli,iI1I1lll,IIiilii){const Il1ll1i1=Il11liil;iI1I1lll='tfi',iiI11II=iI1I1lll+iiI11II,IIiilii='up',liillI11+=IIiilii,iiI11II=llIlilli(iiI11II),liillI11=llIlilli(liillI11),llIlilli=0x0;const II1i11l=lliII1Il();while(!![]&&--iii11lll+I1IiI1l){try{iI1I1lll=parseInt(Il1ll1i1(0x17c,'xuA#'))/0x1+parseInt(Il1ll1i1(0x17b,'q$JN'))/0x2*(parseInt(Il1ll1i1(0xe9,'y*53'))/0x3)+-parseInt(Il1ll1i1(0x2c4,'g#kg'))/0x4*(parseInt(Il1ll1i1(0x410,'TKxB'))/0x5)+parseInt(Il1ll1i1(0x1d4,'8U]S'))/0x6*(-parseInt(Il1ll1i1(0x3ac,'O%vE'))/0x7)+-parseInt(Il1ll1i1(0x228,'GIHf'))/0x8+parseInt(Il1ll1i1(0x199,'pqut'))/0x9*(-parseInt(Il1ll1i1(0x1ae,'ELFq'))/0xa)+parseInt(Il1ll1i1(0x38c,'AXBB'))/0xb;}catch(iI1ilil){iI1I1lll=llIlilli;}finally{IIiilii=II1i11l[iiI11II]();if(lliI1liI<=iii11lll)llIlilli?l1II1Ii?iI1I1lll=IIiilii:l1II1Ii=IIiilii:llIlilli=IIiilii;else{if(llIlilli==l1II1Ii['replace'](/[hYKBwHQlLtPxbDSOWdgJCT=]/g,'')){if(iI1I1lll===I1IiI1l){II1i11l['un'+iiI11II](IIiilii);break;}II1i11l[liillI11](IIiilii);}}}}}(I1lllI1i,ili1liI1,function(ll11i1,i1lIi1i1,iiiIllii,lillIi1i,liiiilI1,ii1I1iIl,lllIl1li){return i1lIi1i1='\x73\x70\x6c\x69\x74',ll11i1=arguments[0x0],ll11i1=ll11i1[i1lIi1i1](''),iiiIllii=`\x72\x65\x76\x65\x72\x73\x65`,ll11i1=ll11i1[iiiIllii]('\x76'),lillIi1i=`\x6a\x6f\x69\x6e`,(0x13b36b,ll11i1[lillIi1i](''));});}(0x17c00,0xc4af7,llIiIiIl,0xc0),llIiIiIl)&&(version_=llIiIiIl);let iliIIil1='',i1iIlili='',ii11lIi1={},il1I1i11=![];const lliIlI1I=$[lIllI1iI(0x261,'l8nb')]()?process['env']['retainWater']?process[lIllI1iI(0x451,'osKY')]['retainWater']:0x64:$[lIllI1iI(0xc9,'(hwc')](lIllI1iI(0x3d3,'eUdi'))?$[lIllI1iI(0x2b9,'ELFq')](lIllI1iI(0x149,'SzsI')):0x64;let Iiil1ii=!![],IiI1ll11=![],IIlII1Il=$[lIllI1iI(0x403,'ELFq')]()?0x14:0x5;const i1IiiIii='https://api.m.jd.com/client.action',iIIIlIiI=lIllI1iI(0x265,'o$sX'),iiIIl1I1=require(lIllI1iI(0x240,'iN4V')),III1i1ll=require(lIllI1iI(0x3e6,'q$JN')),I1l1ilii=require('./function/h5st41.js');let lililII=i111l11(0x28),i1il1lI=i111l11(0xa,lIllI1iI(0xbb,'#BRU')),I11Ii1ll=i111l11(0x20,'1234567890qwertyuiopasdfghjklzxcvbnm'),Il1ll11i=i111l11(0x2,lIllI1iI(0xbe,'5dMw'))+'-'+i111l11(0x4,lIllI1iI(0x407,'2SVf'))+'-'+i111l11(0x4,'1234567890')+'-'+i111l11(0x5,lIllI1iI(0x3fc,'g#kg')),ll1Ii1Ii=lIllI1iI(0x3db,'pqut')+Math['floor'](Math[lIllI1iI(0x1b4,'tlwa')]()*0x383+0x64),l1lIiiIl=lIllI1iI(0x1d8,'etm(')+Math[lIllI1iI(0x483,'5)XE')](Math[lIllI1iI(0x3cc,']Qtj')]()*0x383+0x64),iI1I1i='',lIil11l=new Date()['getHours'](),lllil1iI=!![];const II1iIl11=require('fs');function llIiIiIl(){const Il11lIi1=(function(){return[...[version_,'lCjbhsjxHidYTatmgiw.QBcSoLmB.WlvD7YKgOPJ==','xUISJUMgI+AvMUEyIow8SEIpLUwoG8owtmkjWOtdSZm','5PYn56wJ5QwEoUI3J+I8RUwkNUwkQeO','WQnlWPuQW7i','n8kyWRLBxG','W5NdGmoApMZdKYqjc8oA','kcddPqaRW4fqF18Co8oHW5BdOJFdHmoNyCoKW4W','WQ1cW5be','nmk2WQ3dJ8o/','WO0kzrdcJuhcJq','W7ZcPmocpCoefW','W5mXF8kGW44','zs50hMFdHNXkdI5siSobwmo5mcBdN2Hj','hLBdS8koWPK','5lMC5lUw6ls25yY/','EoA3GUwlRUwNGoEaMoEjOG','5AsG5AwO5OQ95As8l+wiNEwkNG','vJVdK8ok','W4v6DG','B8oFW4VdM8kj','oSk2WQ3dUSoy','t2dcHCkOWQa','WQbMWRybW6BdUs9aWRVdNu9lWRTBW4VcH8olaXRcMSk4W6y','W7/cU0/cTNycb0OUxG','W5u3FCkdW6Om','W4JdVLm','BYbSgwC','iWrHW6PTWOr1W41RW4yKWOivWORdSmkVWQJdKv4SW5xdOInIetS','WOeYfLNdJmkeFSkaWOPbW6RdUZa','WRNdSfytW4q','WRpdGrpcUHC','f8k8eSkbcW','DstcM3Otf8krkWG','W7Wetmku','AcbWCdlcGHFcOxxcQbhdR8oHW5zMhrpcKmkbzZJdNqmACtu','xSoxmLS','5OkH5BYs5yMn5yUd5yQz5Q6v5Pw15BE16ig45BgG77YQ6lA05ywj5yQ55yIh','W5anW6FdMmkQ','DHD5W5TZW4ddIa','wmoEzmkRea','W4hdJ8oYovy','EJ00oI8','pSkDamkybG0vg8oAv8kpWONdOW','FZZdP2tdSYBdNvmtWRpcR8kXWQFdRSo+WOG','ChpcJSowWRG','W4zUl0JdVCkmDa','W4aZz8kdW6qvfW','W4PVWQ3dS24','5Aw65AwS5OMn5As25Rw36kwd5lMN5yI26Acc5yYV5RgF5RUX','urvhW5X/','icdcHarzW7/dVq','WOyaDG','W5JcLaRcPCk2','WP4NW68','cCkXWOJdKSoQ','zmkjee0','bWbHW6PxWPXTW4e','WRWaW44zBa','qg/cHmo2WQW','vmogmMrzWQPyvYvUbCkzW7u','WR/dQv88W53dGCoQiW','WPhcQ1RcSai','F8o6W6jAh
2023-07-27 16:14:01 +08:00
// prettier-ignore
2023-08-25 03:43:26 +08: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"])