diff --git a/.github/workflows/flw.yml b/.github/workflows/flw.yml index 12a5f69c..fdfa1fed 100644 --- a/.github/workflows/flw.yml +++ b/.github/workflows/flw.yml @@ -6,7 +6,7 @@ name: 返利网 on: workflow_dispatch: schedule: - - cron: '0 12,23 * * *' + - cron: '0 2,15 * * *' watch: types: started jobs: diff --git a/.github/workflows/iboxpay.yml b/.github/workflows/iboxpay.yml index 3f175080..a68f2559 100644 --- a/.github/workflows/iboxpay.yml +++ b/.github/workflows/iboxpay.yml @@ -6,7 +6,7 @@ name: 笑谱 on: workflow_dispatch: schedule: - - cron: '*/15 8-23 * * *' + - cron: '*/15 0-15 * * *' watch: types: started jobs: @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest if: github.event.repository.owner.id == github.event.sender.id env: - XP_iboxpayHEADER: ${{ secrets.XP_iboxpayHEADER }} + XP_refreshTOKEN: ${{ secrets.XP_refreshTOKEN }} XP_CASH: ${{ secrets.XP_CASH }} XP_live: ${{ secrets.XP_live }} @@ -27,12 +27,12 @@ jobs: with: node-version: 12.x - name: npm install - if: env.XP_iboxpayHEADER + if: env.XP_refreshTOKEN run: | cd ~/JavaScript npm install - name: '运行 【笑谱】' - if: env.XP_iboxpayHEADER + if: env.XP_refreshTOKEN run: | cd ~/JavaScript node Task/iboxpay.js diff --git a/.github/workflows/xiaole.yml b/.github/workflows/xiaole.yml index a80af259..7dab651a 100644 --- a/.github/workflows/xiaole.yml +++ b/.github/workflows/xiaole.yml @@ -6,7 +6,7 @@ name: 小乐 on: workflow_dispatch: schedule: - - cron: '17 8-23 * * *' + - cron: '19 0-15 * * *' watch: types: started jobs: diff --git a/Task/adminCOOKIE.js b/Task/adminCOOKIE.js new file mode 100644 index 00000000..d62e4997 --- /dev/null +++ b/Task/adminCOOKIE.js @@ -0,0 +1,322 @@ +/* ziye CK导入导出专用 务必下载或者复制到本地使用 + +github地址 https://github.com/ziye12 +TG频道地址 https://t.me/ziyescript +TG交流群 https://t.me/joinchat/AAAAAE7XHm-q1-7Np-tF3g +boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye.boxjs.json + + +转载请备注个名字,谢谢 + + + +*/ + +const $ = Env("CK导入导出"); + +//填写账号数, +const Count=5 + +//设置1,导入CK +const DR=0 + +//设置1,导出CK +const DC=0 + +//0可批量导入ck, 1清空ck 2单独导入ck +const QK=0 + + + + + +//👇👇👇👇👇👇👇👇👇👇👇👇 CK单独导入 👇👇👇👇👇👇👇👇👇👇👇👇👇👇 + +//填写你要单独导入的ck名字,去boxjs里看或者ck获取处 如$.setdata(refreshtokenVal, "refreshtoken" + $.idx); 想要导入账号2的ck 则在''中填写refreshtoken2 +const JSCKNAME='refreshtoken2' + +//填写 想要单独导入的ck数据,如token=abc 则在``中填写token=abc +const JSCK=`token=abc` + + + + + +//👇👇👇👇👇👇👇👇👇👇👇👇 CK批量导入 👇👇👇👇👇👇👇👇👇👇👇👇👇👇 + + +//填写你要导入的ck名字,去boxjs里看或者ck获取处 如$.setdata(refreshtokenVal, "refreshtoken" + $.idx); 则在''中填写refreshtoken + +const JSA='refreshtoken' +const JSB='' +const JSC='' +const JSD='' +const JSE='' +const JSF='' +const JSG='' +const JSH='' +const JSI='' +const JSJ='' +const JSK='' +const JSL='' + +//填写 想要导入的ck数据,多账号换行 如token=abc 则在``中填写token=abc +const JSAVal=`` +const JSBVal=`` +const JSCVal=`` +const JSDVal=`` +const JSEVal=`` +const JSFVal=`` +const JSGVal=`` +const JSHVal=`` +const JSIVal=`` +const JSJVal=`` +const JSKVal=`` +const JSLVal=`` +//👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆 + + + + + + + + + +//👇👇👇👇👇👇👇👇👇👇👇👇 CK导出 👇👇👇👇👇👇👇👇👇👇👇👇👇👇 + +let K = 1;//从哪个账号开始 +let Z = 5;//到哪个账号结束 + +const GG=''//默认为换行,也可以将需要隔开的符号填写在''内 + +//填写你要打印的ck名字,去js里获取ck处看 如$.setdata(refreshtokenVal, "refreshtoken" + $.idx); 则在''中填写refreshtoken + +const jsA='refreshtoken' +const jsB='' +const jsC='' +const jsD='' +const jsE='' +const jsF='' +const jsG='' +const jsH='' +const jsI='' +const jsJ='' +const jsK='' +const jsL='' + +//开启打印则设置为1 +const jsAA=1 +const jsBB=0 +const jsCC=0 +const jsDD=0 +const jsEE=0 +const jsFF=0 +const jsGG=0 +const jsHH=0 +const jsII=0 +const jsJJ=0 +const jsKK=0 +const jsLL=0 + +//👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆 + + + +//⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️下面内容不要随意改动 + if (DR==1) { +if (QK==1) +{ +const JSAVal=`` +const JSBVal=`` +const JSCVal=`` +const JSDVal=`` +const JSEVal=`` +const JSFVal=`` +const JSGVal=`` +const JSHVal=`` +const JSIVal=`` +const JSJVal=`` +const JSKVal=`` +const JSLVal=`` +} + if (QK==2) { + $.setdata(JSCK, `${JSCKNAME}`); + console.log($.name+',ck单独导入成功','✅已导入'+JSCKNAME,) + $.msg($.name+',ck单独导入成功','✅已导入'+JSCKNAME,) + } + if ((QK==0&&JSAVal!='')||QK==1) { + $.setdata(JSAVal.split('\n')[0], `${JSA}`); + $.setdata(JSBVal.split('\n')[0], `${JSB}`); + $.setdata(JSCVal.split('\n')[0], `${JSC}`); + $.setdata(JSDVal.split('\n')[0], `${JSD}`); + $.setdata(JSEVal.split('\n')[0], `${JSE}`); + $.setdata(JSFVal.split('\n')[0], `${JSF}`); + $.setdata(JSGVal.split('\n')[0], `${JSG}`); + $.setdata(JSHVal.split('\n')[0], `${JSH}`); + $.setdata(JSIVal.split('\n')[0], `${JSI}`); + $.setdata(JSJVal.split('\n')[0], `${JSJ}`); + $.setdata(JSKVal.split('\n')[0], `${JSK}`); + $.setdata(JSLVal.split('\n')[0], `${JSL}`); + for (let i =2; i <= Count; i++) { + $.setdata(JSAVal.split('\n')[i-1], `${JSA+i}`); + $.setdata(JSBVal.split('\n')[i-1], `${JSB+i}`); + $.setdata(JSCVal.split('\n')[i-1], `${JSC+i}`); + $.setdata(JSDVal.split('\n')[i-1], `${JSD+i}`); + $.setdata(JSEVal.split('\n')[i-1], `${JSE+i}`); + $.setdata(JSFVal.split('\n')[i-1], `${JSF+i}`); + $.setdata(JSGVal.split('\n')[i-1], `${JSG+i}`); + $.setdata(JSHVal.split('\n')[i-1], `${JSH+i}`); + $.setdata(JSIVal.split('\n')[i-1], `${JSI+i}`); + $.setdata(JSJVal.split('\n')[i-1], `${JSJ+i}`); + $.setdata(JSKVal.split('\n')[i-1], `${JSK+i}`); + $.setdata(JSLVal.split('\n')[i-1], `${JSL+i}`); + } + + if (QK==0&&JSAVal!='') { + console.log($.name+',ck批量导入成功✅') + $.msg($.name+',ck批量导入成功✅') + + } + + if (QK==1) { + console.log($.name+',ck清除成功✅') + $.msg($.name+',ck清除成功✅') + + } + } + +$.done() + } + if (DC==1) { +let R=K +const jsAArr = []; +let jsAVal = ``; +const jsBArr = []; +let jsBVal = ``; +const jsCArr = []; +let jsCVal = ``; +const jsDArr = []; +let jsDVal = ``; +const jsEArr = []; +let jsEVal = ``; +const jsFArr = []; +let jsFVal = ``; +const jsGArr = []; +let jsGVal = ``; +const jsHArr = []; +let jsHVal = ``; +const jsIArr = []; +let jsIVal = ``; +const jsJArr = []; +let jsJVal = ``; +const jsKArr = []; +let jsKVal = ``; +const jsLArr = []; +let jsLVal = ``; + jsAArr.push($.getdata(`${jsA}`)); + jsBArr.push($.getdata(`${jsB}`)); + jsCArr.push($.getdata(`${jsC}`)); + jsDArr.push($.getdata(`${jsD}`)); + jsEArr.push($.getdata(`${jsE}`)); + jsFArr.push($.getdata(`${jsF}`)); + jsGArr.push($.getdata(`${jsG}`)); + jsHArr.push($.getdata(`${jsH}`)); + jsIArr.push($.getdata(`${jsI}`)); + jsJArr.push($.getdata(`${jsJ}`)); + jsKArr.push($.getdata(`${jsK}`)); + jsLArr.push($.getdata(`${jsL}`)); + // 根据boxjs中设置的额外账号数,添加存在的账号数据进行任务处理 + for (let i = 2; i <= Count; i++) { + if ($.getdata(`${jsA+i}`)) { + jsAArr.push($.getdata(`${jsA+i}`)); + jsBArr.push($.getdata(`${jsB+i}`)); + jsCArr.push($.getdata(`${jsC+i}`)); + jsDArr.push($.getdata(`${jsD+i}`)); + jsEArr.push($.getdata(`${jsE+i}`)); + jsFArr.push($.getdata(`${jsF+i}`)); + jsGArr.push($.getdata(`${jsG+i}`)); + jsHArr.push($.getdata(`${jsH+i}`)); + jsIArr.push($.getdata(`${jsI+i}`)); + jsJArr.push($.getdata(`${jsJ+i}`)); + jsKArr.push($.getdata(`${jsK+i}`)); + jsLArr.push($.getdata(`${jsL+i}`)); + } + } + console.log( + `============ 脚本执行-北京时间(UTC+8):${new Date( + new Date().getTime() + 8 * 60 * 60 * 1000 + ).toLocaleString()} =============\n` + ); +if (ZR) + $.msg($.name+R+'到'+(K-1)+'打印成功'+K+'到'+Z+'打印失败', '⚠️提示:请先获取'+K+'到'+Z+'的ck','并设置好账号数') +if (K==R&&Z>R) + $.msg($.name+K+'到'+Z+'打印失败', '⚠️提示:请先获取'+K+'到'+Z+'的ck','并设置好账号数') +if (Z==R) + $.msg($.name+K+'打印失败', '⚠️提示:请先获取'+K+'的ck','并设置好账号数') + $.done(); + } + jsAVal = jsAArr[K-1]; + jsBVal = jsBArr[K-1]; + jsCVal = jsCArr[K-1]; + jsDVal = jsDArr[K-1]; + jsEVal = jsEArr[K-1]; + jsFVal = jsFArr[K-1]; + jsGVal = jsGArr[K-1]; + jsHVal = jsHArr[K-1]; + jsIVal = jsIArr[K-1]; + jsJVal = jsJArr[K-1]; + jsKVal = jsKArr[K-1]; + jsLVal = jsLArr[K-1]; +if(jsAA==1)console.log(jsAVal+GG) +if(jsBB==1)console.log(jsBVal+GG) +if(jsCC==1)console.log(jsCVal+GG) +if(jsDD==1)console.log(jsDVal+GG) +if(jsEE==1)console.log(jsEVal+GG) +if(jsFF==1)console.log(jsFVal+GG) +if(jsGG==1)console.log(jsGVal+GG) +if(jsHH==1)console.log(jsHVal+GG) +if(jsII==1)console.log(jsIVal+GG) +if(jsJJ==1)console.log(jsJVal+GG) +if(jsKK==1)console.log(jsKVal+GG) +if(jsLL==1)console.log(jsLVal+GG) + for (let i = 0; i < 1; i++) { + (function (i) { + setTimeout( + function () { + if (i == 0){ + if ( K < Z ) { + K += 1; + all(); +} else if (K == Z ) { + let F=Z-R+1 + $.msg($.name+R+'到'+Z+',ck打印成功','✅已打印'+F+'个ck',) + $.done(); + } + } +}, + (i + 1) * 10 + ); + })(i); + } +} +} + + +if(DC==0&&DR==0){ + +console.log('😂你玩了个寂寞') + $.msg('😂你玩了个寂寞') +$.done(); + +} + +// prettier-ignore +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/Task/duokandian.js b/Task/duokandian.js index c99b828a..1368a81d 100644 --- a/Task/duokandian.js +++ b/Task/duokandian.js @@ -3,15 +3,18 @@ github地址 https://github.com/ziye12 TG频道地址 https://t.me/ziyescript TG交流群 https://t.me/joinchat/AAAAAE7XHm-q1-7Np-tF3g boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye.boxjs.json -转载请备注个名字,谢谢 +转载请备注个名字,谢谢 ⚠️多看点APP - 请点击前往下载 http://dkd-api.dysdk.com/share.html?uid=13209201 或者自行下载 邀请码13209201 谢谢支持 2.9 制作 - +2.10 增加看视频,基本完善 +2.11 完善判定 +2.11-2 修复视频和广告以及提现判定问题 +2.12 增加碎片显示以及兑换 +2.14 修复宝箱问题 ⚠️一共1个位置 1个ck 👉 2条 Secrets 多账号换行 @@ -21,35 +24,30 @@ boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye. 第二步 添加body重写 登录多看点APP 点击 我的 获取ck - +刷视频获取body,一个body一天可以只领取两次奖励 duokandianbodyVal 👉DKD_duokandianBODY - +duokandianvideobodyVal 👉DKD_duokandianvideoBODY 提现标准 可设置 0 1 3 5 15 50 duokandianCASH 👉DKD_duokandianCASH ⚠️主机名以及重写👇 - - hostname=dkd-api.dysdk.com, - ############## 圈x - #多看点APP获取body -http:\/\/dkd-api\.dysdk\.com\/user\/index url script-request-body https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js +http:\/\/dkd-api\.dysdk\.com\/* url script-request-body https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js ############## loon - -http-request http:\/\/dkd-api\.dysdk\.com\/user\/index script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js,requires-body=1,max-size=0, tag=多看点APP获取body +http-request http:\/\/dkd-api\.dysdk\.com\/* script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js,requires-body=1,max-size=0, tag=多看点APP获取body ############## surge +多看点APP获取body = type=http-request,pattern=http:\/\/dkd-api\.dysdk\.com\/*,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js +*/ -多看点APP获取body = type=http-request,pattern=http:\/\/dkd-api\.dysdk\.com\/user\/index,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js -*/ const $ = Env("多看点APP"); $.idx = ($.idx = ($.getval('duokandianSuffix') || '1') - 1) > 0 ? ($.idx + 1 + '') : ''; // 账号扩展字符 const notify = $.isNode() ? require("./sendNotify") : ``; @@ -59,10 +57,12 @@ const notifyttt = 1 // 0为关闭外部推送,1为12 23 点外部推送 const notifyInterval = 2; // 0为关闭通知,1为所有通知,2为12 23 点通知 , 3为 6 12 18 23 点通知 $.message = '', gg = '', sp = '', yi = '', er = '', txtx = '', COOKIES_SPLIT = '', CASH = '', ddtime = ''; - const duokandianbodyArr = []; let duokandianbodyVal = ``; let middleduokandianBODY = []; +const duokandianvideobodyArr = []; +let duokandianvideobodyVal = ``; +let middleduokandianvideoBODY = []; duokandianheaderVal = { 'Accept': `*/*`, @@ -73,17 +73,10 @@ duokandianheaderVal = { 'User-Agent': `duokandian/3.0.2 (com.duoyou.duokandian1; build:0; iOS 14.2.0) Alamofire/5.4.0`, 'Accept-Language': `zh-Hans-CN;q=1.0` }; - - - - if ($.isNode()) { // 没有设置 DKD_duokandianCASH 则默认为 0 不提现 - CASH = process.env.XP_CASH || 0; - - + CASH = process.env.DKD_duokandianCASH || 0; } - if ($.isNode() && process.env.DKD_duokandianHEADER) { COOKIES_SPLIT = process.env.COOKIES_SPLIT || "\n"; console.log( @@ -91,7 +84,6 @@ if ($.isNode() && process.env.DKD_duokandianHEADER) { COOKIES_SPLIT )} =============\n` ); - if ( process.env.DKD_duokandianBODY && process.env.DKD_duokandianBODY.indexOf(COOKIES_SPLIT) > -1 @@ -100,36 +92,37 @@ if ($.isNode() && process.env.DKD_duokandianHEADER) { } else { middleduokandianBODY = process.env.DKD_duokandianBODY.split(); } - - - - - + if ( + process.env.DKD_duokandianvideoBODY && + process.env.DKD_duokandianvideoBODY.indexOf(COOKIES_SPLIT) > -1 + ) { + middleduokandianvideoBODY = process.env.DKD_duokandianvideoBODY.split(COOKIES_SPLIT); + } else { + middleduokandianvideoBODY = process.env.DKD_duokandianvideoBODY.split(); + } } if (COOKIE.duokandianbodyVal) { DKD_COOKIES = { - "duokandianbodyVal": COOKIE.duokandianbodyVal.split('\n'), - - - + "duokandianvideobodyVal": COOKIE.duokandianvideobodyVal.split('\n'), } Length = DKD_COOKIES.duokandianbodyVal.length; } if (!COOKIE.duokandianbodyVal) { if ($.isNode()) { - Object.keys(middleduokandianBODY).forEach((item) => { if (middleduokandianBODY[item]) { duokandianbodyArr.push(middleduokandianBODY[item]); } }); - - + Object.keys(middleduokandianvideoBODY).forEach((item) => { + if (middleduokandianvideoBODY[item]) { + duokandianvideobodyArr.push(middleduokandianvideoBODY[item]); + } + }); } else { - duokandianbodyArr.push($.getdata("duokandianbody")); - + duokandianvideobodyArr.push($.getdata("duokandianvideobody")); // 根据boxjs中设置的额外账号数,添加存在的账号数据进行任务处理 if ("duokandianCASH") { CASH = $.getval("duokandianCASH") || '0'; @@ -137,9 +130,8 @@ if (!COOKIE.duokandianbodyVal) { let duokandianCount = ($.getval('duokandianCount') || '1') - 0; for (let i = 2; i <= duokandianCount; i++) { if ($.getdata(`duokandianbody${i}`)) { - duokandianbodyArr.push($.getdata(`duokandianbody${i}`)); - + duokandianvideobodyArr.push($.getdata(`duokandianvideobody${i}`)); } } } @@ -148,22 +140,36 @@ if (!COOKIE.duokandianbodyVal) { } else Length = duokandianbodyArr.length } - - - function GetCookie() { if ($request && $request.url.indexOf("user") >= 0 && $request.url.indexOf("index") >= 0) { - - const duokandianbodyVal = $request.body; if (duokandianbodyVal) $.setdata(duokandianbodyVal, "duokandianbody" + $.idx); $.log( `[${$.name + $.idx}] 获取duokandianbodyVal✅: 成功,duokandianbodyVal: ${duokandianbodyVal}` ); $.msg($.name + $.idx, `获取duokandianbodyVal: 成功🎉`, ``); - } - + if ($request && $request.url.indexOf("android_video") >= 0 && $request.url.indexOf("getaward") >= 0) { + const duokandianvideobodyVal = $request.body + if (duokandianvideobodyVal) { + let bodys = $.getdata('duokandianvideobody' + $.idx); + if (bodys) { + if (bodys.indexOf(duokandianvideobodyVal) >= 0) { + $.msg('body重复跳过'); + $.done(); + } + duokandianBody = bodys.split('&'); + bodys = duokandianvideobodyVal + '&' + bodys; + } else { + bodys = duokandianvideobodyVal; + } + $.setdata(bodys, "duokandianvideobody" + $.idx); + $.log( + `[${$.name + $.idx}] 获取duokandianvideobody${duokandianBody.length+1}✅: 成功,duokandianvideobody${duokandianBody.length+1}: ${duokandianvideobodyVal}` + ); + $.msg($.name + $.idx, `获取duokandianvideobody${duokandianBody.length+1}✅: 成功🎉`) + } + } } console.log( `================== 脚本执行 - 北京时间(UTC+8):${new Date( @@ -176,7 +182,6 @@ console.log( `============ 共 ${Length} 个${$.name}账号=============\n` ); console.log(`============ 提现标准为:${CASH} =============\n`); - //时间 nowTimes = new Date( new Date().getTime() + @@ -218,7 +223,9 @@ function daytime(inputTime) { }; //时间戳格式化日期 function time(inputTime) { - var date = new Date(inputTime); + if ($.isNode()) { + var date = new Date(inputTime + 8 * 60 * 60 * 1000); + } else var date = new Date(inputTime); Y = date.getFullYear() + '-'; M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; D = date.getDate() + ' '; @@ -256,77 +263,98 @@ async function all() { $.done(); } for (let i = 0; i < Length; i++) { - if (COOKIE.duokandianbodyVal) { - duokandianbodyVal = DKD_COOKIES.duokandianbodyVal[i]; - + duokandianvideobodyVal = DKD_COOKIES.duokandianvideobodyVal[i]; } if (!COOKIE.duokandianbodyVal) { - duokandianbodyVal = duokandianbodyArr[i]; - - + duokandianvideobodyVal = duokandianvideobodyArr[i]; } + O = (`${$.name + (i + 1)}🔔`); await console.log(`-------------------------\n\n🔔开始运行${$.name+(i+1)}【${$.name+(i+1)}】`) + videoBODY = duokandianvideobodyVal.split('&'); + + if (duokandianvideobodyVal == '') { + videoBODY.length = 0 + tt = 0 + } else tt = videoBODY.length * 30 - 29 + await user(); //用户信息 await signindex(); //签到 - if ($.user.data.today_gold >= 2000 && $.signindex.data.sign_status == 0) { + if ($.user.data && $.user.data.today_gold >= 2000 && $.signindex.data.sign_status == 0) { await sign(); //签到 } await days(); //任务列表 await lottoindex(); //转盘查询 - if ($.lottoindex.data.times >= 1) { + if ($.lottoindex.data && $.lottoindex.data.times >= 1) { await lotto(); //转盘抽奖 } - if (gg.status != 2) { + if ($.lottoindex.data && $.lottoindex.data.chip >= 4) { + await chip(); //碎片兑换 + } + + if (gg && gg.status != 2) { await advideo(); //广告视频 await extratime(); //时段刷新 - - if (!$.extratime.data.status) { + if ($.extratime.data && $.extratime.data.status == 1) { await timeaward(); //时段奖励 await timeawardsss(); //时段翻倍 } - - + await extrabox(); //宝箱刷新 await boxaward(); //宝箱奖励 await boxbox(); //宝箱翻倍 } - if (yi.status == 1) { - await rw1(); //日常任务1 + if (gg && gg.status == 2) { + console.log(`【时段奖励】:已完成\n`); + $.message += `【时段奖励】:已完成\n` + console.log(`【宝箱奖励】:已完成\n`); + $.message += `【宝箱奖励】:已完成\n` } - if (er.status == 1) { + if (sp && sp.status == 1) { + await spaward(); //视频达成 + } + if (yi && yi.status == 1) { + await rw1(); //日常任务1 + } + if (er && er.status == 1) { await rw2(); //日常任务2 } - - - await txcx(); //提现查询 - - if (CASH == 1 && $.user.data.cash >= 1 && txtx >= 5) { + if (CASH == 1 && $.user.data && $.user.data.cash >= 1 && txtx >= 5) { await tx(); //提现 - } - if (CASH == 3 && $.user.data.cash >= 3 && txtx >= 10) { + if (CASH == 3 && $.user.data && $.user.data.cash >= 3 && txtx >= 10) { + await tx(); //提现 + } + if (CASH == 5 && $.user.data && $.user.data.cash >= 5 && txtx >= 15) { + await tx(); //提现 + } + if (CASH == 15 && $.user.data && $.user.data.cash >= 15 && txtx >= 30) { await tx(); //提现 - } - if (CASH == 5 && $.user.data.cash >= 5 && txtx >= 15) { - await tx(); //提现 + if (videoBODY.length != 0 && sp && sp.status != 2) { + console.log(`【视频统计】:共有${videoBODY.length}个body,预计运行${tt}秒\n`); + $.message += `【视频统计】:共有${videoBODY.length}个body,预计运行${tt}秒\n` + + await video(); //刷视频 + await $.wait(tt * 1000) } - if (CASH == 15 && $.user.data.cash >= 15 && txtx >= 30) { - await tx(); //提现 + + if (videoBODY.length != 0 && sp && sp.status == 2) { + console.log(`【视频统计】:共有${videoBODY.length}个body,已完成\n`); + $.message += `【视频统计】:共有${videoBODY.length}个body,已完成\n` } @@ -353,8 +381,6 @@ function msgShow() { resolve() }) } - - //用户信息 function user(timeout = 0) { return new Promise((resolve) => { @@ -368,18 +394,15 @@ function user(timeout = 0) { try { if (logs) $.log(`${O}, 用户信息🚩: ${data}`); $.user = JSON.parse(data); - if ($.user.status_code == 200) { + if ($.user.data && $.user.status_code == 200) { console.log(`\n${O}\n========== 【${$.user.data.nickname}】 ==========\n`); $.message += `\n${O}\n========== 【${$.user.data.nickname}】 ==========\n`; - $.message += `【账户信息】:账户余额${$.user.data.cash}元,今日获得${$.user.data.today_gold / 10000}元\n`; } if ($.user.status_code == 10020) { console.log(`账户信息:${$.user.message}\n`); $.message += `账户信息:${$.user.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -389,8 +412,6 @@ function user(timeout = 0) { }, timeout) }) } - - //任务列表 function days(timeout = 0) { return new Promise((resolve) => { @@ -404,34 +425,30 @@ function days(timeout = 0) { try { if (logs) $.log(`${O}, 任务列表🚩: ${data}`); $.days = JSON.parse(data); - if ($.days.status_code == 200) { - sp = $.days.data.list.find(item => item.id === 11); - gg = $.days.data.list.find(item => item.id === 12); - + if ($.days) { + sp = $.days.data.list.find(item => item.id === 1 || item.id === 11); + gg = $.days.data.list.find(item => item.id === 2 || item.id === 12); yi = $.days.data.Task_comp.data.find(item => item.pro === 20); er = $.days.data.Task_comp.data.find(item => item.pro === 50); - console.log(`【${sp.title}】:${sp.task_go}, ${sp.award}金币\n【${gg.title}】 :${gg.task_go}, ${gg.award}金币\n`); - $.message += `【${sp.title}】:${sp.task_go}, ${sp.award}金币\n【${gg.title}】:${gg.task_go}, ${gg.award}金币\n`; - - if (yi.status == 2) { - - console.log(`【日常任务1】:任务完成 ${yi.award}金币\n`); - - $.message += `【日常任务1】:任务完成 ${yi.award}金币\n`; + if ($.days.data && $.days.status_code == 200) { + console.log(`【${sp.title}】:${sp.task_go}, ${sp.award}金币\n【${gg.title}】 :${gg.task_go}, ${gg.award}金币\n`); + $.message += `【${sp.title}】:${sp.task_go}, ${sp.award}金币\n【${gg.title}】:${gg.task_go}, ${gg.award}金币\n`; + if (yi.status == 2) { + console.log(`【日常任务1】:任务完成 ${yi.award}金币\n`); + $.message += `【日常任务1】:任务完成 ${yi.award}金币\n`; + } + if (er.status == 2) { + console.log(`【日常任务2】:任务完成 ${er.award}金币\n`); + $.message += `【日常任务2】:任务完成 ${er.award}金币\n`; + } } - if (er.status == 2) { - console.log(`【日常任务2】:任务完成 ${er.award}金币\n`); - - $.message += `【日常任务2】:任务完成 ${er.award}金币\n`; - + if ($.days.status_code == 10020) { + console.log(`任务列表:${$.days.message}\n`); + $.message += `任务列表:${$.days.message}\n`; } - } - if ($.days.status_code == 10020) { - console.log(`任务列表:${$.days.message}\n`); - $.message += `任务列表:${$.days.message}\n`; } @@ -444,7 +461,6 @@ function days(timeout = 0) { }, timeout) }) } - //签到查询 function signindex(timeout = 0) { return new Promise((resolve) => { @@ -458,17 +474,14 @@ function signindex(timeout = 0) { try { if (logs) $.log(`${O}, 签到查询🚩: ${data}`); $.signindex = JSON.parse(data); - if ($.signindex.status_code == 200 && $.signindex.data.sign_status == 1) { - + if ($.signindex.data && $.signindex.status_code == 200 && $.signindex.data.sign_status == 1) { console.log(`【签到查询】: 今日已签到\n`); $.message += `【签到查询】: 今日已签到\n`; } if ($.signindex.status_code == 10020) { console.log(`【签到查询】:${$.signindex.message}\n`); $.message += `【签到查询】:${$.signindex.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -478,9 +491,6 @@ function signindex(timeout = 0) { }, timeout) }) } - - - //今日签到 function sign(timeout = 0) { return new Promise((resolve) => { @@ -494,17 +504,14 @@ function sign(timeout = 0) { try { if (logs) $.log(`${O}, 今日签到🚩: ${data}`); $.sign = JSON.parse(data); - if ($.sign.status_code == 200) { - + if ($.sign.data && $.sign.status_code == 200) { console.log(`【今日签到】: ${$.sign.data.sign_award}金币\n`); $.message += `【今日签到】: ${$.sign.data.sign_award}金币\n`; } if ($.sign.status_code == 10020) { console.log(`【今日签到】:${$.sign.message}\n`); $.message += `【今日签到】:${$.sign.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -514,9 +521,36 @@ function sign(timeout = 0) { }, timeout) }) } - - - +//视频达成 +function spaward(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + let url = { + url: `http://dkd-api.dysdk.com/task/get_ad_award`, + headers: duokandianheaderVal, + body: `adType=2&${duokandianbodyVal}&type=1&overLimit`, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 视频达成🚩: ${data}`); + $.spaward = JSON.parse(data); + if ($.spaward.data && $.spaward.status_code == 200) { + console.log(`【视频达成】:${$.spaward.data.award}金币\n`); + $.message += `【视频达成】:${$.spaward.data.award}金币\n`; + } + if ($.spaward.status_code == 10020) { + console.log(`【视频达成】:${$.spaward.message}\n`); + $.message += `【视频达成】:${$.spaward.message}\n`; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} //抽奖次数 function lottoindex(timeout = 0) { return new Promise((resolve) => { @@ -530,17 +564,18 @@ function lottoindex(timeout = 0) { try { if (logs) $.log(`${O}, 抽奖次数🚩: ${data}`); $.lottoindex = JSON.parse(data); - if ($.lottoindex.status_code == 200) { - + if ($.lottoindex.data && $.lottoindex.status_code == 200) { console.log(`【抽奖次数】:剩余${$.lottoindex.data.times}次\n`); $.message += `【抽奖次数】:剩余${$.lottoindex.data.times}次\n`; + console.log(`【碎片信息】:剩余${$.lottoindex.data.chip}个\n`); + $.message += `【碎片信息】:剩余${$.lottoindex.data.chip}个\n`; } if ($.lottoindex.status_code == 10020) { console.log(`【抽奖次数】:${$.lottoindex.message}\n`); $.message += `【抽奖次数】:${$.lottoindex.message}\n`; - + console.log(`【碎片信息】:${$.lottoindex.message}\n`); + $.message += `【碎片信息】:${$.lottoindex.message}\n`; } - } catch (e) { $.logErr(e, resp); } finally { @@ -550,13 +585,9 @@ function lottoindex(timeout = 0) { }, timeout) }) } - - - //转盘抽奖 function lotto(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/lotto/start`, @@ -567,17 +598,15 @@ function lotto(timeout = 0) { try { if (logs) $.log(`${O}, 转盘抽奖🚩: ${data}`); $.lotto = JSON.parse(data); - if ($.lotto.status_code == 200) { - + A = 1 + if ($.lotto.data && $.lotto.status_code == 200) { console.log(`【转盘抽奖】:奖励 ${$.lotto.data.award}金币\n`); $.message += `【转盘抽奖】:奖励 ${$.lotto.data.award}金币\n`; } if ($.lotto.status_code == 10020) { console.log(`【转盘抽奖】:${$.lotto.message}\n`); $.message += `【转盘抽奖】:${$.lotto.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -587,9 +616,39 @@ function lotto(timeout = 0) { }, timeout) }) } - - - +//碎片兑换 +function chip(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + let url = { + url: `http://dkd-api.dysdk.com/lotto/convert?${duokandianbodyVal}`, + headers: duokandianheaderVal, + body: { + "id": 4 + }, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 碎片兑换🚩: ${data}`); + $.chip = JSON.parse(data); + A = 1 + if ($.chip.data && $.chip.status_code == 200) { + console.log(`【碎片兑换】:奖励 ${$.chip.data.award}金币\n`); + $.message += `【碎片兑换】:奖励 ${$.chip.data.award}金币\n`; + } + if ($.chip.status_code == 10020) { + console.log(`【碎片兑换】:${$.chip.message}\n`); + $.message += `【碎片兑换】:${$.chip.message}\n`; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} //广告视频 function advideo(timeout = 0) { @@ -604,17 +663,14 @@ function advideo(timeout = 0) { try { if (logs) $.log(`${O}, 广告视频🚩: ${data}`); $.advideo = JSON.parse(data); - if ($.advideo.status_code == 200) { - + if ($.advideo.data && $.advideo.status_code == 200) { console.log(`【广告视频】:奖励 ${$.advideo.data.award}金币\n`); $.message += `【广告视频】:奖励 ${$.advideo.data.award}金币\n`; } if ($.advideo.status_code == 10020) { console.log(`【广告视频】:${$.advideo.message}\n`); $.message += `【广告视频】:${$.advideo.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -624,11 +680,9 @@ function advideo(timeout = 0) { }, timeout) }) } - //时段刷新 function extratime(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/video/extra_time`, @@ -639,17 +693,14 @@ function extratime(timeout = 0) { try { if (logs) $.log(`${O}, 时段刷新🚩: ${data}`); $.extratime = JSON.parse(data); - if ($.extratime.status_code == 200 && !$.extratime.data.status) { - + if ($.extratime.status_code == 200 && $.extratime.data.status == 1) { console.log(`【时段刷新】:刷新成功\n`); $.message += `【时段刷新】:刷新成功\n`; } if ($.extratime.status_code == 10020) { console.log(`【时段刷新】:${$.extratime.message}\n`); $.message += `【时段刷新】:${$.extratime.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -662,7 +713,6 @@ function extratime(timeout = 0) { //时段奖励 function timeaward(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/video/extra_get`, @@ -673,17 +723,14 @@ function timeaward(timeout = 0) { try { if (logs) $.log(`${O}, 时段奖励🚩: ${data}`); $.timeaward = JSON.parse(data); - if ($.timeaward.status_code == 200 && !$.timeaward.data.status) { - + if ($.timeaward.data && $.timeaward.status_code == 200 && !$.timeaward.data.status) { console.log(`【时段奖励】:奖励 ${$.timeaward.data.award}金币\n`); $.message += `【时段奖励】:奖励 ${$.timeaward.data.award}金币\n`; } if ($.timeaward.status_code == 10020) { console.log(`【时段奖励】:${$.timeaward.message}\n`); $.message += `【时段奖励】:${$.timeaward.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -693,11 +740,9 @@ function timeaward(timeout = 0) { }, timeout) }) } - //时段翻倍 function timeawardsss(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/video/extra_again`, @@ -708,17 +753,45 @@ function timeawardsss(timeout = 0) { try { if (logs) $.log(`${O}, 时段翻倍🚩: ${data}`); $.timeawardsss = JSON.parse(data); - if ($.timeawardsss.status_code == 200 && !$.timeaward.data.status) { - + if ($.timeawardsss.data && $.timeawardsss.status_code == 200 && !$.timeaward.data.status) { console.log(`【时段翻倍】:奖励 ${$.timeawardsss.data.award}金币\n`); $.message += `【时段翻倍】:奖励 ${$.timeawardsss.data.award}金币\n`; } if ($.timeawardsss.status_code == 10020 && !$.timeaward.data.status) { console.log(`【时段翻倍】:${$.timeawardsss.message}\n`); $.message += `【时段翻倍】:${$.timeawardsss.message}\n`; - } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} +//宝箱刷新 +function extrabox(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + let url = { + url: `http://dkd-api.dysdk.com/red/box_init`, + headers: duokandianheaderVal, + body: duokandianbodyVal, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 时段刷新🚩: ${data}`); + $.extrabox = JSON.parse(data); + if ($.extrabox.status_code == 200) { + console.log(`【宝箱刷新】:刷新成功,剩余${$.extrabox.data.diff}秒\n`); + $.message += `【宝箱刷新】:刷新成功,剩余${$.extrabox.data.diff}秒\n`; + } + if ($.extrabox.status_code == 10020) { + console.log(`【宝箱刷新】:${$.extrabox.message}\n`); + $.message += `【宝箱刷新】:${$.extrabox.message}\n`; + } } catch (e) { $.logErr(e, resp); } finally { @@ -730,10 +803,11 @@ function timeawardsss(timeout = 0) { } + + //宝箱奖励 function boxaward(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/red/box_award`, @@ -744,17 +818,14 @@ function boxaward(timeout = 0) { try { if (logs) $.log(`${O}, 宝箱奖励🚩: ${data}`); $.boxaward = JSON.parse(data); - if ($.boxaward.status_code == 200) { - + if ($.boxaward.data && $.boxaward.status_code == 200) { console.log(`【宝箱奖励】:奖励 ${$.boxaward.data.award}金币\n`); $.message += `【宝箱奖励】:奖励 ${$.boxaward.data.award}金币\n`; } if ($.boxaward.status_code == 10020) { console.log(`【宝箱奖励】:${$.boxaward.message}\n`); $.message += `【宝箱奖励】:${$.boxaward.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -764,12 +835,9 @@ function boxaward(timeout = 0) { }, timeout) }) } - - //宝箱翻倍 function boxbox(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/red/box_extra`, @@ -780,17 +848,14 @@ function boxbox(timeout = 0) { try { if (logs) $.log(`${O}, 宝箱翻倍🚩: ${data}`); $.boxbox = JSON.parse(data); - if ($.boxbox.status_code == 200) { - + if ($.boxbox.data && $.boxbox.status_code == 200) { console.log(`【宝箱翻倍】:奖励 ${$.boxbox.data.award}金币\n`); $.message += `【宝箱翻倍】:奖励 ${$.boxbox.data.award}金币\n`; } if ($.boxbox.status_code == 10020) { console.log(`【宝箱翻倍】:${$.boxbox.message}\n`); $.message += `【宝箱翻倍】:${$.boxbox.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -803,7 +868,6 @@ function boxbox(timeout = 0) { //日常任务1 function rw1(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/task/get_award_pro`, @@ -814,17 +878,14 @@ function rw1(timeout = 0) { try { if (logs) $.log(`${O}, 日常任务1🚩: ${data}`); $.rw1 = JSON.parse(data); - if ($.rw1.status_code == 200) { - + if ($.rw1.data && $.rw1.status_code == 200) { console.log(`【日常任务1】:领取 ${$.rw1.data.award}金币\n`); $.message += `【日常任务1】:领取 ${$.rw1.data.award}金币\n`; } if ($.rw1.status_code == 10020) { console.log(`【日常任务1】:${$.rw1.message}\n`); $.message += `【日常任务1】:${$.rw1.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -834,11 +895,9 @@ function rw1(timeout = 0) { }, timeout) }) } - //日常任务2 function rw2(timeout = 0) { return new Promise((resolve) => { - setTimeout(() => { let url = { url: `http://dkd-api.dysdk.com/task/get_award_pro`, @@ -849,17 +908,14 @@ function rw2(timeout = 0) { try { if (logs) $.log(`${O}, 日常任务2🚩: ${data}`); $.rw2 = JSON.parse(data); - if ($.rw2.status_code == 200) { - + if ($.rw2.data && $.rw2.status_code == 200) { console.log(`【日常任务2】:领取 ${$.rw2.data.award}金币\n`); $.message += `【日常任务2】:领取 ${$.rw2.data.award}金币\n`; } if ($.rw2.status_code == 10020) { console.log(`【日常任务2】:${$.rw2.message}\n`); $.message += `【日常任务2】:${$.rw2.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -869,15 +925,125 @@ function rw2(timeout = 0) { }, timeout) }) } - - +//刷视频 +function video(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + var inss = 0; + var ins = 0; + ADD = 0; + ABB = 0; + for (let i = 0; i < videoBODY.length; i++) { + setTimeout(() => { + let url = { + url: `http://dkd-api.dysdk.com/android_video/getaward`, + headers: duokandianheaderVal, + body: `${videoBODY[i]}`, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 刷视频🚩: ${data}`); + $.video = JSON.parse(data); + if ($.video.data && $.video.status_code == 200) { + console.log(`【刷视频】:开始领取第${i+1}次视频奖励,获得${$.video.data.award}金币,等待30秒继续\n`); + inss += $.video.data.award; + ins += 1; + } + if ($.video.status_code == 10020) { + console.log(`【刷视频】:开始领取第${i+1}次视频奖励,${$.video.message},等待30秒继续\n`); + } + await videoyz() + if ($.videoyz.data.status == 3) { + await awardpost() + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, i * 30000); + } + setTimeout(() => { + if ($.video && $.video.status_code) { + console.log(`【刷视频】:共领取${ins}次视频奖励,共${inss}金币\n`); + $.message += `【刷视频】:共领取${ins}次视频奖励,共${inss}金币\n` + } + if ($.awardpost && $.awardpost.status_code) { + console.log(`【红包奖励】:共领取${ABB}次红包奖励,共${ADD}金币\n`); + $.message += `【红包奖励】:共领取${ABB}次红包奖励,共${ADD}金币\n` + } + }, videoBODY.length * 30000 - 29000) + }, timeout) + }) +} +//验证视频 +function videoyz(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + let url = { + url: `http://dkd-api.dysdk.com/video/red_countdown`, + headers: duokandianheaderVal, + body: `step=2&${duokandianbodyVal}`, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 验证视频🚩: ${data}`); + $.videoyz = JSON.parse(data); + if ($.videoyz.data && $.videoyz.status_code == 200 && $.videoyz.data.status == 2) { + console.log(`【验证视频】:剩余 ${$.videoyz.data.red_time}圈\n`); + } + if ($.videoyz.data && $.videoyz.status_code == 200 && $.videoyz.data.status == 3) { + console.log(`【验证视频】:验证通过\n`); + } + if ($.videoyz.status_code == 10020) { + console.log(`【验证视频】:${$.videoyz.message}\n`); + $.message += `【验证视频】:${$.videoyz.message}\n`; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} +//红包奖励 +function awardpost(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + let url = { + url: `http://dkd-api.dysdk.com/video/red_getaward`, + headers: duokandianheaderVal, + body: `${duokandianbodyVal}`, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 红包奖励🚩: ${data}`); + $.awardpost = JSON.parse(data); + if ($.awardpost.data && $.awardpost.status_code == 200) { + console.log(`【红包奖励】:开始领取第${ABB+1}次奖励,获得 ${$.awardpost.data.award}金币\n`); + ADD += $.awardpost.data.award; + ABB += 1; + } + if ($.awardpost.status_code == 10020) { + console.log(`【红包奖励】:${$.awardpost.message}\n`); + $.message += `【红包奖励】:${$.awardpost.message}\n`; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} //提现 function tx(timeout = 0) { return new Promise((resolve) => { - - setTimeout(() => { - let url = { url: `http://dkd-api.dysdk.com/money/withdraw_do?${duokandianbodyVal}`, headers: { @@ -899,16 +1065,13 @@ function tx(timeout = 0) { if (logs) $.log(`${O}, 提现🚩: ${data}`); $.tx = JSON.parse(data); if ($.tx.status_code == 200) { - console.log(`【提现】:成功提现 ${CASH}元\n`); $.message += `【提现】:成功提现 ${CASH}元\n`; } if ($.tx.status_code == 10020) { console.log(`【提现】:${$.tx.message}\n`); $.message += `【提现】:${$.tx.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -918,14 +1081,10 @@ function tx(timeout = 0) { }, timeout) }) } - //提现查询 function txcx(timeout = 0) { return new Promise((resolve) => { - - setTimeout(() => { - let url = { url: `http://dkd-api.dysdk.com/money/withdraw_index?${duokandianbodyVal}`, headers: { @@ -940,25 +1099,24 @@ function txcx(timeout = 0) { "Referer": "http://dkd-api.dysdk.com/index.html", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", }, - } $.post(url, async (err, resp, data) => { try { if (logs) $.log(`${O}, 提现查询🚩: ${data}`); $.txcx = JSON.parse(data); - if ($.txcx.status_code == 200) { + if ($.txcx.data && $.txcx.status_code == 200) { - txtx = $.txcx.data.with_list[0].msg3.substr($.txcx.data.with_list[0].msg3.indexOf('已签到') + 3, 3).split('天')[0]; + txtxid = $.txcx.data.with_list.find(item => item.money === 3); + + txtx = txtxid.msg3.substr(txtxid.msg3.indexOf('已签到') + 3, 3).split('天')[0]; console.log(`【提现查询】:已连续签到${txtx}天\n`); $.message += `【提现查询】:已连续签到${txtx}天\n`; } if ($.txcx.status_code == 10020) { console.log(`【提现查询】:${$.txcx.message}\n`); $.message += `【提现查询】:${$.txcx.message}\n`; - } - } catch (e) { $.logErr(e, resp); } finally { @@ -968,9 +1126,6 @@ function txcx(timeout = 0) { }, timeout) }) } - - - // prettier-ignore function Env(t, e) { class s { diff --git a/Task/duokandianCOOKIE.js b/Task/duokandianCOOKIE.js index 4e534db8..e54ccf69 100644 --- a/Task/duokandianCOOKIE.js +++ b/Task/duokandianCOOKIE.js @@ -1,12 +1,13 @@ //独立COOKIE文件 ck在``里面填写,多账号换行 let duokandianbodyVal = `` - +let duokandianvideobodyVal = `` let duokandiancookie = { - duokandianbodyVal: duokandianbodyVal, + duokandianbodyVal: duokandianbodyVal, + duokandianvideobodyVal: duokandianvideobodyVal, } -module.exports = duokandiancookie \ No newline at end of file +module.exports = duokandiancookie diff --git a/Task/duokandianck.js b/Task/duokandianck.js new file mode 100644 index 00000000..b3e5f9d7 --- /dev/null +++ b/Task/duokandianck.js @@ -0,0 +1,130 @@ +/* ziye 导出ck专用 务必下载或者复制到本地使用 + +github地址 https://github.com/ziye12 +TG频道地址 https://t.me/ziyescript +TG交流群 https://t.me/joinchat/AAAAAE7XHm-q1-7Np-tF3g +boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye.boxjs.json + + +转载请备注个名字,谢谢 + + + +*/ + +//请先确定boxjs已经存在ck,想要导出哪个值,就设置为1 + +//header + +const duokandianbody = 1 +const duokandianvideobody = 1 + +const GG=''//默认为换行,也可以将需要隔开的符号填写在''内 + + +let K = 1;//从哪个账号开始 + +let Z = 1;//到哪个账号结束 + + + +const $ = Env("多看点APP"); +$.idx = ($.idx = ($.getval('duokandianSuffix') || '1') - 1) > 0 ? ($.idx + 1 + '') : ''; // 账号扩展字符 +const notify = $.isNode() ? require("./sendNotify") : ""; + +let R=K + + + +const duokandianbodyArr = []; +let duokandianbodyVal = ""; + + +const duokandianvideobodyArr = []; +let duokandianvideobodyVal = ""; + + + + duokandianbodyArr.push($.getdata("duokandianbody")); + duokandianvideobodyArr.push($.getdata("duokandianvideobody")); + // 根据boxjs中设置的额外账号数,添加存在的账号数据进行任务处理 + let duokandianCount = ($.getval('duokandianCount') || '1') - 0; + for (let i = 2; i <= duokandianCount; i++) { + if ($.getdata(`duokandianbody${i}`)) { + + duokandianbodyArr.push($.getdata(`duokandianbody${i}`)); + duokandianvideobodyArr.push($.getdata(`duokandianvideobody${i}`)); + } + } + + + + console.log( + `============ 共${duokandianbodyArr.length}个${$.name}账号 =============\n` + ); + console.log( + `============ 脚本执行-北京时间(UTC+8):${new Date( + new Date().getTime() + 8 * 60 * 60 * 1000 + ).toLocaleString()} =============\n` + ); + + + + +if (ZR) + $.msg($.name+R+'到'+(K-1)+'打印成功'+K+'到'+Z+'打印失败', '⚠️提示:请先获取'+K+'到'+Z+'的ck','并在boxjs里设置好账号数') + +if (K==R&&Z>R) + $.msg($.name+K+'到'+Z+'打印失败', '⚠️提示:请先获取'+K+'到'+Z+'的ck','并在boxjs里设置好账号数') + + +if (Z==R) + $.msg($.name+K+'打印失败', '⚠️提示:请先获取'+K+'的ck','并在boxjs里设置好账号数') + + $.done(); + } + + + + duokandianbodyVal = duokandianbodyArr[K-1]; + duokandianvideobodyVal = duokandianvideobodyArr[K-1]; + +if(duokandianbody==1)console.log(duokandianbodyVal+GG) +if(duokandianvideobody==1)console.log(duokandianvideobodyVal+GG) + + + for (let i = 0; i < 1; i++) { + (function (i) { + setTimeout( + function () { + + if (i == 0){ + if ( K < Z ) { + K += 1; + all(); +} else if (K == Z ) { + let F=Z-R+1 + $.msg($.name+R+'到'+Z+',ck打印成功','✅已打印'+F+'个ck',) + + $.done(); + + + } + } +}, + + (i + 1) * 10 + ); + })(i); + } +} + +// prettier-ignore +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/Task/exportCookie.js b/Task/exportCookie.js new file mode 100644 index 00000000..d4339236 --- /dev/null +++ b/Task/exportCookie.js @@ -0,0 +1,193 @@ +/* ziye 导出ck专用 务必下载或者复制到本地使用 + +github地址 https://github.com/ziye12 +TG频道地址 https://t.me/ziyescript +TG交流群 https://t.me/joinchat/AAAAAE7XHm-q1-7Np-tF3g +boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye.boxjs.json + + +转载请备注个名字,谢谢 + + + +*/ + +//填写账号数, +const Count=5 + +let K = 1;//从哪个账号开始 + +let Z = 5;//到哪个账号结束 + +const GG=''//默认为换行,也可以将需要隔开的符号填写在''内 + + +//填写你要打印的ck名字,去js里获取ck处看 如$.setdata(refreshtokenVal, "refreshtoken" + $.idx); 则在''中填写refreshtoken + +const jsA='refreshtoken' +const jsB='' +const jsC='' +const jsD='' +const jsE='' +const jsF='' +const jsG='' +const jsH='' +const jsI='' +const jsJ='' +const jsK='' +const jsL='' + +//开启打印则设置为1 + +const jsAA=1 +const jsBB=0 +const jsCC=0 +const jsDD=0 +const jsEE=0 +const jsFF=0 +const jsGG=0 +const jsHH=0 +const jsII=0 +const jsJJ=0 +const jsKK=0 +const jsLL=0 + + + + + + + + + + + + + + + +//⚠️⚠️⚠️下面内容不要随意改动 + + + +const $ = Env("Cookie导出"); +let R=K +const jsAArr = []; +let jsAVal = ``; +const jsBArr = []; +let jsBVal = ``; +const jsCArr = []; +let jsCVal = ``; +const jsDArr = []; +let jsDVal = ``; +const jsEArr = []; +let jsEVal = ``; +const jsFArr = []; +let jsFVal = ``; +const jsGArr = []; +let jsGVal = ``; +const jsHArr = []; +let jsHVal = ``; +const jsIArr = []; +let jsIVal = ``; +const jsJArr = []; +let jsJVal = ``; +const jsKArr = []; +let jsKVal = ``; +const jsLArr = []; +let jsLVal = ``; + jsAArr.push($.getdata(`${jsA}`)); + jsBArr.push($.getdata(`${jsB}`)); + jsCArr.push($.getdata(`${jsC}`)); + jsDArr.push($.getdata(`${jsD}`)); + jsEArr.push($.getdata(`${jsE}`)); + jsFArr.push($.getdata(`${jsF}`)); + jsGArr.push($.getdata(`${jsG}`)); + jsHArr.push($.getdata(`${jsH}`)); + jsIArr.push($.getdata(`${jsI}`)); + jsJArr.push($.getdata(`${jsJ}`)); + jsKArr.push($.getdata(`${jsK}`)); + jsLArr.push($.getdata(`${jsL}`)); + // 根据boxjs中设置的额外账号数,添加存在的账号数据进行任务处理 + for (let i = 2; i <= Count; i++) { + if ($.getdata(`${jsA+i}`)) { + jsAArr.push($.getdata(`${jsA+i}`)); + jsBArr.push($.getdata(`${jsB+i}`)); + jsCArr.push($.getdata(`${jsC+i}`)); + jsDArr.push($.getdata(`${jsD+i}`)); + jsEArr.push($.getdata(`${jsE+i}`)); + jsFArr.push($.getdata(`${jsF+i}`)); + jsGArr.push($.getdata(`${jsG+i}`)); + jsHArr.push($.getdata(`${jsH+i}`)); + jsIArr.push($.getdata(`${jsI+i}`)); + jsJArr.push($.getdata(`${jsJ+i}`)); + jsKArr.push($.getdata(`${jsK+i}`)); + jsLArr.push($.getdata(`${jsL+i}`)); + } + } + console.log( + `============ 脚本执行-北京时间(UTC+8):${new Date( + new Date().getTime() + 8 * 60 * 60 * 1000 + ).toLocaleString()} =============\n` + ); +if (ZR) + $.msg($.name+R+'到'+(K-1)+'打印成功'+K+'到'+Z+'打印失败', '⚠️提示:请先获取'+K+'到'+Z+'的ck','并设置好账号数') +if (K==R&&Z>R) + $.msg($.name+K+'到'+Z+'打印失败', '⚠️提示:请先获取'+K+'到'+Z+'的ck','并设置好账号数') +if (Z==R) + $.msg($.name+K+'打印失败', '⚠️提示:请先获取'+K+'的ck','并设置好账号数') + $.done(); + } + jsAVal = jsAArr[K-1]; + jsBVal = jsBArr[K-1]; + jsCVal = jsCArr[K-1]; + jsDVal = jsDArr[K-1]; + jsEVal = jsEArr[K-1]; + jsFVal = jsFArr[K-1]; + jsGVal = jsGArr[K-1]; + jsHVal = jsHArr[K-1]; + jsIVal = jsIArr[K-1]; + jsJVal = jsJArr[K-1]; + jsKVal = jsKArr[K-1]; + jsLVal = jsLArr[K-1]; +if(jsAA==1)console.log(jsAVal+GG) +if(jsBB==1)console.log(jsBVal+GG) +if(jsCC==1)console.log(jsCVal+GG) +if(jsDD==1)console.log(jsDVal+GG) +if(jsEE==1)console.log(jsEVal+GG) +if(jsFF==1)console.log(jsFVal+GG) +if(jsGG==1)console.log(jsGVal+GG) +if(jsHH==1)console.log(jsHVal+GG) +if(jsII==1)console.log(jsIVal+GG) +if(jsJJ==1)console.log(jsJVal+GG) +if(jsKK==1)console.log(jsKVal+GG) +if(jsLL==1)console.log(jsLVal+GG) + for (let i = 0; i < 1; i++) { + (function (i) { + setTimeout( + function () { + if (i == 0){ + if ( K < Z ) { + K += 1; + all(); +} else if (K == Z ) { + let F=Z-R+1 + $.msg($.name+R+'到'+Z+',ck打印成功','✅已打印'+F+'个ck',) + $.done(); + } + } +}, + (i + 1) * 10 + ); + })(i); + } +} +// prettier-ignore +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/Task/flw.js b/Task/flw.js index 65677db3..50aafb69 100644 --- a/Task/flw.js +++ b/Task/flw.js @@ -54,13 +54,20 @@ https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*) u ############## loon #返利网获取header http-request https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*) script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/flw.js, requires-header=true, tag=返利网获取header -http-request https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*) script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/flw.js,requires-body=true, tag=返利网获取body + +http-request https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*) script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/flw.js,requires-body=1,max-size=0, tag=返利网获取body ############## surge #返利网获取header -返利网获取header = type=http-request,pattern=https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*),script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/flw.js, +返利网获取header = type=http-request,pattern=https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*),script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/flw.js + #返利网获取body -返利网获取body = type=http-request,pattern=https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*),script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/flw.js, +返利网获取body = type=http-request,pattern=https:\/\/(huodong\.fanli\.com\/*||passport\.fanli\.com\/*||gw\.fanli\.com\/*),requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/flw.js + + + + + */ const $ = Env("返利网"); $.idx = ($.idx = ($.getval('flwSuffix') || '1') - 1) > 0 ? ($.idx + 1 + '') : ''; // 账号扩展字符 @@ -281,14 +288,16 @@ function daytime(inputTime) { }; //时间戳格式化日期 function time(inputTime) { - var date = new Date(inputTime); - Y = date.getFullYear() + '-'; - M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; - D = date.getDate() + ' '; - h = date.getHours() + ':'; - m = date.getMinutes() + ':'; - s = date.getSeconds(); - return Y + M + D + h + m + s; + if ($.isNode()) { + var date = new Date(inputTime + 8 * 60 * 60 * 1000); + } else var date = new Date(inputTime); + Y = date.getFullYear() + '-'; + M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; + D = date.getDate() + ' '; + h = date.getHours() + ':'; + m = date.getMinutes() + ':'; + s = date.getSeconds(); + return Y + M + D + h + m + s; }; let isGetCookie = typeof $request !== 'undefined' if (isGetCookie) { diff --git a/Task/githubAC.js b/Task/githubAC.js index 86bd7bb9..e1fb51b5 100644 --- a/Task/githubAC.js +++ b/Task/githubAC.js @@ -12,6 +12,7 @@ boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye. 2.7 增加时间控制,多js换行,boxjs手动保存会话,填写,再应用,其他填写环境变量或者githubACCOOKIE.js 2.7-2 修正判定 2.7-3 时间精确到5分 +1.12 修复 ⚠️一共1个位置 3个ck 👉 18条 Secrets(14个时间变量) 多账号换行 @@ -104,6 +105,38 @@ let middleHHA = []; const HHBArr = []; let HHBVal = ``; let middleHHB = []; +const HHCArr = []; +let HHCVal = ``; +let middleHHC = []; +const HHDArr = []; +let HHDVal = ``; +let middleHHD = []; +const HHEArr = []; +let HHEVal = ``; +let middleHHE = []; +const HHFArr = []; +let HHFVal = ``; +let middleHHF = []; +const HHGArr = []; +let HHGVal = ``; +let middleHHG = []; +const HHHArr = []; +let HHHVal = ``; +let middleHHH = []; +const HHIArr = []; +let HHIVal = ``; +let middleHHI = []; +const HHJArr = []; +let HHJVal = ``; +let middleHHJ = []; +const HHKArr = []; +let HHKVal = ``; +let middleHHK = []; +const HHLArr = []; +let HHLVal = ``; +let middleHHL = []; + + const MMAArr = []; let MMAVal = ``; let middleMMA = []; @@ -202,6 +235,7 @@ if ($.isNode() && process.env.GIT_githubACHEADER) { + if ( process.env.GIT_HHA && process.env.GIT_HHA.indexOf(COOKIES_SPLIT) > -1 @@ -212,6 +246,7 @@ if ($.isNode() && process.env.GIT_githubACHEADER) { } + if ( process.env.GIT_HHB && process.env.GIT_HHB.indexOf(COOKIES_SPLIT) > -1 @@ -223,6 +258,119 @@ if ($.isNode() && process.env.GIT_githubACHEADER) { + if ( + process.env.GIT_HHC && + process.env.GIT_HHC.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHC = process.env.GIT_HHC.split(COOKIES_SPLIT); + } else { + middleHHC = process.env.GIT_HHC.split(); + } + + + + + + if ( + process.env.GIT_HHD && + process.env.GIT_HHD.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHD = process.env.GIT_HHD.split(COOKIES_SPLIT); + } else { + middleHHD = process.env.GIT_HHD.split(); + } + + + + if ( + process.env.GIT_HHE && + process.env.GIT_HHE.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHE = process.env.GIT_HHE.split(COOKIES_SPLIT); + } else { + middleHHE = process.env.GIT_HHE.split(); + } + + + + if ( + process.env.GIT_HHF && + process.env.GIT_HHF.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHF = process.env.GIT_HHF.split(COOKIES_SPLIT); + } else { + middleHHF = process.env.GIT_HHF.split(); + } + + if ( + process.env.GIT_HHG && + process.env.GIT_HHG.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHG = process.env.GIT_HHG.split(COOKIES_SPLIT); + } else { + middleHHG = process.env.GIT_HHG.split(); + } + + + + if ( + process.env.GIT_HHH && + process.env.GIT_HHH.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHH = process.env.GIT_HHH.split(COOKIES_SPLIT); + } else { + middleHHH = process.env.GIT_HHH.split(); + } + + + + if ( + process.env.GIT_HHI && + process.env.GIT_HHI.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHI = process.env.GIT_HHI.split(COOKIES_SPLIT); + } else { + middleHHI = process.env.GIT_HHI.split(); + } + + + + + + if ( + process.env.GIT_HHJ && + process.env.GIT_HHJ.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHJ = process.env.GIT_HHJ.split(COOKIES_SPLIT); + } else { + middleHHJ = process.env.GIT_HHJ.split(); + } + + + + if ( + process.env.GIT_HHK && + process.env.GIT_HHK.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHK = process.env.GIT_HHK.split(COOKIES_SPLIT); + } else { + middleHHK = process.env.GIT_HHK.split(); + } + + + + if ( + process.env.GIT_HHL && + process.env.GIT_HHL.indexOf(COOKIES_SPLIT) > -1 + ) { + middleHHL = process.env.GIT_HHL.split(COOKIES_SPLIT); + } else { + middleHHL = process.env.GIT_HHL.split(); + } + + + + if ( process.env.GIT_MMA && process.env.GIT_MMA.indexOf(COOKIES_SPLIT) > -1 @@ -289,7 +437,7 @@ if ($.isNode() && process.env.GIT_githubACHEADER) { middleMMF = process.env.GIT_MMF.split(); } -if ( + if ( process.env.GIT_MMG && process.env.GIT_MMG.indexOf(COOKIES_SPLIT) > -1 ) { @@ -368,6 +516,17 @@ if (COOKIE.githubACurlVal) { "HHAVal": COOKIE.HHAVal.split('\n'), "HHBVal": COOKIE.HHBVal.split('\n'), + "HHCVal": COOKIE.HHCVal.split('\n'), + "HHDVal": COOKIE.HHDVal.split('\n'), + "HHEVal": COOKIE.HHEVal.split('\n'), + "HHFVal": COOKIE.HHFVal.split('\n'), + "HHGVal": COOKIE.HHGVal.split('\n'), + "HHHVal": COOKIE.HHHVal.split('\n'), + "HHIVal": COOKIE.HHIVal.split('\n'), + "HHJVal": COOKIE.HHJVal.split('\n'), + "HHKVal": COOKIE.HHKVal.split('\n'), + "HHLVal": COOKIE.HHLVal.split('\n'), + "MMAVal": COOKIE.MMAVal.split('\n'), "MMBVal": COOKIE.MMBVal.split('\n'), "MMCVal": COOKIE.MMCVal.split('\n'), @@ -410,16 +569,74 @@ if (!COOKIE.githubACheaderVal) { } }); + Object.keys(middleHHA).forEach((item) => { if (middleHHA[item]) { - githubACArr.push(middleHHA[item]); + HHAArr.push(middleHHA[item]); } }); + Object.keys(middleHHB).forEach((item) => { if (middleHHB[item]) { HHBArr.push(middleHHB[item]); } }); + Object.keys(middleHHC).forEach((item) => { + if (middleHHC[item]) { + HHCArr.push(middleHHC[item]); + } + }); + Object.keys(middleHHD).forEach((item) => { + if (middleHHD[item]) { + HHDArr.push(middleHHD[item]); + } + }); + + Object.keys(middleHHE).forEach((item) => { + if (middleHHE[item]) { + HHEArr.push(middleHHE[item]); + } + }); + Object.keys(middleHHF).forEach((item) => { + if (middleHHF[item]) { + HHFArr.push(middleHHF[item]); + } + }); + + Object.keys(middleHHG).forEach((item) => { + if (middleHHG[item]) { + HHGArr.push(middleHHG[item]); + } + }); + + Object.keys(middleHHH).forEach((item) => { + if (middleHHH[item]) { + HHHArr.push(middleHHH[item]); + } + }); + Object.keys(middleHHI).forEach((item) => { + if (middleHHI[item]) { + HHIArr.push(middleHHI[item]); + } + }); + Object.keys(middleHHJ).forEach((item) => { + if (middleHHJ[item]) { + HHJArr.push(middleHHJ[item]); + } + }); + + Object.keys(middleHHK).forEach((item) => { + if (middleHHK[item]) { + HHKArr.push(middleHHK[item]); + } + }); + Object.keys(middleHHL).forEach((item) => { + if (middleHHL[item]) { + HHLArr.push(middleHHL[item]); + } + }); + + Object.keys(middleMMA).forEach((item) => { if (middleMMA[item]) { MMAArr.push(middleMMA[item]); @@ -452,8 +669,8 @@ if (!COOKIE.githubACheaderVal) { MMFArr.push(middleMMF[item]); } }); - - Object.keys(middleMMG).forEach((item) => { + + Object.keys(middleMMG).forEach((item) => { if (middleMMG[item]) { MMGArr.push(middleMMG[item]); } @@ -492,13 +709,23 @@ if (!COOKIE.githubACheaderVal) { githubACbodyArr.push($.getdata("githubACbody")); HHAArr.push($.getdata("HHA")); HHBArr.push($.getdata("HHB")); + HHCArr.push($.getdata("HHC")); + HHDArr.push($.getdata("HHD")); + HHEArr.push($.getdata("HHE")); + HHFArr.push($.getdata("HHF")); + HHGArr.push($.getdata("HHG")); + HHHArr.push($.getdata("HHH")); + HHIArr.push($.getdata("HHI")); + HHJArr.push($.getdata("HHJ")); + HHKArr.push($.getdata("HHK")); + HHLArr.push($.getdata("HHL")); MMAArr.push($.getdata("MMA")); MMBArr.push($.getdata("MMB")); MMCArr.push($.getdata("MMC")); MMDArr.push($.getdata("MMD")); MMEArr.push($.getdata("MME")); MMFArr.push($.getdata("MMF")); - MMGArr.push($.getdata("MMG")); + MMGArr.push($.getdata("MMG")); MMHArr.push($.getdata("MMH")); MMIArr.push($.getdata("MMI")); MMJArr.push($.getdata("MMJ")); @@ -515,13 +742,23 @@ if (!COOKIE.githubACheaderVal) { githubACbodyArr.push($.getdata(`githubACbody${i}`)); HHAArr.push($.getdata(`HHA${i}`)); HHBArr.push($.getdata(`HHB${i}`)); + HHCArr.push($.getdata(`HHC${i}`)); + HHDArr.push($.getdata(`HHD${i}`)); + HHEArr.push($.getdata(`HHE${i}`)); + HHFArr.push($.getdata(`HHF${i}`)); + HHGArr.push($.getdata(`HHG${i}`)); + HHHArr.push($.getdata(`HHH${i}`)); + HHIArr.push($.getdata(`HHI${i}`)); + HHJArr.push($.getdata(`HHJ${i}`)); + HHKArr.push($.getdata(`HHK${i}`)); + HHLArr.push($.getdata(`HHL${i}`)); MMAArr.push($.getdata(`MMA${i}`)); MMBArr.push($.getdata(`MMB${i}`)); MMCArr.push($.getdata(`MMC${i}`)); MMDArr.push($.getdata(`MMD${i}`)); MMEArr.push($.getdata(`MME${i}`)); MMFArr.push($.getdata(`MMF${i}`)); - MMGArr.push($.getdata(`MMG${i}`)); + MMGArr.push($.getdata(`MMG${i}`)); MMHArr.push($.getdata(`MMH${i}`)); MMIArr.push($.getdata(`MMI${i}`)); MMJArr.push($.getdata(`MMJ${i}`)); @@ -609,7 +846,7 @@ M = (nowTimes.getMonth() + 1 < 10 ? '0' + (nowTimes.getMonth() + 1) : nowTimes.g D = (nowTimes.getDate() + 1 < 10 ? '0' + (nowTimes.getDate()) : nowTimes.getMonth()); ddtime = Y + M + D; console.log(ddtime) -//当前时间戳 + function tts(inputTime) { if ($.isNode()) { TTS = Math.round(new Date().getTime() + @@ -618,6 +855,9 @@ function tts(inputTime) { new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000).toString(); return TTS; }; + + + //当前10位时间戳 function ts(inputTime) { if ($.isNode()) { @@ -638,7 +878,12 @@ function daytime(inputTime) { }; //时间戳格式化日期 function time(inputTime) { - var date = new Date(inputTime); + + if ($.isNode()) { + var date = new Date(inputTime + 8 * 60 * 60 * 1000); + } else var date = new Date(inputTime); + + Y = date.getFullYear() + '-'; M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; D = date.getDate() + ' '; @@ -684,6 +929,16 @@ async function all() { githubACbodyVal = GIT_COOKIES.githubACbodyVal[i]; HHAVal = GIT_COOKIES.HHAVal[i]; HHBVal = GIT_COOKIES.HHBVal[i]; + HHCVal = GIT_COOKIES.HHCVal[i]; + HHDVal = GIT_COOKIES.HHDVal[i]; + HHEVal = GIT_COOKIES.HHEVal[i]; + HHFVal = GIT_COOKIES.HHFVal[i]; + HHGVal = GIT_COOKIES.HHGVal[i]; + HHHVal = GIT_COOKIES.HHHVal[i]; + HHIVal = GIT_COOKIES.HHIVal[i]; + HHJVal = GIT_COOKIES.HHJVal[i]; + HHKVal = GIT_COOKIES.HHKVal[i]; + HHLVal = GIT_COOKIES.HHLVal[i]; MMAVal = GIT_COOKIES.MMAVal[i]; MMBVal = GIT_COOKIES.MMBVal[i]; MMCVal = GIT_COOKIES.MMCVal[i]; @@ -709,9 +964,19 @@ async function all() { githubACurlVal = githubACurlArr[i]; githubACheaderVal = githubACheaderArr[i]; githubACbodyVal = githubACbodyArr[i]; - + HHAVal = HHAArr[i]; HHBVal = HHBArr[i]; + HHCVal = HHCArr[i]; + HHDVal = HHDArr[i]; + HHEVal = HHEArr[i]; + HHFVal = HHFArr[i]; + HHGVal = HHGArr[i]; + HHHVal = HHHArr[i]; + HHIVal = HHIArr[i]; + HHJVal = HHJArr[i]; + HHKVal = HHKArr[i]; + HHLVal = HHLArr[i]; MMAVal = MMAArr[i]; MMBVal = MMBArr[i]; MMCVal = MMCArr[i]; @@ -734,18 +999,21 @@ async function all() { O = (`${$.name + (i + 1)}🔔`); await console.log(`-------------------------\n\n🔔开始运行${$.name+(i+1)}【${githubACnameVal}】`) - $.message += `【${githubACnameVal}】从${HHAVal}点到${HHBVal}点的 ${MMAVal} ${MMBVal} ${MMCVal} ${MMDVal} ${MMEVal} ${MMFVal} ${MMGVal} ${MMHVal} ${MMIVal} ${MMJVal} ${MMKVal} ${MMLVal} 分运行\n` - if ((nowTimes.getHours() >= HHAVal && nowTimes.getHours() <= HHBVal) && (nowTimes.getMinutes() == MMAVal || nowTimes.getMinutes() == MMBVal || nowTimes.getMinutes() == MMCVal || nowTimes.getMinutes() == MMDVal || nowTimes.getMinutes() == MMEVal || nowTimes.getMinutes() == MMFVal ||nowTimes.getMinutes() == MMGVal || nowTimes.getMinutes() == MMHVal || nowTimes.getMinutes() == MMIVal || nowTimes.getMinutes() == MMJVal || nowTimes.getMinutes() == MMKVal || nowTimes.getMinutes() == MMLVal)) { + $.message += `【${githubACnameVal}】${HHAVal}-${HHBVal} ${HHCVal}-${HHDVal} ${HHEVal}-${HHFVal} ${HHGVal}-${HHHVal} ${HHIVal}-${HHJVal} ${HHKVal}-${HHLVal} 的 ${MMAVal} ${MMBVal} ${MMCVal} ${MMDVal} ${MMEVal} ${MMFVal} ${MMGVal} ${MMHVal} ${MMIVal} ${MMJVal} ${MMKVal} ${MMLVal} 分运行\n` + + if (((nowTimes.getHours() >= HHAVal && nowTimes.getHours() <= HHBVal) || (nowTimes.getHours() >= HHCVal && nowTimes.getHours() <= HHDVal) || (nowTimes.getHours() >= HHEVal && nowTimes.getHours() <= HHFVal) || (nowTimes.getHours() >= HHGVal && nowTimes.getHours() <= HHHVal) || (nowTimes.getHours() >= HHIVal && nowTimes.getHours() <= HHJVal) || (nowTimes.getHours() >= HHKVal && nowTimes.getHours() <= HHLVal)) && (nowTimes.getMinutes() == MMAVal || nowTimes.getMinutes() == MMBVal || nowTimes.getMinutes() == MMCVal || nowTimes.getMinutes() == MMDVal || nowTimes.getMinutes() == MMEVal || nowTimes.getMinutes() == MMFVal || nowTimes.getMinutes() == MMGVal || nowTimes.getMinutes() == MMHVal || nowTimes.getMinutes() == MMIVal || nowTimes.getMinutes() == MMJVal || nowTimes.getMinutes() == MMKVal || nowTimes.getMinutes() == MMLVal)) { await githubAC(); //运行 } else { - console.log(`${githubACnameVal}:时间未到\n`) - $.message += `${githubACnameVal}:时间未到\n` + console.log(`${githubACnameVal}:时间未到\n\n`) + $.message += `${githubACnameVal}:时间未到\n\n` } + + } } //通知 @@ -783,11 +1051,11 @@ function githubAC(timeout = 0) { try { if (logs) $.log(`${O}, 运行🚩: ${data}`); if (data.match(/github.com/g)) { - console.log(githubACnameVal + `${time(Number(tts()))}运行成功\n`) - $.message += githubACnameVal + `${time(Number(tts()))}运行成功\n` - }else { - console.log(githubACnameVal + `请检查github的Action是否开启\n`) - $.message += githubACnameVal + `请检查github的Action是否开启\n` + console.log(githubACnameVal + `${time(Number(tts()))}运行成功\n\n`) + $.message += githubACnameVal + `${time(Number(tts()))}运行成功\n\n` + } else { + console.log(githubACnameVal + `请检查github的Action是否开启\n\n`) + $.message += githubACnameVal + `请检查github的Action是否开启\n\n` } } catch (e) { $.logErr(e, resp); diff --git a/Task/githubACCOOKIE.js b/Task/githubACCOOKIE.js index 5e52a3f8..be44b858 100644 --- a/Task/githubACCOOKIE.js +++ b/Task/githubACCOOKIE.js @@ -1,9 +1,21 @@ -//独立COOKIE文件 ck在``里面填写,多js换行 +//独立COOKIE文件 ck在``里面填写,多js换行,不填也要换行 let githubACnameVal = `` let githubACurlVal = `` +let githubACheaderVal = `` +let githubACbodyVal = `` let HHAVal = `` let HHBVal = `` +let HHCVal = `` +let HHDVal = `` +let HHEVal = `` +let HHFVal = `` +let HHGVal = `` +let HHHVal = `` +let HHIVal = `` +let HHJVal = `` +let HHKVal = `` +let HHLVal = `` let MMAVal = `` let MMBVal = `` @@ -29,13 +41,23 @@ let githubACcookie = { HHAVal: HHAVal, HHBVal: HHBVal, + HHCVal: HHCVal, + HHDVal: HHDVal, + HHEVal: HHEVal, + HHFVal: HHFVal, + HHGVal: HHGVal, + HHHVal: HHHVal, + HHIVal: HHIVal, + HHJVal: HHJVal, + HHKVal: HHKVal, + HHLVal: HHLVal, MMAVal: MMAVal, MMBVal: MMBVal, MMCVal: MMCVal, MMDVal: MMDVal, MMEVal: MMEVal, MMFVal: MMFVal, - MMGVal: MMGVal, + MMGVal: MMGVal, MMHVal: MMHVal, MMIVal: MMIVal, MMJVal: MMJVal, diff --git a/Task/githubACck.js b/Task/githubACck.js index 97a473da..ac933630 100644 --- a/Task/githubACck.js +++ b/Task/githubACck.js @@ -21,6 +21,17 @@ const githubACbody = 1 const HHA=0 const HHB=0 +const HHC=0 +const HHD=0 +const HHE=0 +const HHF=0 +const HHG=0 +const HHH=0 +const HHI=0 +const HHJ=0 +const HHK=0 +const HHL=0 + const MMA=0 const MMB=0 const MMC=0 @@ -68,6 +79,37 @@ let middleHHA = []; const HHBArr = []; let HHBVal = ``; let middleHHB = []; +const HHCArr = []; +let HHCVal = ``; +let middleHHC = []; +const HHDArr = []; +let HHDVal = ``; +let middleHHD = []; +const HHEArr = []; +let HHEVal = ``; +let middleHHE = []; +const HHFArr = []; +let HHFVal = ``; +let middleHHF = []; +const HHGArr = []; +let HHGVal = ``; +let middleHHG = []; +const HHHArr = []; +let HHHVal = ``; +let middleHHH = []; +const HHIArr = []; +let HHIVal = ``; +let middleHHI = []; +const HHJArr = []; +let HHJVal = ``; +let middleHHJ = []; +const HHKArr = []; +let HHKVal = ``; +let middleHHK = []; +const HHLArr = []; +let HHLVal = ``; +let middleHHL = []; + const MMAArr = []; let MMAVal = ``; let middleMMA = []; @@ -113,6 +155,17 @@ let middleMML = []; githubACbodyArr.push($.getdata("githubACbody")); HHAArr.push($.getdata("HHA")); HHBArr.push($.getdata("HHB")); + HHCArr.push($.getdata("HHC")); + HHDArr.push($.getdata("HHD")); + HHEArr.push($.getdata("HHE")); + HHFArr.push($.getdata("HHF")); + HHGArr.push($.getdata("HHG")); + HHHArr.push($.getdata("HHH")); + HHIArr.push($.getdata("HHI")); + HHJArr.push($.getdata("HHJ")); + HHKArr.push($.getdata("HHK")); + HHLArr.push($.getdata("HHL")); + MMAArr.push($.getdata("MMA")); MMBArr.push($.getdata("MMB")); MMCArr.push($.getdata("MMC")); @@ -136,6 +189,17 @@ let middleMML = []; githubACbodyArr.push($.getdata(`githubACbody${i}`)); HHAArr.push($.getdata(`HHA${i}`)); HHBArr.push($.getdata(`HHB${i}`)); + HHCArr.push($.getdata(`HHC${i}`)); + HHDArr.push($.getdata(`HHD${i}`)); + HHEArr.push($.getdata(`HHE${i}`)); + HHFArr.push($.getdata(`HHF${i}`)); + HHGArr.push($.getdata(`HHG${i}`)); + HHHArr.push($.getdata(`HHH${i}`)); + HHIArr.push($.getdata(`HHI${i}`)); + HHJArr.push($.getdata(`HHJ${i}`)); + HHKArr.push($.getdata(`HHK${i}`)); + HHLArr.push($.getdata(`HHL${i}`)); + MMAArr.push($.getdata(`MMA${i}`)); MMBArr.push($.getdata(`MMB${i}`)); MMCArr.push($.getdata(`MMC${i}`)); @@ -194,6 +258,17 @@ if (Z==R) HHAVal = HHAArr[K-1]; HHBVal = HHBArr[K-1]; + HHCVal = HHCArr[K-1]; + HHDVal = HHDArr[K-1]; + HHEVal = HHEArr[K-1]; + HHFVal = HHFArr[K-1]; + HHGVal = HHGArr[K-1]; + HHHVal = HHHArr[K-1]; + HHIVal = HHIArr[K-1]; + HHJVal = HHJArr[K-1]; + HHKVal = HHKArr[K-1]; + HHLVal = HHLArr[K-1]; + MMAVal = MMAArr[K-1]; MMBVal = MMBArr[K-1]; MMCVal = MMCArr[K-1]; @@ -214,6 +289,17 @@ if(githubACbody==1)console.log(githubACbodyVal+GG) if(HHA==1)console.log(HHAVal+GG) if(HHB==1)console.log(HHBVal+GG) +if(HHC==1)console.log(HHCVal+GG) +if(HHD==1)console.log(HHDVal+GG) +if(HHE==1)console.log(HHEVal+GG) +if(HHF==1)console.log(HHFVal+GG) +if(HHG==1)console.log(HHGVal+GG) +if(HHH==1)console.log(HHHVal+GG) +if(HHI==1)console.log(HHIVal+GG) +if(HHJ==1)console.log(HHJVal+GG) +if(HHK==1)console.log(HHKVal+GG) +if(HHL==1)console.log(HHLVal+GG) + if(MMA==1)console.log(MMAVal+GG) if(MMB==1)console.log(MMBVal+GG) if(MMC==1)console.log(MMCVal+GG) diff --git a/Task/iboxpay.js b/Task/iboxpay.js index c1d7b495..5c2be7a4 100644 --- a/Task/iboxpay.js +++ b/Task/iboxpay.js @@ -37,9 +37,9 @@ boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye. 2.8-2 修复红包雨结束报错 2.8-3 增加通过验证码获取token功能,并且内置header,新人设置LIVE为888 2.8-4 修复错误 -2.9 修复时间戳错误 2.10 修复红包雨问题,LIVE设置3 启动红包雨活动,修复版本问题 - +2.10-2 移除红包雨模块 +2.11 移除视频时间限制,LIVE设置666做新人180秒任务 ⚠️一共1个位置 1个ck 👉 5条 Secrets 多账号换行 @@ -129,7 +129,7 @@ if ($.isNode()) { // 没有设置 XP_phone 则默认为 0 phone = process.env.XP_phone || 0; // 没有设置 XP_sms 则默认0 不获取TOKEN - sms = process.env.XP_sms || 0; + sms = process.env.XP_sms || 0 } if ($.isNode() && process.env.XP_refreshTOKEN) { @@ -184,14 +184,10 @@ if (!COOKIE.refreshtokenVal) { } } } - - if (refreshtokenArr == '') { - Length = 0 - } else Length = refreshtokenArr.length + Length = refreshtokenArr.length } - function GetCookie() { if ($request && $request.url.indexOf("nf-user-auth-web") >= 0) { const refreshtokenVal = JSON.parse($response.body).data.refreshToken @@ -223,9 +219,6 @@ if (LIVE == 1) { if (LIVE == 2) { console.log(`============ 看直播开启,看视频关闭 =============\n`); } -if (LIVE == 3) { - console.log(`============ 看直播开启,看视频开启,红包雨开启 =============\n`); -} if (sms >= 1) { console.log(`============ TOKEN获取开启 =============\n`); } @@ -270,7 +263,9 @@ function daytime(inputTime) { }; //时间戳格式化日期 function time(inputTime) { - var date = new Date(inputTime); + if ($.isNode()) { + var date = new Date(inputTime + 8 * 60 * 60 * 1000); + } else var date = new Date(inputTime); Y = date.getFullYear() + '-'; M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; D = date.getDate() + ' '; @@ -329,67 +324,58 @@ async function all() { O = (`${$.name + (i + 1)}🔔`); await console.log(`-------------------------\n\n🔔开始运行【${$.name+(i+1)}】`) - await refreshtoken(); //更新TOKEN - - if (LIVE == 3 && (nowTimes.getHours() === 12 || nowTimes.getHours() === 19 || nowTimes.getHours() === 21) && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 10)) { - HBY = 1 - await hbylq(); //红包雨领取 + await refreshtoken(); //更新TOKEN + let cookie_is_live = await user(i + 1); //用户名 + if (!cookie_is_live) { + continue; + } + await hdid(); //活动id + await goldcoin(); //金币信息 + await coin(); //账户信息 + await sylist(); //收益列表 + await splimit(); //视频上限 + await newcashlist(); //提现查询 + await cashlist(); //今日提现查询 + if (!cashcs.amount && CASH >= 1 && $.coin.data.balance / 100 >= CASH) { + await withdraw(); //提现 } - if (HBY == 0) { - let cookie_is_live = await user(i + 1); //用户名 - if (!cookie_is_live) { - continue; - } - - - await hdid(); //活动id - await goldcoin(); //金币信息 - await coin(); //账户信息 - await sylist(); //收益列表 - await splimit(); //视频上限 - await newcashlist(); //提现查询 - await cashlist(); //今日提现查询 - if (!cashcs.amount && CASH >= 1 && $.coin.data.balance / 100 >= CASH) { - await withdraw(); //提现 - } - - if (LIVE >= 1 && nowTimes.getHours() >= 8 && nowTimes.getHours() <= 23 && $.sylist.resultCode && livecs < 30) { - await liveslist(); //直播节目表 - if (liveIdcd >= 1) { - dd = liveIdcd * 35 - 34 - console.log(`📍本次直播运行需要${dd}秒` + '\n') + if (LIVE >= 1 && nowTimes.getHours() >= 8 && nowTimes.getHours() <= 23 && $.sylist.resultCode && livecs < 30) { + await liveslist(); //直播节目表 + if (liveIdcd >= 1) { + dd = liveIdcd * 35 - 34 + console.log(`📍本次直播运行需要${dd}秒` + '\n') - await lives(); //看直播 - await $.wait(dd * 1000) - } + await lives(); //看直播 + await $.wait(dd * 1000) } + } - if (nowTimes.getHours() <= 18 && (LIVE != 2 && $.splimit.data.isUperLimit == false || LIVE == 888)) { - - await playo(); //播放o - await videoo(); //视频o - - if (LIVES != 2) { - await $.wait(30000) - tt = CS * 30 - 29 - console.log(`📍本次视频运行需要${tt}秒` + '\n') - await play(); //播放 - await video(); //视频 - await $.wait(tt * 1000) - if (!newcashcs.amount) { - await newvideo(); //新人福利 - } - if ($.video.data && $.video.data.goldCoinNumber != 0 && videoPublishId6) { - await goldvideo(); //金蛋视频 - } + if ( LIVE != 2 && $.splimit.data.isUperLimit == false || LIVE == 888) { + await playo(); //播放o + await videoo(); //视频o + if (LIVES != 2) { + await $.wait(30000) + tt = CS * 30 - 29 + console.log(`📍本次视频运行需要${tt}秒` + '\n') + await play(); //播放 + await video(); //视频 + await $.wait(tt * 1000) + if (LIVE == 666) { + await newvideo(); //新人福利 } + if ($.video.data && $.video.data.goldCoinNumber != 0 && videoPublishId6) { + await goldvideo(); //金蛋视频 + } + } + } + } } //通知 @@ -431,7 +417,7 @@ function getTOKEN(timeout = 0) { "source": "VEISHOP_APP_IOS", "User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )", "X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )", - "traceid": "300000000000000000000000000000000000000000000", + "traceid": "30000000000000000000" + tts() + "000000000000", "Host": "veishop.iboxpay.com", "Accept-Language": "zh-Hans-CN;q=1", "Accept": "*/*" @@ -631,65 +617,7 @@ function hdid(timeout = 0) { $.message += '【' + spid.actName + 'ID】:' + spid.actId + '\n' + '【' + zbid.actName + 'ID】:' + zbid.actId + '\n'; } - if ($.hdid.resultCode == 1 && $.hdid.data.everyDayActivityList.find(item => item.actTypeId === 11)) { - hbyid = $.hdid.data.everyDayActivityList.find(item => item.actTypeId === 11) - console.log(hbyid.actName + 'ID:' + hbyid.actId + '\n'); - $.message += '【' + hbyid.actName + 'ID】:' + hbyid.actId + '\n'; - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve() - } - }) - }, timeout) - }) -} -//红包雨领取 -function hbylq(timeout = 0) { - return new Promise((resolve) => { - setTimeout(() => { - - hbylqbodyVal = `{ - "actId": "319" -}` - let url = { - url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/v1/give_redbag_by_redbag_rain.json`, - headers: { - "Connection": "keep-alive", - "Accept-Encoding": "gzip, deflate, br", - "version": "1.4.8", - "mchtNo": "100529600058887", - "Content-Type": "application/json; charset=utf-8", - "source": "VEISHOP_APP_IOS", - "shopkeeperId": "1148855820752977920", - "User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )", - "token": `${TOKEN}`, - "X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )", - "traceid": "30000000000000000000" + tts() + "000000000000", - "Host": "veishop.iboxpay.com", - "Accept-Language": "zh-Hans-CN;q=1", - "Accept": "*/*" - }, - body: hbylqbodyVal, - } - $.post(url, async (err, resp, data) => { - try { - if (logs) $.log(`${O}, 红包雨领取🚩: ${data}`); - $.hbylq = JSON.parse(data); - if ($.hbylq.resultCode == 1 && $.hbylq.data.goldCoinAmt != 0) { - console.log(`${O} 红包雨领取:本次领取 ${$.hbylq.data.goldCoinAmt}金币,预估金额${$.hbylq.data.goldCoinAmt / 10000} 元\n`) - $.message += `【${O} 红包雨领取】:本次领取 ${$.hbylq.data.goldCoinAmt}金币,预估金额${$.hbylq.data.goldCoinAmt / 10000} 元\n` - } - if ($.hbylq.resultCode == 1 && $.hbylq.data.goldCoinAmt == 0) { - console.log(`${O} 红包雨领取:${$.hbylq.data.redbagDesc}\n`) - $.message += `【${O} 红包雨领取】:${$.hbylq.data.redbagDesc}\n`; - } - if ($.hbylq.resultCode == 0) { - console.log(`${O} 红包雨领取:${$.hbylq.errorDesc}\n`); - $.message += `【${O} 红包雨领取】:${$.hbylq.errorDesc}\n`; - } } catch (e) { $.logErr(e, resp); } finally { @@ -699,6 +627,7 @@ function hbylq(timeout = 0) { }, timeout) }) } + //账户信息 function coin(timeout = 0) { return new Promise((resolve) => { diff --git a/Task/zhima.js b/Task/zhima.js new file mode 100644 index 00000000..23551c5b --- /dev/null +++ b/Task/zhima.js @@ -0,0 +1,760 @@ +/* ziye +github地址 https://github.com/*ziye12 +TG频道地址 https://t.me/ziyescript +TG交流群 https://t.me/joinchat/AAAAAE7XHm-q1-7Np-tF3g +boxjs链接 https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/ziye.boxjs.json +转载请备注个名字,谢谢 + +⚠️芝嫲视频 + + +2.13 制作 +2.15 修复刷新问题,修复部分问题,点夺宝获取ck + +⚠️一共1个位置 1个ck 👉 1条 Secrets +多账号换行 + +点击 https://h5.sxsjyzm.com/sesameH5/public/sesameLogin/register.html?onlyid=612545154 下载APP + +或者商店搜索 芝嫲视频 邀请码612545154 + +谢谢支持 + + +第一步 添加 hostname=api.sxsjyzm.com, + +第二步 添加body重写 + +点击夺宝 获取body + + +zhimabodyVal 👉ZM_zhimabody + + + +⚠️主机名以及重写👇 + +时间建议设置一小时一次 如 0 * * * * + +hostname=api.sxsjyzm.com, + + + +############## 圈x + +#芝嫲视频获取body +https:\/\/api\.sxsjyzm\.com\/* url script-request-body https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/zhima.js + +############## loon +#芝嫲视频获取body +http-request https:\/\/api\.sxsjyzm\.com\/* script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/zhima.js,requires-body=true, tag=芝嫲视频获取body + +############## surge + +#芝嫲视频获取body +芝嫲视频获取body = type=http-request,pattern=https:\/\/api\.sxsjyzm\.com\/*,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/zhima.js + + + + +*/ + + + + +const $ = Env("芝嫲视频"); +$.idx = ($.idx = ($.getval('zhimaSuffix') || '1') - 1) > 0 ? ($.idx + 1 + '') : ''; // 账号扩展字符 +const notify = $.isNode() ? require("./sendNotify") : ``; +const COOKIE = $.isNode() ? require("./zhimaCOOKIE") : ``; +const logs = 0; // 0为关闭日志,1为开启 +const notifyttt = 1 // 0为关闭外部推送,1为12 23 点外部推送 +const notifyInterval = 2; // 0为关闭通知,1为所有通知,2为12 23 点通知 , 3为 6 12 18 23 点通知 +$.message = '', COOKIES_SPLIT = '', ddtime = ''; +const zhimabodyArr = []; +let zhimabodyVal = ``; +let middlezhimabody = []; + + + + + +if ($.isNode() && process.env.ZM_zhimabody) { + COOKIES_SPLIT = process.env.COOKIES_SPLIT || "\n"; + console.log( + `============ cookies分隔符为:${JSON.stringify( + COOKIES_SPLIT + )} =============\n` + ); + if ( + process.env.ZM_zhimabody && + process.env.ZM_zhimabody.indexOf(COOKIES_SPLIT) > -1 + ) { + middlezhimabody = process.env.ZM_zhimabody.split(COOKIES_SPLIT); + } else { + middlezhimabody = process.env.ZM_zhimabody.split(); + } + +} +if (COOKIE.zhimabodyArr) { + ZM_COOKIES = { + "zhimabodyVal": COOKIE.zhimabodyVal.split('\n'), + + + + } + Length = ZM_COOKIES.zhimabodyArr.length; +} +if (!COOKIE.zhimabodyArr) { + if ($.isNode()) { + Object.keys(middlezhimabody).forEach((item) => { + if (middlezhimabody[item]) { + zhimabodyArr.push(middlezhimabody[item]); + } + }); + + } else { + zhimabodyArr.push($.getdata("zhimabody")); + + // 根据boxjs中设置的额外账号数,添加存在的账号数据进行任务处理 + + let zhimaCount = ($.getval('zhimaCount') || '1') - 0; + for (let i = 2; i <= zhimaCount; i++) { + if ($.getdata(`zhimabody${i}`)) { + zhimabodyArr.push($.getdata(`zhimabody${i}`)); + + + + } + } + } + + +if (zhimabodyArr == '') { + Length = 0 + } else Length = zhimabodyArr.length + + +} + + + + +function GetCookie() { + if ($request && $request.url.indexOf("loot") >= 0 && $request.url.indexOf("index") >= 0) { + const zhimabodyVal = $request.body; + if (zhimabodyVal) $.setdata(zhimabodyVal, "zhimabody" + $.idx); + $.log( + `[${$.name + $.idx}] 获取zhimabodyVal✅: 成功,zhimabodyVal: ${zhimabodyVal}` + ); + $.msg($.name + $.idx, `获取zhimabodyVal: 成功🎉`, ``); + + + + + } + +} +console.log( + `================== 脚本执行 - 北京时间(UTC+8):${new Date( + new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000 + ).toLocaleString()} =====================\n` +); +console.log( + `============ 共 ${Length} 个${$.name}账号=============\n` +); + + +//时间 +nowTimes = new Date( + new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000 +); +//今天 +Y = nowTimes.getFullYear() + '-'; +M = (nowTimes.getMonth() + 1 < 10 ? '0' + (nowTimes.getMonth() + 1) : nowTimes.getMonth() + 1) + '-'; +D = (nowTimes.getDate() + 1 < 10 ? '0' + (nowTimes.getDate()) : nowTimes.getMonth()); +ddtime = Y + M + D; +console.log(ddtime) + +function tts(inputTime) { + if ($.isNode()) { + TTS = Math.round(new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000).toString(); + } else TTS = Math.round(new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000).toString(); + return TTS; +}; + + + +//当前10位时间戳 +function ts(inputTime) { + if ($.isNode()) { + TS = Math.round((new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000) / 1000).toString(); + } else TS = Math.round((new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000) / 1000).toString(); + return TS; +}; +//今天0点时间戳时间戳 +function daytime(inputTime) { + if ($.isNode()) { + DAYTIME = + new Date(new Date().toLocaleDateString()).getTime() - 8 * 60 * 60 * 1000; + } else DAYTIME = new Date(new Date().toLocaleDateString()).getTime(); + return DAYTIME; +}; +//时间戳格式化日期 +function time(inputTime) { + + if ($.isNode()) { + var date = new Date(inputTime + 8 * 60 * 60 * 1000); + } else var date = new Date(inputTime); + + + Y = date.getFullYear() + '-'; + M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; + D = date.getDate() + ' '; + h = date.getHours() + ':'; + m = date.getMinutes() + ':'; + s = date.getSeconds(); + return Y + M + D + h + m + s; +}; +let isGetCookie = typeof $request !== 'undefined' +if (isGetCookie) { + GetCookie() + $.done(); +} else { + !(async () => { + await all(); + //await $.wait(1000); + await msgShow(); + })() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +} +async function all() { + if (!Length) { + $.msg( + $.name, + '提示:⚠️请点击前往获取CK https://h5.sxsjyzm.com/sesameH5/public/sesameLogin/register.html?onlyid=612545154\n', + 'https://h5.sxsjyzm.com/sesameH5/public/sesameLogin/register.html?onlyid=612545154', { + "open-url": "https://h5.sxsjyzm.com/sesameH5/public/sesameLogin/register.html?onlyid=612545154" + } + ); + return; + } + for (let i = 0; i < Length; i++) { + + if (COOKIE.zhimabodyVal) { + zhimabodyVal = ZM_COOKIES.zhimabodyVal[i]; + + } + if (!COOKIE.zhimabodyVal) { + zhimabodyVal = zhimabodyArr[i]; + + } + + + O = (`${$.name + (i + 1)}🔔`); + await console.log(`-------------------------\n\n🔔开始运行【${$.name+(i+1)}】`) + + +console.log(`\n${O}\n========== 【${O}】 ==========\n`); + $.message += `\n${O}\n========== 【${O}】 ==========\n`; + + await zhima(); //运行 + + + + } +} +//通知 +function msgShow() { + return new Promise(async resolve => { + if (notifyInterval != 1) { + console.log($.name + '\n' + $.message); + } + if (notifyInterval == 1) { + $.msg($.name, ``, $.message); + } + if (notifyInterval == 2 && (nowTimes.getHours() === 12 || nowTimes.getHours() === 23) && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 10)) { + $.msg($.name, ``, $.message); + } + if (notifyInterval == 3 && (nowTimes.getHours() === 6 || nowTimes.getHours() === 12 || nowTimes.getHours() === 18 || nowTimes.getHours() === 23) && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 10)) { + $.msg($.name, ``, $.message); + } + if (notifyttt == 1 && $.isNode() && (nowTimes.getHours() === 12 || nowTimes.getHours() === 23) && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 10)) + await notify.sendNotify($.name, $.message); + resolve() + }) +} + + + +//zhimasx +function zhimasx(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + + + let url = { + url: `https://api.sxsjyzm.com/api2/loot/index`, + headers: { +'Accept' : `*/*`, +'wToken' : ``, +'Accept-Encoding' : `gzip, deflate, br`, +'Content-Type' : `application/x-www-form-urlencoded`, +'Connection' : `keep-alive`, +'Host' : `api.sxsjyzm.com`, +'User-Agent' : `APP/4.7 CFNetwork/1206 Darwin/20.1.0`, +'Accept-Language' : `zh-cn` +}, + body: zhimabodyVal, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 芝嫲刷新🚩: ${data}`); + +$.zhimasx= JSON.parse(data); + + if ($.zhimasx.code==200) { + + console.log(`【芝麻刷新】:刷新成功\n`) + $.message +=`【芝麻刷新】:刷新成功\n` + + } + + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} + + + + + + +//zhima +function zhima(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + + + let url = { + url: `https://api.sxsjyzm.com/api2/loot/quickgetloot`, + headers: { +'Accept' : `*/*`, +'wToken' : ``, +'Accept-Encoding' : `gzip, deflate, br`, +'Content-Type' : `application/x-www-form-urlencoded`, +'Connection' : `keep-alive`, +'Host' : `api.sxsjyzm.com`, +'User-Agent' : `APP/4.7 CFNetwork/1206 Darwin/20.1.0`, +'Accept-Language' : `zh-cn` +}, + body: zhimabodyVal, + } + $.post(url, async (err, resp, data) => { + try { + if (logs) $.log(`${O}, 芝嫲收晶石🚩: ${data}`); + +$.zhima= JSON.parse(data); + + if ($.zhima.code==200) { + + console.log(`【晶石收取】:${time(Number(tts()))}领取晶石成功,等待11秒后进行下次收取\n\n`) + $.message +=`【晶石收取】:${time(Number(tts()))}领取晶石成功,等待11秒后进行下次收取\n\n` + +await zhimasx() +await $.wait(11000) +await zhima() + + } + +if ($.zhima.code==1001) { + + console.log(`【晶石收取】:${$.zhima.mess},间隔11秒才能收取\n\n`) + $.message +=`【晶石收取】:${$.zhima.mess},间隔11秒才能收取\n\n` + + } + +if ($.zhima.code==1002) { + + console.log(`【晶石收取】:${$.zhima.mess},间隔3小时才能收取\n\n`) + $.message +=`【晶石收取】:${$.zhima.mess},间隔3小时才能收取\n\n` + + } + + +if ($.zhima.code==156) { + + console.log(`【晶石收取】:${$.zhima.mess}\n\n`) + $.message +=`【晶石收取】:${$.zhima.mess}\n\n` + + } + + + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + + }, timeout) + }) +} + +// prettier-ignore +function Env(t, e) { + 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(``, `\ud83d\udd14${this.name}, \u5f00\u59cb!`) + } + 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("@"), a = { + url: `http://${h}/v1/scripting/evaluate`, + body: { + script_text: t, + mock_type: "cron", + timeout: r + }, + headers: { + "X-Key": o, + Accept: "*/*" + } + }; + this.post(a, (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"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + }); + else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t) { + let e = { + "M+": (new Date).getMonth() + 1, + "d+": (new Date).getDate(), + "H+": (new Date).getHours(), + "m+": (new Date).getMinutes(), + "s+": (new Date).getSeconds(), + "q+": Math.floor(((new Date).getMonth() + 3) / 3), + S: (new Date).getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + ``).substr(4 - RegExp.$1.length))); + for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr((`` + e[s]).length))); + return t + } + msg(e = t, s = ``, i = ``, r) { + const o = t => { + if (!t) return t; + if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } : this.isSurge() ? { + url: t + } : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); + let h = [``, "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; + h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h) + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log(``, `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log(``, `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log(``, `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} diff --git a/Task/zhima.png b/Task/zhima.png new file mode 100644 index 00000000..a609187f Binary files /dev/null and b/Task/zhima.png differ diff --git a/Task/zhimaCOOKIE.js b/Task/zhimaCOOKIE.js new file mode 100644 index 00000000..72f7a1cc --- /dev/null +++ b/Task/zhimaCOOKIE.js @@ -0,0 +1,16 @@ + + +//独立COOKIE文件 ck在``里面填写,多账号换行 + +let zhimabodyVal= `` + + +let zhimacookie = { + + zhimabodyVal: zhimabodyVal, + +} + +module.exports = zhimacookie + + diff --git a/Task/ziye.boxjs.json b/Task/ziye.boxjs.json index 7883ae18..c7fcfb6f 100644 --- a/Task/ziye.boxjs.json +++ b/Task/ziye.boxjs.json @@ -90,7 +90,7 @@ "name": "任务控制", "val": "0", "type": "number", - "desc": "0开启视频,关闭直播,1开启直播,开启视频,2开启直播,关闭视频,3开启直播,开启视频,开启红包雨 " + "desc": "0开启视频,关闭直播,1开启直播,开启视频,2开启直播,关闭视频,666开启直播,开启视频,开启新人180秒任务,888开启直播,开启视频,开启新人2天双倍 " }, { "id": "iboxpayCASH", @@ -159,7 +159,7 @@ { "id": "githubAC", "name": "githubAC", - "keys": ["githubACname", "githubACurl", "githubACheader", "githubACbody", "HHA", "HHB", "MMA", "MMB", "MMC", "MMD", "MME", "MMF", "MMG", "MMH", "MMI", "MMJ", "MMK", "MML", "githubACname2", "githubACurl2", "githubACheader2", "githubACbody2", "HHA2", "HHB2", "MMA2", "MMB2", "MMC2", "MMD2", "MME2", "MMF2", "MMG2", "MMH2", "MMI2", "MMJ2", "MMK2", "MML2", "githubACname3", "githubACurl3", "githubACheader3", "githubACbody3", "HHA3", "HHB3", "MMA3", "MMB3", "MMC3", "MMD3", "MME3", "MMF3", "MMG3", "MMH3", "MMI3", "MMJ3", "MMK3", "MML3", "githubACname4", "githubACurl4", "githubACheader4", "githubACbody4", "HHA4", "HHB4", "MMA4", "MMB4", "MMC4", "MMD4", "MME4", "MMF4", "MMG4", "MMH4", "MMI4", "MMJ4", "MMK4", "MML4", "githubACname5", "githubACurl5", "githubACheader5", "githubACbody5", "HHA5", "HHB5", "MMA5", "MMB5", "MMC5", "MMD5", "MME5", "MMF5", "MMG5", "MMH5", "MMI5", "MMJ5", "MMK5", "MML5", "githubACname6", "githubACurl6", "githubACheader6", "githubACbody6", "HHA6", "HHB6", "MMA6", "MMB6", "MMC6", "MMD6", "MME6", "MMF6", "MMG6", "MMH6", "MMI6", "MMJ6", "MMK6", "MML6", "githubACname7", "githubACurl7", "githubACheader7", "githubACbody7", "HHA7", "HHB7", "MMA7", "MMB7", "MMC7", "MMD7", "MME7", "MMF7", "MMG7", "MMH7", "MMI7", "MMJ7", "MMK7", "MML7", "githubACname8", "githubACurl8", "githubACheader8", "githubACbody8", "HHA8", "HHB8", "MMA8", "MMB8", "MMC8", "MMD8", "MME8", "MMF8", "MMG8", "MMH8", "MMI8", "MMJ8", "MMK8", "MML8", "githubACname9", "githubACurl9", "githubACheader9", "githubACbody9", "HHA9", "HHB9", "MMA9", "MMB9", "MMC9", "MMD9", "MME9", "MMF9", "MMG9", "MMH9", "MMI9", "MMJ9", "MMK9", "MML9", "githubACname10", "githubACurl10", "githubACheader10", "githubACbody10", "HHA10", "HHB10", "MMA10", "MMB10", "MMC10", "MMD10", "MME10", "MMF10", "MMG10", "MMH10", "MMI10", "MMJ10", "MMK10", "MML10", "githubACname11", "githubACurl11", "githubACheader11", "githubACbody11", "HHA11", "HHB11", "MMA11", "MMB11", "MMC11", "MMD11", "MME11", "MMF11", "MMG11", "MMH11", "MMI11", "MMJ11", "MMK11", "MML11", "githubACname12", "githubACurl12", "githubACheader12", "githubACbody12", "HHA12", "HHB12", "MMA12", "MMB12", "MMC12", "MMD12", "MME12", "MMF12", "MMG12", "MMH12", "MMI12", "MMJ12", "MMK12", "MML12", "githubACname13", "githubACurl13", "githubACheader13", "githubACbody13", "HHA13", "HHB13", "MMA13", "MMB13", "MMC13", "MMD13", "MME13", "MMF13", "MMG13", "MMH13", "MMI13", "MMJ13", "MMK13", "MML13", "githubACname14", "githubACurl14", "githubACheader14", "githubACbody14", "HHA14", "HHB14", "MMA14", "MMB14", "MMC14", "MMD14", "MME14", "MMF14", "MMG14", "MMH14", "MMI14", "MMJ14", "MMK14", "MML14", "githubACname15", "githubACurl15", "githubACheader15", "githubACbody15", "HHA15", "HHB15", "MMA15", "MMB15", "MMC15", "MMD15", "MME15", "MMF15", "MMG15", "MMH15", "MMI15", "MMJ15", "MMK15", "MML15", "githubACname16", "githubACurl16", "githubACheader16", "githubACbody16", "HHA16", "HHB16", "MMA16", "MMB16", "MMC16", "MMD16", "MME16", "MMF16", "MMG16", "MMH16", "MMI16", "MMJ16", "MMK16", "MML16", "githubACname17", "githubACurl17", "githubACheader17", "githubACbody17", "HHA17", "HHB17", "MMA17", "MMB17", "MMC17", "MMD17", "MME17", "MMF17", "MMG17", "MMH17", "MMI17", "MMJ17", "MMK17", "MML17", "githubACname18", "githubACurl18", "githubACheader18", "githubACbody18", "HHA18", "HHB18", "MMA18", "MMB18", "MMC18", "MMD18", "MME18", "MMF18", "MMG18", "MMH18", "MMI18", "MMJ18", "MMK18", "MML18", "githubACname19", "githubACurl19", "githubACheader19", "githubACbody19", "HHA19", "HHB19", "MMA19", "MMB19", "MMC19", "MMD19", "MME19", "MMF19", "MMG19", "MMH19", "MMI19", "MMJ19", "MMK19", "MML19", "githubACname20", "githubACurl20", "githubACheader20", "githubACbody20", "HHA20", "HHB20", "MMA20", "MMB20", "MMC20", "MMD20", "MME20", "MMF20", "MMG20", "MMH20", "MMI20", "MMJ20", "MMK20", "MML20"], + "keys": ["githubACname", "githubACurl", "githubACheader", "githubACbody", "HHA", "HHB", "HHC", "HHD", "HHE", "HHF", "HHG", "HHH", "HHI", "HHJ", "HHK", "HHL", "MMA", "MMB", "MMC", "MMD", "MME", "MMF", "MMG", "MMH", "MMI", "MMJ", "MMK", "MML", "githubACname2", "githubACurl2", "githubACheader2", "githubACbody2", "HHA2", "HHB2", "HHC2", "HHD2", "HHE2", "HHF2", "HHG2", "HHH2", "HHI2", "HHJ2", "HHK2", "HHL2", "MMA2", "MMB2", "MMC2", "MMD2", "MME2", "MMF2", "MMG2", "MMH2", "MMI2", "MMJ2", "MMK2", "MML2", "githubACname3", "githubACurl3", "githubACheader3", "githubACbody3", "HHA3", "HHB3", "HHC3", "HHD3", "HHE3", "HHF3", "HHG3", "HHH3", "HHI3", "HHJ3", "HHK3", "HHL3", "MMA3", "MMB3", "MMC3", "MMD3", "MME3", "MMF3", "MMG3", "MMH3", "MMI3", "MMJ3", "MMK3", "MML3", "githubACname4", "githubACurl4", "githubACheader4", "githubACbody4", "HHA4", "HHB4", "HHC4", "HHD4", "HHE4", "HHF4", "HHG4", "HHH4", "HHI4", "HHJ4", "HHK4", "HHL4", "MMA4", "MMB4", "MMC4", "MMD4", "MME4", "MMF4", "MMG4", "MMH4", "MMI4", "MMJ4", "MMK4", "MML4", "githubACname5", "githubACurl5", "githubACheader5", "githubACbody5", "HHA5", "HHB5", "HHC5", "HHD5", "HHE5", "HHF5", "HHG5", "HHH5", "HHI5", "HHJ5", "HHK5", "HHL5", "MMA5", "MMB5", "MMC5", "MMD5", "MME5", "MMF5", "MMG5", "MMH5", "MMI5", "MMJ5", "MMK5", "MML5", "githubACname6", "githubACurl6", "githubACheader6", "githubACbody6", "HHA6", "HHB6", "HHC6", "HHD6", "HHE6", "HHF6", "HHG6", "HHH6", "HHI6", "HHJ6", "HHK6", "HHL6", "MMA6", "MMB6", "MMC6", "MMD6", "MME6", "MMF6", "MMG6", "MMH6", "MMI6", "MMJ6", "MMK6", "MML6", "githubACname7", "githubACurl7", "githubACheader7", "githubACbody7", "HHA7", "HHB7", "HHC7", "HHD7", "HHE7", "HHF7", "HHG7", "HHH7", "HHI7", "HHJ7", "HHK7", "HHL7", "MMA7", "MMB7", "MMC7", "MMD7", "MME7", "MMF7", "MMG7", "MMH7", "MMI7", "MMJ7", "MMK7", "MML7", "githubACname8", "githubACurl8", "githubACheader8", "githubACbody8", "HHA8", "HHB8", "HHC8", "HHD8", "HHE8", "HHF8", "HHG8", "HHH8", "HHI8", "HHJ8", "HHK8", "HHL8", "MMA8", "MMB8", "MMC8", "MMD8", "MME8", "MMF8", "MMG8", "MMH8", "MMI8", "MMJ8", "MMK8", "MML8", "githubACname9", "githubACurl9", "githubACheader9", "githubACbody9", "HHA9", "HHB9", "HHC9", "HHD9", "HHE9", "HHF9", "HHG9", "HHH9", "HHI9", "HHJ9", "HHK9", "HHL9", "MMA9", "MMB9", "MMC9", "MMD9", "MME9", "MMF9", "MMG9", "MMH9", "MMI9", "MMJ9", "MMK9", "MML9", "githubACname10", "githubACurl10", "githubACheader10", "githubACbody10", "HHA10", "HHB10", "HHC10", "HHD10", "HHE10", "HHF10", "HHG10", "HHH10", "HHI10", "HHJ10", "HHK10", "HHL10", "MMA10", "MMB10", "MMC10", "MMD10", "MME10", "MMF10", "MMG10", "MMH10", "MMI10", "MMJ10", "MMK10", "MML10"], "author": "@ziye", "settings": [{ "id": "githubACSuffix", @@ -183,7 +183,7 @@ { "id": "duokandian", "name": "多看点APP", - "keys": ["duokandianbody", "duokandianbody2", "duokandianbody3", "duokandianbody4", "duokandianbody5", "duokandianbody6", "duokandianbody7", "duokandianbody8", "duokandianbody9", "duokandianbody10", "duokandianbody11", "duokandianbody12", "duokandianbody13", "duokandianbody14", "duokandianbody15", "duokandianbody16", "duokandianbody17", "duokandianbody18", "duokandianbody19", "duokandianbody20"], + "keys": ["duokandianbody", "duokandianvideobody","duokandianbody2", "duokandianvideobody2","duokandianbody3", "duokandianvideobody3","duokandianbody4", "duokandianvideobody4","duokandianbody5", "duokandianvideobody5","duokandianbody6", "duokandianvideobody6","duokandianbody7", "duokandianvideobody7","duokandianbody8", "duokandianvideobody8","duokandianbody9", "duokandianvideobody9","duokandianbody10", "duokandianvideobody10","duokandianbody11", "duokandianvideobody11","duokandianbody12", "duokandianvideobody12","duokandianbody13", "duokandianvideobody13","duokandianbody14", "duokandianvideobody14","duokandianbody15", "duokandianvideobody15","duokandianbody16", "duokandianvideobody16","duokandianbody17", "duokandianvideobody17","duokandianbody18", "duokandianvideobody18","duokandianbody19", "duokandianvideobody19","duokandianbody20", "duokandianvideobody20"], "author": "@ziye", "settings": [{ "id": "duokandianSuffix", @@ -210,6 +210,30 @@ "repo": "https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js", "icons": ["https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.png", "https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.png"], "script": "https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/duokandian.js" + }, + { + "id": "zhima", + "name": "芝嫲视频", + "keys": ["zhimabody", "zhimabody2", "zhimabody3", "zhimabody4", "zhimabody5", "zhimabody6", "zhimabody7", "zhimabody8", "zhimabody9", "zhimabody10", "zhimabody11", "zhimabody12", "zhimabody13", "zhimabody14", "zhimabody15", "zhimabody16", "zhimabody17", "zhimabody18", "zhimabody19", "zhimabody20"], + "author": "@ziye", + "settings": [{ + "id": "zhimaSuffix", + "name": "当前账号", + "val": "1", + "type": "number", + "desc": "当前抓取ck记录的账号序号,如:1、2、3、" + }, + { + "id": "zhimaCount", + "name": "账号个数", + "val": "1", + "type": "number", + "desc": "指定任务最多跑几个账号,根据抓取的账号数据个数来设值" + } + ], + "repo": "https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/zhima.js", + "icons": ["https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/zhima.png", "https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/zhima.png"], + "script": "https://raw.githubusercontent.com/ziye12/JavaScript/main/Task/zhima.js" } ] }