From 51df830cc92a8e4c15df3a6a741bbd931b561460 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Thu, 12 Nov 2020 16:04:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=A0=E6=B1=AA=E6=B1=AA?= =?UTF-8?q?=E8=8E=B7=E5=8F=96token=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_joy_run.js | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/jd_joy_run.js b/jd_joy_run.js index 821e3d96..9f3f4255 100644 --- a/jd_joy_run.js +++ b/jd_joy_run.js @@ -9,27 +9,30 @@ 1、微信搜索'来客有礼'小程序,登陆京东账号,点击底部的'我的'或者'发现'两处地方,即可获取Token,脚本运行提示token失效后,继续按此方法获取即可 2、或者每天去'来客有礼'小程序->宠汪汪里面,领狗粮->签到领京豆 也可获取Token(此方法每天只能获取一次) 脚本里面有内置提供的friendPin,如果你没有修改脚本或者BoxJs处填写自己的互助码,会默认给脚本内置的助力。 - [MITM] - hostname = draw.jdfcloud.com - surge - [Script] - 宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js - 宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+&, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js - 宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+&, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js - 圈X - [task_local] - # 宠汪汪邀请助力与赛跑助力 - 15 10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true - [rewrite_local] - # 宠汪汪助力更新Token - ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+& url script-response-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js - # 宠汪汪助力获取Token - ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+& url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js - LOON: - [Script] - cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 - http-response ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+& script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token - http-request ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+& script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token +[MITM] +hostname = draw.jdfcloud.com + +Surge +[Script] +宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js +宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js +宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js + +圈X +[task_local] +# 宠汪汪邀请助力与赛跑助力 +15 10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true +[rewrite_local] +# 宠汪汪助力更新Token +^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code= url script-response-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js +# 宠汪汪助力获取Token +^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId= url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js + +*****Loon**** +[Script] +cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 +http-response ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token +http-request ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token **/ const isRequest = typeof $request != "undefined" const $ = new Env('来客有礼宠汪汪'); @@ -101,7 +104,7 @@ if ($.isNode()) { function getToken() { const url = $request.url; $.log(`${$.name}url\n${url}\n`) - if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+&/)) { + if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=/)) { const body = JSON.parse($response.body); const LKYLToken = body.data.token; $.log(`${$.name} token\n${LKYLToken}\n`) @@ -112,7 +115,7 @@ function getToken() { } $.setdata(LKYLToken, 'jdJoyRunToken'); $.done({ body: JSON.stringify(body) }) - } else if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+&/)){ + } else if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=/)){ if ($request && $request.method !== 'OPTIONS') { const LKYLToken = $request.headers['LKYLToken']; //if ($.getdata('jdJoyRunToken')) {