├── Getwskey.conf ├── LICENSE ├── NeteaseMusic.conf ├── QuantumultX_Cookie.conf ├── QuantumultX_JS.conf ├── QuantumultX_Task.json ├── QuantumultX_diy.conf ├── README.md ├── Rules ├── Advertising.list ├── Cryptocurrency ├── Hijacking.list ├── Streaming.list ├── Tracking.list └── Unbreak.list ├── TikTok_ShadowRocket ├── JP.conf ├── KR.conf ├── TW.conf └── US.conf ├── chavyleung ├── 10000 │ ├── 10000.cookie.js │ ├── 10000.js │ └── README.md ├── 10010 │ ├── 10010.cookie.js │ ├── 10010.js │ └── README.md ├── 10086 │ ├── 10086.cookie.js │ ├── 10086.fee.cookie.js │ ├── 10086.fee.js │ ├── 10086.js │ └── README.md ├── BOXJS.png ├── BoxJS.gif ├── Env.js ├── Env.min.js ├── LICENSE ├── QuantumultX.box.local.conf ├── QuantumultX.box.remote.conf ├── QuantumultX_AppStore_Local_Cookie.conf ├── QuantumultX_Local_Cookie.conf ├── QuantumultX_Local_Task.conf ├── QuantumultX_Remote_Task.conf ├── README.md ├── acfun │ ├── README.md │ ├── acfun.cookie.js │ └── acfun.js ├── apktw │ ├── README.md │ ├── apktw.cookie.js │ └── apktw.js ├── bcz │ ├── README.md │ ├── bcz.cookie.js │ └── bcz.js ├── bilibili │ ├── README.md │ ├── bilibili.cookie.js │ ├── bilibili.js │ └── bilibili.silver2coin.js ├── box │ ├── chavy.boxjs.html │ ├── chavy.boxjs.js │ ├── chavy.boxjs.json │ ├── icons │ │ ├── BoxJs.png │ │ ├── BoxSetting.mini.png │ │ ├── BoxSetting.png │ │ ├── BoxSwitcher.mini.png │ │ └── BoxSwitcher.png │ ├── release │ │ ├── box.release.json │ │ └── box.release.tf.json │ ├── rewrite │ │ ├── boxjs.rewrite.loon.conf │ │ ├── boxjs.rewrite.loon.tf.plugin │ │ ├── boxjs.rewrite.quanx.conf │ │ ├── boxjs.rewrite.quanx.tf.conf │ │ ├── boxjs.rewrite.surge.sgmodule │ │ └── boxjs.rewrite.surge.tf.sgmodule │ └── switcher │ │ └── box.switcher.js ├── bubei │ ├── README.md │ └── bubei.js ├── chavy.box.js ├── chavy.js ├── csdn │ ├── README.md │ ├── csdn.cookie.js │ └── csdn.js ├── dbsj │ ├── README.md │ ├── dbsj.cookie.js │ └── dbsj.js ├── dongqiudi │ ├── README.md │ ├── dongqiudi.cookie.js │ └── dongqiudi.js ├── duokan │ ├── README.md │ ├── duokan.cookie.js │ └── duokan.js ├── everphoto │ ├── README.md │ ├── everphoto.cookie.js │ └── everphoto.js ├── fandeng │ ├── README.md │ ├── fandeng.cookie.js │ └── fandeng.js ├── feng │ ├── README.md │ ├── feng.cookie.js │ └── feng.js ├── fenqile │ ├── README.md │ ├── fenqile.cookie.js │ └── fenqile.js ├── flyertea │ ├── README.md │ ├── flyertea.cookie.js │ └── flyertea.js ├── gdoil │ ├── README.md │ ├── gdoil.cookie.js │ └── gdoil.js ├── haidilao │ ├── README.md │ └── hdl.js ├── hellobike │ ├── README.md │ └── hellobike.js ├── hycan │ ├── README.md │ ├── hycan.cookie.js │ └── hycan.js ├── ithome │ ├── ithome.cookie.js │ └── ithome.js ├── jd │ ├── JD_BaiTiao.js │ ├── jd.618.adapt.js │ ├── jd.618.boom.js │ ├── jd.618.cookie.js │ ├── jd.618.cookie.sgmodule │ ├── jd.618.js │ └── jd.618.sgmodule ├── jddj │ ├── README.md │ ├── jddj.cookie.js │ └── jddj.js ├── loon.box.conf ├── maomicd │ ├── README.md │ ├── maomicd.cookie.js │ └── maomicd.js ├── mcdd │ ├── README.md │ ├── mcdd.cookie.js │ └── mcdd.js ├── meituan │ ├── README.md │ ├── meituan.cookie.js │ └── meituan.js ├── mgtv │ ├── README.md │ ├── mgtv.cookie.js │ └── mgtv.js ├── midu │ ├── README.md │ ├── midu.cookie.js │ ├── miduRead.js │ ├── miduRead.py │ ├── miduSign.js │ └── miduSign.py ├── mihoyo │ ├── README.md │ ├── mihoyo.cookie.js │ └── mihoyo.js ├── neteasemusic │ ├── README.md │ ├── neteasemusic.cookie.js │ ├── neteasemusic.js │ └── quanx │ │ ├── neteasemusic.cookie.js │ │ └── neteasemusic.js ├── neteasenews │ ├── README.md │ ├── neteasenews.cookie.js │ ├── neteasenews.js │ └── 抓包步骤 │ │ ├── 第10步.png │ │ ├── 第1步.png │ │ ├── 第2步.png │ │ ├── 第3步.png │ │ ├── 第4-5步.png │ │ ├── 第6步.png │ │ ├── 第7步.png │ │ ├── 第8步.png │ │ └── 第9步.png ├── nfzm │ ├── nfzm.cookie.js │ └── nfzm.js ├── nio │ ├── README.md │ ├── nio.cookie.js │ └── nio.js ├── noteyoudao │ ├── noteyoudao.cookie.js │ └── noteyoudao.js ├── package.json ├── pagoda │ ├── pagoda.cookie.js │ └── pagoda.js ├── qimao │ ├── README.md │ └── qmnovel.js ├── qmkg │ ├── README.md │ ├── qmkg.cookie.js │ └── qmkg.js ├── qqmusic │ ├── README.md │ ├── qqmusic.cookie.js │ └── qqmusic.js ├── qtt │ ├── .DS_Store │ ├── README.md │ ├── qtt.cookie.js │ └── qtt.js ├── qunar │ ├── README.md │ ├── qunar.cookie.js │ └── qunar.js ├── rrtv │ ├── README.md │ ├── rrtv.cookie.js │ └── rrtv.js ├── sfexpress │ ├── README.md │ ├── sfexpress.cookie.js │ └── sfexpress.js ├── smzdm │ ├── README.md │ ├── quanx │ │ ├── README.md │ │ ├── smzdm.cookie.js │ │ └── smzdm.js │ ├── smzdm.cookie.js │ └── smzdm.js ├── suning │ ├── README.md │ ├── suning.cookie.js │ └── suning.js ├── surge.box.sgmodule ├── surge.cookies.sgmodule ├── surge.tasks.sgmodule ├── tieba │ ├── README.md │ ├── tieba.cookie.js │ └── tieba.js ├── tncj │ ├── README.md │ └── tncj.min.js ├── v2ex │ ├── README.md │ ├── quanx │ │ ├── README.md │ │ ├── v2ex.cookie.js │ │ └── v2ex.js │ ├── v2ex.cookie.js │ └── v2ex.js ├── videoqq │ ├── README.md │ ├── videoqq.cookie.js │ └── videoqq.js ├── wanda │ ├── wanda.cookie.js │ └── wanda.js ├── wmmeituan │ ├── README.md │ ├── wmmeituan.cookie.js │ └── wmmeituan.js ├── wps │ ├── README.md │ ├── wps.cookie.js │ └── wps.js ├── wykl │ ├── README.md │ ├── wykl.cookie.js │ └── wykl.js ├── ximalaya │ ├── README.md │ ├── ximalaya.cookie.js │ └── ximalaya.js ├── yanxuan │ ├── README.md │ ├── yanxuan.cookie.js │ └── yanxuan.js ├── yarn.lock ├── zaker │ ├── README.md │ └── zaker.js ├── zimuzu │ ├── README.md │ ├── zimuzu.cookie.js │ └── zimuzu.js ├── zsfc │ ├── README.md │ └── zsfc.js └── zxhc │ ├── README.md │ ├── zxhc.cookie.js │ └── zxhc.js ├── ip_api.js ├── js_cookie.conf ├── loon_cookie.conf ├── loon_diy.conf ├── loon_js.conf ├── loon_task.conf ├── lxk0301 ├── .github │ └── workflows │ │ ├── jd_blueCoin.yml │ │ ├── jd_joy.yml │ │ ├── jd_joy_feedPets.yml │ │ ├── jd_joy_reward.yml │ │ ├── jd_joy_steal.yml │ │ ├── jd_moneyTree.yml │ │ ├── jd_speed.yml │ │ ├── jd_superMarket.yml │ │ └── jd_unsubscribe.yml ├── .gitignore ├── AlipayManor.js ├── Env.min.js ├── LICENSE ├── README.en.md ├── README.md ├── cashSign.js ├── icon │ ├── jd_fruit.png │ ├── jd_joy.png │ ├── jd_moneyTree.png │ ├── jd_pet.png │ ├── jd_plantBean.png │ └── jd_speed.png ├── jdCookie.js ├── jdFruitshareCodes.js ├── jd_818.js ├── jd_blueCoin.js ├── jd_dreamFactory.js ├── jd_fruit.js ├── jd_fruit_double.js ├── jd_joy.js ├── jd_joy_feedPets.js ├── jd_joy_help.js ├── jd_joy_reward.js ├── jd_joy_steal.js ├── jd_joy_steal_test.js ├── jd_mohe.js ├── jd_moneyTree.js ├── jd_moneyTree2.js ├── jd_pet.js ├── jd_plantBean.js ├── jd_redPacket.js ├── jd_speed.js ├── jd_speed2.js ├── jd_superMarket.js ├── jd_unsubscribe.js ├── lxk0301.boxjs.json ├── package.json ├── sendNotify.js └── test2.js ├── openai.list ├── shadowrocket_diy.conf ├── sr.conf ├── surge_diy.conf ├── surge_get_cookies.sgmodule ├── surge_js.sgmodule ├── surge_lite.conf ├── surge_task.sgmodule ├── task.conf ├── w37fhy_diy.conf ├── yichahucha ├── README.md ├── clock_in.js ├── eval_script.js ├── eval_script │ ├── qx.txt │ ├── qx_script.txt │ ├── sg.sgmodule │ └── sg_script.sgmodule ├── jd_price.js ├── jd_price_lite.js ├── nf_rating.js ├── nf_rating_season.js ├── qx_sub.txt ├── sg_sub.sgmodule ├── tb_pre.js ├── tb_price.js ├── tb_price_lite.js ├── tool.js ├── wb_ad.js └── wb_launch.js └── zs.png /Getwskey.conf: -------------------------------------------------------------------------------- 1 | hostname = api.m.jd.com, plogin.m.jd.com, api-dd.jd.com 2 | https:\/\/api\.m\.jd\.com\/client\.action\?functionId=genToken url script-request-header GetWskey.js 3 | https:\/\/plogin\.m\.jd\.com\/jd-mlogin\/static\/html\/appjmp_blank\.html url script-request-header GetWskey.js 4 | -------------------------------------------------------------------------------- /NeteaseMusic.conf: -------------------------------------------------------------------------------- 1 | # Shadowrocket: 2020-9-11 2 | [General] 3 | dns-server = system,114.114.114.114,112.124.47.27,8.8.8.8,8.8.4.4 4 | bypass-system = true 5 | ipv6 = false 6 | update-url = https://raw.githubusercontent.com/w37fhy/QuantumultX/master/NeteaseMusic.conf 7 | [Rule] 8 | DOMAIN-SUFFIX,music.163.com,PROXY 9 | DOMAIN-SUFFIX,interface.music.163.com,PROXY 10 | DOMAIN-SUFFIX,interface3.music.163.com,PROXY 11 | DOMAIN-SUFFIX,apm.music.163.com,PROXY 12 | DOMAIN-SUFFIX,apm3.music.163.com,PROXY 13 | IP-CIDR,59.111.181.38/32,PROXY 14 | IP-CIDR,59.111.181.60/32,PROXY 15 | IP-CIDR,223.252.199.66/32,PROXY 16 | IP-CIDR,223.252.199.67/32,PROXY 17 | IP-CIDR,59.111.160.195/32,PROXY 18 | IP-CIDR,59.111.160.197/32,PROXY 19 | IP-CIDR,47.100.127.239/32,PROXY 20 | IP-CIDR,118.24.63.156/32,PROXY 21 | IP-CIDR,193.112.159.225/32,PROXY 22 | IP-CIDR,39.105.63.80/32,PROXY 23 | IP-CIDR,59.111.181.35/32,PROXY 24 | IP-CIDR,115.236.118.33/32,PROXY 25 | IP-CIDR,115.236.121.1/32,PROXY 26 | IP-CIDR,112.13.122.1/32,PROXY 27 | IP-CIDR,112.13.119.17/32,PROXY 28 | IP-CIDR,103.126.92.132/32,PROXY 29 | IP-CIDR,103.126.92.13/32,PROXY 30 | IP-CIDR,45.254.48.1/32,PROXY 31 | -------------------------------------------------------------------------------- /QuantumultX_Cookie.conf: -------------------------------------------------------------------------------- 1 | #Cookie获取订阅 2 | #Cookie获取成功后在重写里禁用掉本订阅 3 | #Cookie失效时在重写里启用本订阅 4 | 5 | hostname = api.m.jd.com, i.meituan.com, *.bilibili.com, music.163.com, act.10010.com, www.52pojie.cn, m.client.10010.com, passport.iqiyi.com, nebula.kuaishou.com, trade-acs.m.taobao.com, mp.weixin.qq.com, ms.jr.jd.com, wapside.189.cn, wx.10086.cn, draw.jdfcloud.com, jdjoy.jd.com, commontgw6.reader.qq.com, eventv3.reader.qq.com 6 | 7 | #京东获取Cookie 8 | https:\/\/api\.m\.jd\.com\/client\.action.*functionId=signBean url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js 9 | 10 | # 京东价格提醒(By toulanboy) 11 | # ^https:\/\/apapia-history\.manmanbuy\.com\/ChromeWidgetServices\/WidgetServices\.ashx url script-request-body https://raw.githubusercontent.com/toulanboy/scripts/master/jd_price_detect/jd_price_detect.js 12 | 13 | #Bilibili获取Cookie 14 | ^https:\/\/(www|live)\.bilibili\.com\/?.? url script-request-header https://raw.githubusercontent.com/chavyleung/scripts/master/bilibili/bilibili.cookie.js 15 | 16 | #网易云音乐Cookie 17 | ^https:\/\/music.163.com\/weapi\/user\/level url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/neteasemusic/neteasemusic.cookie.js 18 | 19 | #QQ阅读获取Cookie 20 | ^https:\/\/(commontgw6|eventv3)\.reader\.qq\.com\/* url script-request-header https://raw.githubusercontent.com/XidNDD/2020scripts/master/QQReadSign.js 21 | 22 | #中国联通Cookie 23 | # 注意获取Cookie有两条脚本 24 | ^https?:\/\/act.10010.com\/SigninApp\/signin\/querySigninActivity.htm url script-request-header https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js 25 | ^https?:\/\/act.10010.com\/SigninApp(.*?)\/signin\/daySign url script-request-header https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js 26 | ^https?:\/\/m.client.10010.com\/dailylottery\/static\/(textdl\/userLogin|active\/findActivityInfo) url script-request-header https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.cookie.js 27 | 28 | #中国电信Cookie 29 | ^https:\/\/wapside.189.cn:9001\/api\/home\/homeInfo url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/10000/10000.cookie.js 30 | 31 | #爱奇艺Cookie 32 | ^https:\/\/passport\.iqiyi\.com\/apis\/user\/info\.action url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 33 | #吾爱破解Cookie 34 | https:\/\/www\.52pojie\.cn\/home\.php\? url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 35 | 36 | #美团签到 37 | ^https:\/\/i.meituan.com\/evolve\/signin\/signpost\/ url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/meituan/meituan.cookie.js 38 | 39 | -------------------------------------------------------------------------------- /QuantumultX_JS.conf: -------------------------------------------------------------------------------- 1 | hostname = trade-acs.m.taobao.com, api.m.jd.com 2 | 3 | # 京东比价 4 | #^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/jd_price.js 5 | 6 | # 淘宝比价 7 | # ^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/githubdulong/Script/master/tb_price.js 8 | # ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/githubdulong/Script/master/tb_price.js 9 | -------------------------------------------------------------------------------- /QuantumultX_Task.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "W37fhy_diy gallery", 3 | "description": "自用除京东以外的Task脚本", 4 | "task": [ 5 | "0 8 * * * https://raw.githubusercontent.com/Peng-YM/QuanX/master/Tasks/exchange.js, tag=汇率监控, img-url=https://raw.githubusercontent.com/Orz-3/task/master/exchangerate.png,enabled=true", 6 | "0 2 */12 * * * https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js, tag=京东, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png,enabled=true", 7 | "2 0 * * * https://raw.githubusercontent.com/chavyleung/scripts/master/bilibili/bilibili.js, tag=bilibili签到, img-url=https://raw.githubusercontent.com/Orz-3/task/master/bilibili.png,enabled=true", 8 | "3 0 * * * https://raw.githubusercontent.com/chavyleung/scripts/master/bilibili/bilibili.silver2coin.js, tag=bilibili银瓜子转硬币, img-url=https://raw.githubusercontent.com/Orz-3/task/master/bilibili.png,enabled=true", 9 | "4 0 * * * https://raw.githubusercontent.com/chavyleung/scripts/master/neteasemusic/quanx/neteasemusic.js, tag=网易云音乐, img-url=https://raw.githubusercontent.com/Orz-3/task/master/Netease.png,enabled=true", 10 | "5 9 * * * https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js, tag=爱奇艺, img-url=https://raw.githubusercontent.com/Orz-3/task/master/iQIYI.png,enabled=true", 11 | "8 0 * * * https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.js, tag=中国联通, img-url=https://raw.githubusercontent.com/Orz-3/task/master/10010.png,enabled=true", 12 | "20 0 * * * https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js, tag=吾爱破解", 13 | "3 0 * * * https://raw.githubusercontent.com/chavyleung/scripts/master/meituan/meituan.js, tag=美团签到", 14 | "0 12 * * * https://raw.githubusercontent.com/chavyleung/scripts/master/box/switcher/box.switcher.js, tag=切换会话,img-url=https://raw.githubusercontent.com/Orz-3/task/master/box.png,enabled=false", 15 | "5 0 * * * https://raw.githubusercontent.com/toulanboy/scripts/master/jd_price_detect/jd_price_detect.js, tag=京东价格提醒" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /Rules/Unbreak.list: -------------------------------------------------------------------------------- 1 | # Unbreak 2 | # 由于广告屏蔽无法做到100%完美,用以修正误屏蔽的域名 3 | # > dedao 4 | DOMAIN-SUFFIX,umiwi.com 5 | # > general 6 | DOMAIN,app.adjust.com 7 | DOMAIN,app.appsflyer.com 8 | DOMAIN,bdtj.tagtic.cn 9 | # > alibaba 10 | DOMAIN,log.mmstat.com 11 | DOMAIN,sycm.mmstat.com 12 | # > google 13 | DOMAIN-SUFFIX,blog.google 14 | DOMAIN-SUFFIX,googletraveladservices.com 15 | DOMAIN,clientservices.googleapis.com 16 | DOMAIN,update.googleapis.com 17 | DOMAIN,dl.google.com 18 | DOMAIN,dl.l.google.com 19 | DOMAIN,redirector.gvt1.com 20 | DOMAIN,update.googleapis.com 21 | # >> Firebase Cloud Messaging 22 | DOMAIN,mtalk.google.com 23 | DOMAIN,alt1-mtalk.google.com 24 | DOMAIN,alt2-mtalk.google.com 25 | DOMAIN,alt3-mtalk.google.com 26 | DOMAIN,alt4-mtalk.google.com 27 | DOMAIN,alt5-mtalk.google.com 28 | DOMAIN,alt6-mtalk.google.com 29 | DOMAIN,alt7-mtalk.google.com 30 | DOMAIN,alt8-mtalk.google.com 31 | # > paramount+ 32 | # DOMAIN,pubads.g.doubleclick.net 33 | # > tencent 34 | DOMAIN,fairplay.l.qq.com 35 | DOMAIN,livew.l.qq.com 36 | DOMAIN,vd.l.qq.com 37 | DOMAIN,vi.l.qq.com 38 | # > Strava 39 | DOMAIN,analytics.strava.com 40 | # > umeng 41 | DOMAIN,msg.umeng.com 42 | DOMAIN,msg.umengcloud.com 43 | # > other 44 | DOMAIN,ci.android.com 45 | -------------------------------------------------------------------------------- /TikTok_ShadowRocket/JP.conf: -------------------------------------------------------------------------------- 1 | #!name=🇯🇵日本 2 | #!desc=解锁TikTok日本区 3 | 4 | [URL Rewrite] 5 | (?<=_region=)CN(?=&) JP 307 6 | (?<=&mcc_mnc=)4 2 307 7 | ^(https?:\/\/(tnc|dm)[\w-]+\.\w+\.com\/.+)(\?)(.+) $1$3 302 8 | (^https?:\/\/*\.\w{4}okv.com\/.+&.+)(\d{2}\.3\.\d)(.+) $118.0$3 302 9 | 10 | [MITM] 11 | hostname = %APPEND% *.tiktokv.com,*.byteoversea.com,*.tik-tokapi.com 12 | -------------------------------------------------------------------------------- /TikTok_ShadowRocket/KR.conf: -------------------------------------------------------------------------------- 1 | #!name=🇰🇷韩国 2 | #!desc=解锁TikTok韩国区 3 | 4 | [URL Rewrite] 5 | (?<=_region=)CN(?=&) KR 307 6 | (?<=&mcc_mnc=)4 2 307 7 | ^(https?:\/\/(tnc|dm)[\w-]+\.\w+\.com\/.+)(\?)(.+) $1$3 302 8 | (^https?:\/\/*\.\w{4}okv.com\/.+&.+)(\d{2}\.3\.\d)(.+) $118.0$3 302 9 | 10 | [MITM] 11 | hostname = %APPEND% *.tiktokv.com,*.byteoversea.com,*.tik-tokapi.com 12 | -------------------------------------------------------------------------------- /TikTok_ShadowRocket/TW.conf: -------------------------------------------------------------------------------- 1 | #!name=🇨🇳台湾 2 | #!desc=解锁TikTok台湾区 3 | 4 | 5 | [URL Rewrite] 6 | (?<=_region=)CN(?=&) TW 307 7 | (?<=&mcc_mnc=)4 2 307 8 | ^(https?:\/\/(tnc|dm)[\w-]+\.\w+\.com\/.+)(\?)(.+) $1$3 302 9 | (^https?:\/\/*\.\w{4}okv.com\/.+&.+)(\d{2}\.3\.\d)(.+) $118.0$3 302 10 | 11 | [MITM] 12 | hostname = %APPEND% *.tiktokv.com,*.byteoversea.com,*.tik-tokapi.com 13 | -------------------------------------------------------------------------------- /TikTok_ShadowRocket/US.conf: -------------------------------------------------------------------------------- 1 | #!name=🇺🇸美国 2 | #!desc=解锁TikTok美国区 3 | 4 | [URL Rewrite] 5 | (?<=_region=)CN(?=&) US 307 6 | (?<=&mcc_mnc=)4 2 307 7 | ^(https?:\/\/(tnc|dm)[\w-]+\.\w+\.com\/.+)(\?)(.+) $1$3 302 8 | (^https?:\/\/*\.\w{4}okv.com\/.+&.+)(\d{2}\.3\.\d)(.+) $118.0$3 302 9 | 10 | [MITM] 11 | hostname = %APPEND% *.tiktokv.com,*.byteoversea.com,*.tik-tokapi.com 12 | -------------------------------------------------------------------------------- /chavyleung/10000/10000.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '电信营业厅' 2 | const KEY_signheader = 'chavy_signheader_10000' 3 | const KEY_signbody = 'chavy_signbody_10000' 4 | const KEY_mobile = 'chavy_mobile_10000' 5 | const chavy = init() 6 | if (this.$request && this.$request.headers && this.$request.body) { 7 | const VAL_signheader = JSON.stringify($request.headers) 8 | const VAL_signbody = this.$request.body 9 | if (VAL_signheader) chavy.setdata(VAL_signheader, KEY_signheader) 10 | if (VAL_signbody) chavy.setdata(VAL_signbody, KEY_signbody) 11 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 12 | } 13 | 14 | function init() { 15 | isSurge = () => { 16 | return undefined === this.$httpClient ? false : true 17 | } 18 | isQuanX = () => { 19 | return undefined === this.$task ? false : true 20 | } 21 | getdata = (key) => { 22 | if (isSurge()) return $persistentStore.read(key) 23 | if (isQuanX()) return $prefs.valueForKey(key) 24 | } 25 | setdata = (key, val) => { 26 | if (isSurge()) return $persistentStore.write(key, val) 27 | if (isQuanX()) return $prefs.setValueForKey(key, val) 28 | } 29 | msg = (title, subtitle, body) => { 30 | if (isSurge()) $notification.post(title, subtitle, body) 31 | if (isQuanX()) $notify(title, subtitle, body) 32 | } 33 | log = (message) => console.log(message) 34 | get = (url, cb) => { 35 | if (isSurge()) { 36 | $httpClient.get(url, cb) 37 | } 38 | if (isQuanX()) { 39 | url.method = 'GET' 40 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 41 | } 42 | } 43 | post = (url, cb) => { 44 | if (isSurge()) { 45 | $httpClient.post(url, cb) 46 | } 47 | if (isQuanX()) { 48 | url.method = 'POST' 49 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 50 | } 51 | } 52 | done = (value = {}) => { 53 | $done(value) 54 | } 55 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 56 | } 57 | chavy.done() 58 | -------------------------------------------------------------------------------- /chavyleung/10000/README.md: -------------------------------------------------------------------------------- 1 | # 电信营业厅 2 | 3 | > 2020.5.6 更新签到脚本 (正则和 rewrite 类型都有变化, 需要重取 Cookie) 4 | > 2020.8.7 更新获取金币body 5 | 6 | ## 配置 (Surge) 7 | 8 | ```properties 9 | [MITM] 10 | wapside.189.cn:9001 11 | 12 | [Script] 13 | http-request ^https:\/\/wapside.189.cn:9001\/api\/home\/homeInfo script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10000/10000.cookie.js, requires-body=true 14 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10000/10000.js 15 | ``` 16 | 17 | ## 配置 (QuanX) 18 | 19 | ```properties 20 | [MITM] 21 | wapside.189.cn 22 | 23 | [rewrite_local] 24 | # 190及以后版本 25 | ^https:\/\/wapside.189.cn:9001\/api\/home\/homeInfo url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/10000/10000.cookie.js 26 | 27 | [task_local] 28 | 1 0 * * * 10000.js 29 | ``` 30 | 31 | ## 说明 32 | 33 | > 先在登录成功后, 再打开获取 Cookie 的脚本 34 | 35 | 1. 先配置`[MITM]` 36 | - Surge: wapside.189.cn:9001 37 | - QuanX: wapside.189.cn 38 | 2. 再配置重写规则: 39 | - Surge: 把两条远程脚本放到`[Script]` 40 | - QuanX: 把`10000.cookie.js`和`10000.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 41 | 3. 打开 APP 手动签到一次: 访问下右下角 `我` > `签到` (头像下面) 42 | 4. 系统提示: `获取Cookie: 成功` 43 | 5. 最后就可以把第 1 条脚本注释掉了 44 | 45 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 46 | 47 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 48 | 49 | ## 常见问题 50 | 51 | 1. 无法写入 Cookie 52 | 53 | - 检查 Surge 系统通知权限放开了没 54 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 55 | 56 | 2. 写入 Cookie 成功, 但签到不成功 57 | 58 | - 看看是不是在登录前就写入 Cookie 了 59 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 60 | 61 | 3. 为什么有时成功有时失败 62 | 63 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 64 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 65 | 66 | - `Surge`配置: 67 | 68 | ```properties 69 | # 没有什么是一顿饭解决不了的: 70 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 71 | # 如果有,那就两顿: 72 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 73 | # 实在不行,三顿也能接受: 74 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 75 | 76 | # 再粗暴点,直接: 77 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 78 | ``` 79 | 80 | - `QuanX`配置: 81 | 82 | ```properties 83 | [task_local] 84 | 1 0 * * * xxx.js # 每天00:01执行一次 85 | 2 0 * * * xxx.js # 每天00:02执行一次 86 | 3 0 * * * xxx.js # 每天00:03执行一次 87 | 88 | */60 * * * * xxx.js # 每60分执行一次 89 | ``` 90 | 91 | ## 感谢 92 | 93 | [@NobyDa](https://github.com/NobyDa) 94 | 95 | [@lhie1](https://github.com/lhie1) 96 | 97 | [@ConnersHua](https://github.com/ConnersHua) 98 | 99 | [@sazs34](https://github.com/sazs34/) 100 | -------------------------------------------------------------------------------- /chavyleung/10086/10086.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '中国移动' 2 | const tokenurlKey = 'chavy_tokenurl_10086' 3 | const tokenheaderKey = 'chavy_tokenheader_10086' 4 | const signurlKey = 'chavy_signurl_10086' 5 | const signheaderKey = 'chavy_signheader_10086' 6 | const chavy = init() 7 | 8 | const requrl = $request.url 9 | const reqRef = $request.headers.Referer 10 | if ($request && $request.method != 'OPTIONS' && requrl.indexOf('website/taskCenter/index') >= 0 && requrl.indexOf('mobile=') >= 0) { 11 | const tokenurlVal = requrl 12 | const tokenheaderVal = JSON.stringify($request.headers) 13 | if (tokenurlVal) chavy.setdata(tokenurlVal, tokenurlKey) 14 | if (tokenheaderVal) chavy.setdata(tokenheaderVal, tokenheaderKey) 15 | title = chavy.msg(cookieName, `获取刷新链接: 成功`, ``) 16 | } else if ($request && $request.method != 'OPTIONS' && requrl.indexOf('website/taskCenter/sign') >= 0) { 17 | const signurlVal = requrl 18 | const signheaderVal = JSON.stringify($request.headers) 19 | if (signurlVal) chavy.setdata(signurlVal, signurlKey) 20 | if (signheaderVal) chavy.setdata(signheaderVal, signheaderKey) 21 | title = chavy.msg(cookieName, `获取Cookie: 成功`, ``) 22 | } 23 | 24 | function init() { 25 | isSurge = () => { 26 | return undefined === this.$httpClient ? false : true 27 | } 28 | isQuanX = () => { 29 | return undefined === this.$task ? false : true 30 | } 31 | getdata = (key) => { 32 | if (isSurge()) return $persistentStore.read(key) 33 | if (isQuanX()) return $prefs.valueForKey(key) 34 | } 35 | setdata = (key, val) => { 36 | if (isSurge()) return $persistentStore.write(key, val) 37 | if (isQuanX()) return $prefs.setValueForKey(key, val) 38 | } 39 | msg = (title, subtitle, body) => { 40 | if (isSurge()) $notification.post(title, subtitle, body) 41 | if (isQuanX()) $notify(title, subtitle, body) 42 | } 43 | log = (message) => console.log(message) 44 | get = (url, cb) => { 45 | if (isSurge()) { 46 | $httpClient.get(url, cb) 47 | } 48 | if (isQuanX()) { 49 | url.method = 'GET' 50 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 51 | } 52 | } 53 | post = (url, cb) => { 54 | if (isSurge()) { 55 | $httpClient.post(url, cb) 56 | } 57 | if (isQuanX()) { 58 | url.method = 'POST' 59 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 60 | } 61 | } 62 | done = (value = {}) => { 63 | $done(value) 64 | } 65 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 66 | } 67 | chavy.done() 68 | -------------------------------------------------------------------------------- /chavyleung/BOXJS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/BOXJS.png -------------------------------------------------------------------------------- /chavyleung/BoxJS.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/BoxJS.gif -------------------------------------------------------------------------------- /chavyleung/QuantumultX.box.local.conf: -------------------------------------------------------------------------------- 1 | hostname = 8.8.8.8, 1.1.1.1 2 | 3 | ^https://8.8.8.8/api url script-request-body chavyleung/chavy.box.js 4 | ^https://8.8.8.8/(home|sub|my|app|log|revert)($|\/) url script-echo-response chavy.box.js 5 | 6 | ^https?://1.1.1.1/api url script-request-body chavy.box.js 7 | ^https?://1.1.1.1/(home|sub|my|app|log|revert)($|\/) url script-echo-response chavy.box.js 8 | 9 | ^https?://boxjs.com/api url script-request-body chavy.box.js 10 | ^https?://boxjs.com(/home|/sub|/my|/app|/log|/revert)?($|\/) url script-echo-response chavy.box.js -------------------------------------------------------------------------------- /chavyleung/QuantumultX.box.remote.conf: -------------------------------------------------------------------------------- 1 | hostname = 8.8.8.8, 1.1.1.1 2 | 3 | ^https://8.8.8.8/api url script-request-body https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js 4 | ^https://8.8.8.8/(home|sub|my|app|log|revert)($|\/) url script-echo-response https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js 5 | 6 | ^https?://1.1.1.1/api url script-request-body https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js 7 | ^https?://1.1.1.1/(home|sub|my|app|log|revert)($|\/) url script-echo-response https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js 8 | 9 | ^https?://boxjs.com/api url script-request-body https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js 10 | ^https?://boxjs.com(/home|/sub|/my|/app|/log|/revert)?($|\/) url script-echo-response https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js -------------------------------------------------------------------------------- /chavyleung/QuantumultX_Local_Task.conf: -------------------------------------------------------------------------------- 1 | [task_local] 2 | # @chavyleung 3 | # @GideonSenku 4 | # @barrymchen 5 | # @danchaw 6 | # 电信营业厅 7 | 5 0 * * * chavyleung/10000/10000.js 8 | # AcFun 9 | 3 0 * * * chavyleung/acfun/acfun.js 10 | # APK.TW 11 | 10 0 * * * chavyleung/apktw/apktw.js 12 | # bilibili 13 | 2 0 * * * chavyleung/bilibili/bilibili.js 14 | # bilibili 如需银瓜子转硬币,添加下方内容 15 | 1 0 * * * chavyleung/bilibili/bilibili.silver2coin.js 16 | # 懂球帝 17 | 4 0 * * * chavyleung/dongqiudi/dongqiudi.js 18 | # 威锋网 19 | # 3 0 * * * chavyleung/feng/feng.js 20 | # 飞客茶馆 21 | 4 0 * * * chavyleung/flyertea/flyertea.js 22 | # 网易云音乐 23 | 2 0 * * * chavyleung/neteasemusic/quanx/neteasemusic.js 24 | # 网易新闻 25 | 4 0 * * * chavyleung/neteasenews/neteasenews.js 26 | # 去哪儿 27 | 4 0 * * * chavyleung/qunar/qunar.js 28 | # 人人视频 29 | 10 0 * * * chavyleung/rrtv/rrtv.js 30 | # 顺丰速运 31 | 10 0 * * * chavyleung/sfexpress/sfexpress.js 32 | # 什么值得买 33 | 2 0 * * * chavyleung/smzdm/quanx/smzdm.js 34 | # 百度签到 35 | 1,5,6 0 * * * chavyleung/tieba/tieba.js 36 | # V2EX 37 | 2 9 * * * chavyleung/v2ex/quanx/v2ex.js 38 | # 腾讯视频 39 | 3 0 * * * chavyleung/videoqq/videoqq.js 40 | # 喜马拉雅 41 | 4 0 * * * chavyleung/ximalaya/ximalaya.js 42 | # 网易严选 43 | # 4 0 * * * chavyleung/yanxuan/yanxuan.js 44 | # 字幕组 45 | 3 0 * * * chavyleung/zimuzu/zimuzu.js 46 | # CSDN 47 | 4 0 * * * chavyleung/csdn/csdn.js 48 | # 加油广东 49 | 1 7 * * * chavyleung/gdoil/gdoil.js 50 | # 芒果TV 51 | 2 0 * * * chavyleung/mgtv/mgtv.js 52 | # 米游社 53 | 2 0 * * * chavyleung/mihoyo/mihoyo.js 54 | # 中国联通 55 | 9 0 * * * chavyleung/10010/10010.js 56 | # 猫咪音乐网 57 | 2 0 * * * chavyleung/maomicd/maomicd.js 58 | # 中国移动 59 | 7 0 * * * chavyleung/10086/10086.js 60 | # 美团外卖 61 | 8 0 * * * chavyleung/wmmeituan/wmmeituan.js 62 | # 美团 63 | 7 0 * * * chavyleung/meituan/meituan.js 64 | # 时光相册 65 | 7 0 * * * chavyleung/everphoto/everphoto.js 66 | # 百词斩 67 | 50 23 * * * chavyleung/bcz/bcz.js 68 | # 叮咚买菜 69 | 7 0 * * * chavyleung/mcdd/mcdd.js 70 | # 分期乐 71 | 1 0 * * * chavyleung/fenqile/fenqile.js 72 | #樊登读书 73 | 1 0 * * * chavyleung/fandeng/fandeng.js 74 | #全民K歌 75 | 1 0 * * * chavyleung/qmkg/qmkg.js 76 | #合创 77 | 1 0 * * * chavyleung/hycan/hycan.js 78 | #蔚来 79 | 1 0 * * * chavyleung/nio/nio.js 80 | #京东到家 81 | 1 0 * * * chavyleung/jddj/jddj.js 82 | #网易考拉 83 | 1 0 * * * chavyleung/wykl/wykl.js 84 | # WPS 85 | 0 9 * * * chavyleung/wps/wps.js 86 | #智行火车 87 | 1 0 * * * chavyleung/zxhc/zxhc.js 88 | # 苏宁易购 89 | 7 0 * * * chavyleung/suning/suning.js 90 | # 豆瓣时间 91 | 1 0 * * * chavyleung/dbsj/dbsj.js 92 | # 趣头条 93 | 1 0 * * * chavyleung/qtt/qtt.js 94 | # 米读 95 | */1 * * * * chavyleung/midu/miduRead.js 96 | 1 0 * * * chavyleung/midu/miduSign.js -------------------------------------------------------------------------------- /chavyleung/README.md: -------------------------------------------------------------------------------- 1 | # Chavy Scripts 2 | ![](https://img.shields.io/badge/license-MIT-blueviolet.svg) 3 | ![GitHub release (latest by date)](https://img.shields.io/github/v/release/chavyleung/scripts?color=%23c694ff) 4 | ![](https://badgen.net/github/stars/chavyleung/scripts) 5 | ![](https://tokei.rs/b1/github/chavyleung/scripts?category=code) 6 | ![GitHub contributors](https://img.shields.io/github/contributors/chavyleung/scripts) 7 | # BoxJs 8 | A SPA Appliction be used for scripts utils 9 | 10 | ![Demo](https://github.com/chavyleung/scripts/blob/master/BoxJS.gif) 11 | 12 | [Scripts Vote](https://t.me/chavyscripts) 13 | 14 | # LICENSE 15 | Copyright © 2019-present chavyleung. This project is [GPL](https://github.com/chavyleung/scripts/blob/master/LICENSE) licensed. -------------------------------------------------------------------------------- /chavyleung/acfun/acfun.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'AcFun' 2 | const cookieKey = 'chavy_cookie_acfun' 3 | const tokenKey = 'chavy_token_acfun' 4 | const chavy = init() 5 | const cookieVal = $request.headers['Cookie'] 6 | const tokenVal = $request.headers['access_token'] 7 | if (cookieVal) { 8 | if (chavy.setdata(cookieVal, cookieKey)) { 9 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 10 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 11 | } 12 | if (chavy.setdata(tokenVal, tokenKey)) { 13 | chavy.msg(`${cookieName}`, '获取Token: 成功', '') 14 | chavy.log(`[${cookieName}] 获取Token: 成功, token: ${tokenVal}`) 15 | } 16 | } 17 | 18 | function init() { 19 | isSurge = () => { 20 | return undefined === this.$httpClient ? false : true 21 | } 22 | isQuanX = () => { 23 | return undefined === this.$task ? false : true 24 | } 25 | getdata = (key) => { 26 | if (isSurge()) return $persistentStore.read(key) 27 | if (isQuanX()) return $prefs.valueForKey(key) 28 | } 29 | setdata = (key, val) => { 30 | if (isSurge()) return $persistentStore.write(key, val) 31 | if (isQuanX()) return $prefs.setValueForKey(key, val) 32 | } 33 | msg = (title, subtitle, body) => { 34 | if (isSurge()) $notification.post(title, subtitle, body) 35 | if (isQuanX()) $notify(title, subtitle, body) 36 | } 37 | log = (message) => console.log(message) 38 | get = (url, cb) => { 39 | if (isSurge()) { 40 | $httpClient.get(url, cb) 41 | } 42 | if (isQuanX()) { 43 | url.method = 'GET' 44 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 45 | } 46 | } 47 | post = (url, cb) => { 48 | if (isSurge()) { 49 | $httpClient.post(url, cb) 50 | } 51 | if (isQuanX()) { 52 | url.method = 'POST' 53 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 54 | } 55 | } 56 | done = (value = {}) => { 57 | $done(value) 58 | } 59 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 60 | } 61 | chavy.done() 62 | -------------------------------------------------------------------------------- /chavyleung/apktw/README.md: -------------------------------------------------------------------------------- 1 | # APK.TW 2 | 3 | > 调整获取会话正则 (使用账号密码登录获取) 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | apk.tw 10 | 11 | [Script] 12 | http-request ^https://apk.tw\/member.php(.*?)action=login script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/apktw/apktw.cookie.js,requires-body=true 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/apktw/apktw.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | apk.tw 21 | 22 | [rewrite_local] 23 | ^https://apk.tw\/member.php(.*?)action=login url script-request-body apktw.cookie.js 24 | 25 | [task_local] 26 | 1 0 * * * apktw.js 27 | ``` 28 | 29 | ## 说明 30 | 31 | 1. 访问: `https://apk.tw/` (如果你已经登录, 请先注销) 32 | 2. 使用账号密码登录 33 | 3. 系统提示: `获取会话: 成功` (以登录成功后弹出的通知为准!) 34 | 35 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 36 | 37 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 38 | 39 | ## 常见问题 40 | 41 | 1. 无法写入 Cookie 42 | 43 | - 检查 Surge 系统通知权限放开了没 44 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 45 | 46 | 2. 写入 Cookie 成功, 但签到不成功 47 | 48 | - 看看是不是在登录前就写入 Cookie 了 49 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 50 | 51 | 3. 为什么有时成功有时失败 52 | 53 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 54 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 55 | 56 | - `Surge`配置: 57 | 58 | ```properties 59 | # 没有什么是一顿饭解决不了的: 60 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 61 | # 如果有,那就两顿: 62 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 63 | # 实在不行,三顿也能接受: 64 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 65 | 66 | # 再粗暴点,直接: 67 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 68 | ``` 69 | 70 | - `QuanX`配置: 71 | 72 | ```properties 73 | [task_local] 74 | 1 0 * * * xxx.js # 每天00:01执行一次 75 | 2 0 * * * xxx.js # 每天00:02执行一次 76 | 3 0 * * * xxx.js # 每天00:03执行一次 77 | 78 | */60 * * * * xxx.js # 每60分执行一次 79 | ``` 80 | 81 | ## 感谢 82 | 83 | [@NobyDa](https://github.com/NobyDa) 84 | 85 | [@lhie1](https://github.com/lhie1) 86 | 87 | [@ConnersHua](https://github.com/ConnersHua) 88 | -------------------------------------------------------------------------------- /chavyleung/apktw/apktw.cookie.js: -------------------------------------------------------------------------------- 1 | const $ = new Env('ApkTw') 2 | 3 | !(async () => { 4 | $.log('', `🔔 ${$.name}, 获取会话: 开始!`, '') 5 | const session = {} 6 | session.url = $request.url 7 | session.body = $request.body 8 | session.headers = $request.headers 9 | delete session.headers['Content-Length'] 10 | delete session.headers['Cookie'] 11 | $.log('', `url: ${session.url}`, `body: ${session.body}`, `headers: ${JSON.stringify(session.headers)}`) 12 | if ($.setdata(JSON.stringify(session), 'chavy_cookie_apktw')) { 13 | $.subt = '获取会话: 成功!' 14 | } else { 15 | $.subt = '获取会话: 失败!' 16 | } 17 | })() 18 | .catch((e) => { 19 | $.subt = '获取会话: 失败!' 20 | $.desc = `原因: ${e}` 21 | $.log(`❌ ${$.name}, 获取会话: 失败! 原因: ${e}!`) 22 | }) 23 | .finally(() => { 24 | $.msg($.name, $.subt, $.desc), $.log('', `🔔 ${$.name}, 获取会话: 结束!`, ''), $.done() 25 | }) 26 | 27 | // prettier-ignore 28 | function Env(t){this.name=t,this.logs=[],this.isSurge=(()=>"undefined"!=typeof $httpClient),this.isQuanX=(()=>"undefined"!=typeof $task),this.log=((...t)=>{this.logs=[...this.logs,...t],t?console.log(t.join("\n")):console.log(this.logs.join("\n"))}),this.msg=((t=this.name,s="",i="")=>{this.isSurge()&&$notification.post(t,s,i),this.isQuanX()&&$notify(t,s,i);const e=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t&&e.push(t),s&&e.push(s),i&&e.push(i),console.log(e.join("\n"))}),this.getdata=(t=>this.isSurge()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):void 0),this.setdata=((t,s)=>this.isSurge()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):void 0),this.get=((t,s)=>this.send(t,"GET",s)),this.wait=((t,s=t)=>i=>setTimeout(()=>i(),Math.floor(Math.random()*(s-t+1)+t))),this.post=((t,s)=>this.send(t,"POST",s)),this.send=((t,s,i)=>{if(this.isSurge()){const e="POST"==s?$httpClient.post:$httpClient.get;e(t,(t,s,e)=>{s&&(s.body=e,s.statusCode=s.status),i(t,s,e)})}this.isQuanX()&&(t.method=s,$task.fetch(t).then(t=>{t.status=t.statusCode,i(null,t,t.body)},t=>i(t.error,t,t)))}),this.done=((t={})=>$done(t))} 29 | -------------------------------------------------------------------------------- /chavyleung/bcz/bcz.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '百词斩' 2 | const cookieKey = 'senku_cookie_bcz' 3 | const shareKey = 'senku_key_bcz' 4 | const senku = init() 5 | 6 | if (this.$request && this.$request.headers) { 7 | const cookieVal = $request.headers['Cookie'] 8 | const url = $request.url 9 | const index1 = url.indexOf('=') 10 | const index2 = url.indexOf('&') 11 | const shareVal = url.substring(index1 + 1, index2) 12 | if (cookieVal && shareVal) { 13 | if (senku.setdata(cookieVal, cookieKey) && senku.setdata(shareVal, shareKey)) { 14 | senku.msg(`${cookieName}`, '获取Cookie: 成功', '') 15 | senku.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 16 | } 17 | } 18 | } 19 | function init() { 20 | isSurge = () => { 21 | return undefined === this.$httpClient ? false : true 22 | } 23 | isQuanX = () => { 24 | return undefined === this.$task ? false : true 25 | } 26 | getdata = (key) => { 27 | if (isSurge()) return $persistentStore.read(key) 28 | if (isQuanX()) return $prefs.valueForKey(key) 29 | } 30 | setdata = (key, val) => { 31 | if (isSurge()) return $persistentStore.write(key, val) 32 | if (isQuanX()) return $prefs.setValueForKey(key, val) 33 | } 34 | msg = (title, subtitle, body) => { 35 | if (isSurge()) $notification.post(title, subtitle, body) 36 | if (isQuanX()) $notify(title, subtitle, body) 37 | } 38 | log = (message) => console.log(message) 39 | get = (url, cb) => { 40 | if (isSurge()) { 41 | $httpClient.get(url, cb) 42 | } 43 | if (isQuanX()) { 44 | url.method = 'GET' 45 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 46 | } 47 | } 48 | post = (url, cb) => { 49 | if (isSurge()) { 50 | $httpClient.post(url, cb) 51 | } 52 | if (isQuanX()) { 53 | url.method = 'POST' 54 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 55 | } 56 | } 57 | done = (value = {}) => { 58 | $done(value) 59 | } 60 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 61 | } 62 | senku.done() 63 | -------------------------------------------------------------------------------- /chavyleung/bcz/bcz.js: -------------------------------------------------------------------------------- 1 | const cookieName = '百词斩' 2 | const cookieKey = 'senku_cookie_bcz' 3 | const shareKey = 'senku_key_bcz' 4 | const senku = init() 5 | const cookieVal = senku.getdata(cookieKey) 6 | const shareVal = senku.getdata(shareKey) 7 | 8 | let signinfo = {} 9 | senku.log() 10 | check() 11 | function check(cb) { 12 | const url = { url: `https://group.baicizhan.com/group/apply_reward`, headers: { Cookie: cookieVal } } 13 | url.headers['Content-Type'] = `text/plain;charset=utf-8` 14 | url.headers['User-Agent'] = `Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.10(0x17000a21) NetType/4G Language/zh_CN` 15 | const key = { share_key: shareVal } 16 | url.body = JSON.stringify(key) 17 | senku.log(url.body) 18 | senku.post(url, (error, response, data) => { 19 | signinfo = JSON.parse(data) 20 | senku.log(JSON.stringify(signinfo)) 21 | const title = `${cookieName}` 22 | let subTitle = `` 23 | let detail = '' 24 | if (signinfo.code == 1) { 25 | if (signinfo.data.is_new) { 26 | subTitle += `成功` 27 | detail = `获取铜板数${signinfo.data.reward[2]}` 28 | } else { 29 | subTitle += `今天的铜板已经领取,但是单词还是可以继续背的` 30 | } 31 | } else { 32 | detail = `状态: 还玩手机?快去背单词` 33 | subTitle += '失败' 34 | } 35 | senku.msg(title, subTitle, detail) 36 | senku.done() 37 | }) 38 | } 39 | 40 | function init() { 41 | isSurge = () => { 42 | return undefined === this.$httpClient ? false : true 43 | } 44 | isQuanX = () => { 45 | return undefined === this.$task ? false : true 46 | } 47 | getdata = (key) => { 48 | if (isSurge()) return $persistentStore.read(key) 49 | if (isQuanX()) return $prefs.valueForKey(key) 50 | } 51 | setdata = (key, val) => { 52 | if (isSurge()) return $persistentStore.write(key, val) 53 | if (isQuanX()) return $prefs.setValueForKey(key, val) 54 | } 55 | msg = (title, subtitle, body) => { 56 | if (isSurge()) $notification.post(title, subtitle, body) 57 | if (isQuanX()) $notify(title, subtitle, body) 58 | } 59 | log = (message) => console.log(message) 60 | get = (url, cb) => { 61 | if (isSurge()) { 62 | $httpClient.get(url, cb) 63 | } 64 | if (isQuanX()) { 65 | url.method = 'GET' 66 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 67 | } 68 | } 69 | post = (url, cb) => { 70 | if (isSurge()) { 71 | $httpClient.post(url, cb) 72 | } 73 | if (isQuanX()) { 74 | url.method = 'POST' 75 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 76 | } 77 | } 78 | done = (value = {}) => { 79 | $done(value) 80 | } 81 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 82 | } 83 | -------------------------------------------------------------------------------- /chavyleung/bilibili/bilibili.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'bilibili' 2 | const cookieKey = 'chavy_cookie_bilibili' 3 | const chavy = init() 4 | const cookieVal = $request.headers['Cookie'] 5 | if (cookieVal) { 6 | if (chavy.setdata(cookieVal, cookieKey)) { 7 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 8 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 9 | } 10 | } 11 | function init() { 12 | isSurge = () => { 13 | return undefined === this.$httpClient ? false : true 14 | } 15 | isQuanX = () => { 16 | return undefined === this.$task ? false : true 17 | } 18 | getdata = (key) => { 19 | if (isSurge()) return $persistentStore.read(key) 20 | if (isQuanX()) return $prefs.valueForKey(key) 21 | } 22 | setdata = (key, val) => { 23 | if (isSurge()) return $persistentStore.write(key, val) 24 | if (isQuanX()) return $prefs.setValueForKey(key, val) 25 | } 26 | msg = (title, subtitle, body) => { 27 | if (isSurge()) $notification.post(title, subtitle, body) 28 | if (isQuanX()) $notify(title, subtitle, body) 29 | } 30 | log = (message) => console.log(message) 31 | get = (url, cb) => { 32 | if (isSurge()) { 33 | $httpClient.get(url, cb) 34 | } 35 | if (isQuanX()) { 36 | url.method = 'GET' 37 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 38 | } 39 | } 40 | post = (url, cb) => { 41 | if (isSurge()) { 42 | $httpClient.post(url, cb) 43 | } 44 | if (isQuanX()) { 45 | url.method = 'POST' 46 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 47 | } 48 | } 49 | done = (value = {}) => { 50 | $done(value) 51 | } 52 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 53 | } 54 | chavy.done() 55 | -------------------------------------------------------------------------------- /chavyleung/box/icons/BoxJs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/box/icons/BoxJs.png -------------------------------------------------------------------------------- /chavyleung/box/icons/BoxSetting.mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/box/icons/BoxSetting.mini.png -------------------------------------------------------------------------------- /chavyleung/box/icons/BoxSetting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/box/icons/BoxSetting.png -------------------------------------------------------------------------------- /chavyleung/box/icons/BoxSwitcher.mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/box/icons/BoxSwitcher.mini.png -------------------------------------------------------------------------------- /chavyleung/box/icons/BoxSwitcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/box/icons/BoxSwitcher.png -------------------------------------------------------------------------------- /chavyleung/box/rewrite/boxjs.rewrite.loon.conf: -------------------------------------------------------------------------------- 1 | http-request ^https?://boxjs.com(/api|/home|/sub|/my|/app|/log|/revert)?($|\/) script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js, requires-body=true, timeout=120, tag=BoxJs -------------------------------------------------------------------------------- /chavyleung/box/rewrite/boxjs.rewrite.loon.tf.plugin: -------------------------------------------------------------------------------- 1 | [Script] 2 | http-request ^https?://boxjs.net script-path=https://gitee.com/chavyleung/scripts/raw/master/box/chavy.boxjs.js, requires-body=true, timeout=120, tag=BoxJs.net 3 | -------------------------------------------------------------------------------- /chavyleung/box/rewrite/boxjs.rewrite.quanx.conf: -------------------------------------------------------------------------------- 1 | ^https?://boxjs.com/api url script-request-body https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js 2 | ^https?://boxjs.com(/home|/sub|/my|/app|/log|/revert)?($|\/) url script-echo-response https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js 3 | -------------------------------------------------------------------------------- /chavyleung/box/rewrite/boxjs.rewrite.quanx.tf.conf: -------------------------------------------------------------------------------- 1 | ^https?://boxjs.net url script-analyze-echo-response https://gitee.com/chavyleung/scripts/raw/master/box/chavy.boxjs.js -------------------------------------------------------------------------------- /chavyleung/box/rewrite/boxjs.rewrite.surge.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=BoxJs 2 | #!desc=http://boxjs.com 3 | 4 | [Script] 5 | Rewrite: BoxJs = type=http-request,pattern=^https?://boxjs.com(/api|/home|/sub|/my|/app|/log|/revert)?($|\/),script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js, requires-body=true, timeout=120 6 | -------------------------------------------------------------------------------- /chavyleung/box/rewrite/boxjs.rewrite.surge.tf.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=BoxJs.net 2 | #!desc=http://boxjs.net 3 | 4 | [Script] 5 | Rewrite: BoxJs = type=http-request,pattern=^https?://boxjs.net,script-path=https://gitee.com/chavyleung/scripts/raw/master/box/chavy.boxjs.js, requires-body=true, timeout=120 6 | -------------------------------------------------------------------------------- /chavyleung/chavy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * [main.js] 3 | * const cookieVal = $persistentStore.read(cookieKey) 4 | * => 5 | * const chavy = init() 6 | * const cookieVal = chavy.getdata(cookieKey) 7 | * 8 | * $httpClient.get => chavy.get 9 | * $httpClient.post => chavy.post 10 | * $notification.post => chavy.msg 11 | * console.log => chavy.log 12 | * $done({}) => chavy.done() 13 | * 14 | * [main.cookie.js] 15 | * const cookieVal = $request.headers['Cookie'] 16 | * => 17 | * const chavy = init() 18 | * const cookieVal = $request.headers['Cookie'] 19 | * 20 | * $persistentStore.write => chavy.setdata 21 | * $notification.post => chavy.msg 22 | * console.log => chavy.log 23 | * $done({}) => chavy.done() 24 | */ 25 | 26 | function init() { 27 | isSurge = () => { 28 | return undefined === this.$httpClient ? false : true 29 | } 30 | isQuanX = () => { 31 | return undefined === this.$task ? false : true 32 | } 33 | getdata = (key) => { 34 | if (isSurge()) return $persistentStore.read(key) 35 | if (isQuanX()) return $prefs.valueForKey(key) 36 | } 37 | setdata = (key, val) => { 38 | if (isSurge()) return $persistentStore.write(key, val) 39 | if (isQuanX()) return $prefs.setValueForKey(key, val) 40 | } 41 | msg = (title, subtitle, body) => { 42 | if (isSurge()) $notification.post(title, subtitle, body) 43 | if (isQuanX()) $notify(title, subtitle, body) 44 | } 45 | log = (message) => console.log(message) 46 | get = (url, cb) => { 47 | if (isSurge()) { 48 | $httpClient.get(url, cb) 49 | } 50 | if (isQuanX()) { 51 | url.method = 'GET' 52 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 53 | } 54 | } 55 | post = (url, cb) => { 56 | if (isSurge()) { 57 | $httpClient.post(url, cb) 58 | } 59 | if (isQuanX()) { 60 | url.method = 'POST' 61 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 62 | } 63 | } 64 | done = (value = {}) => { 65 | $done(value) 66 | } 67 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 68 | } 69 | -------------------------------------------------------------------------------- /chavyleung/csdn/csdn.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'CSDN' 2 | const tokenurlKey = 'chavy_tokenurl_csdn' 3 | const tokenheaderKey = 'chavy_tokenheader_csdn' 4 | const signurlKey = 'chavy_signurl_csdn' 5 | const signheaderKey = 'chavy_signheader_csdn' 6 | const chavy = init() 7 | 8 | let title = `` 9 | let detail = `` 10 | if ($request && $request.method != 'OPTIONS' && $request.headers.Host == 'passport.csdn.net') { 11 | const tokenurlVal = $request.url 12 | const tokenheaderVal = JSON.stringify($request.headers) 13 | if (tokenurlVal) chavy.setdata(tokenurlVal, tokenurlKey) 14 | if (tokenheaderVal) chavy.setdata(tokenheaderVal, tokenheaderKey) 15 | title = `获取刷新链接: 成功` 16 | detail = `请进入 "我的>签到" 并手动签到1次` 17 | chavy.msg(`${cookieName}`, title, detail) 18 | } else if ($request && $request.method != 'OPTIONS' && $request.headers.Host == 'gw.csdn.net') { 19 | const signurlVal = $request.url 20 | const signheaderVal = JSON.stringify($request.headers) 21 | if (signurlVal) chavy.setdata(signurlVal, signurlKey) 22 | if (signheaderVal) chavy.setdata(signheaderVal, signheaderKey) 23 | title = `获取Cookie: 成功 (手动签到)` 24 | chavy.msg(`${cookieName}`, title, detail) 25 | } 26 | 27 | function init() { 28 | isSurge = () => { 29 | return undefined === this.$httpClient ? false : true 30 | } 31 | isQuanX = () => { 32 | return undefined === this.$task ? false : true 33 | } 34 | getdata = (key) => { 35 | if (isSurge()) return $persistentStore.read(key) 36 | if (isQuanX()) return $prefs.valueForKey(key) 37 | } 38 | setdata = (key, val) => { 39 | if (isSurge()) return $persistentStore.write(key, val) 40 | if (isQuanX()) return $prefs.setValueForKey(key, val) 41 | } 42 | msg = (title, subtitle, body) => { 43 | if (isSurge()) $notification.post(title, subtitle, body) 44 | if (isQuanX()) $notify(title, subtitle, body) 45 | } 46 | log = (message) => console.log(message) 47 | get = (url, cb) => { 48 | if (isSurge()) { 49 | $httpClient.get(url, cb) 50 | } 51 | if (isQuanX()) { 52 | url.method = 'GET' 53 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 54 | } 55 | } 56 | post = (url, cb) => { 57 | if (isSurge()) { 58 | $httpClient.post(url, cb) 59 | } 60 | if (isQuanX()) { 61 | url.method = 'POST' 62 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 63 | } 64 | } 65 | done = (value = {}) => { 66 | $done(value) 67 | } 68 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 69 | } 70 | chavy.done() 71 | -------------------------------------------------------------------------------- /chavyleung/dbsj/dbsj.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '豆瓣时间' 2 | const signurlKey = 'senku_signurl_dbsj' 3 | const signheaderKey = 'senku_signheader_dbsj' 4 | const signbodyKey = 'senku_signbody_dbsj' 5 | const senku = init() 6 | 7 | const requrl = $request.url 8 | if ($request && $request.method != 'OPTIONS') { 9 | const signurlVal = requrl 10 | const signheaderVal = JSON.stringify($request.headers) 11 | 12 | if (signurlVal) senku.setdata(signurlVal, signurlKey) 13 | if (signheaderVal) senku.setdata(signheaderVal, signheaderKey) 14 | senku.msg(cookieName, `获取Cookie: 成功`, ``) 15 | } 16 | 17 | function init() { 18 | isSurge = () => { 19 | return undefined === this.$httpClient ? false : true 20 | } 21 | isQuanX = () => { 22 | return undefined === this.$task ? false : true 23 | } 24 | getdata = (key) => { 25 | if (isSurge()) return $persistentStore.read(key) 26 | if (isQuanX()) return $prefs.valueForKey(key) 27 | } 28 | setdata = (key, val) => { 29 | if (isSurge()) return $persistentStore.write(key, val) 30 | if (isQuanX()) return $prefs.setValueForKey(key, val) 31 | } 32 | msg = (title, subtitle, body) => { 33 | if (isSurge()) $notification.post(title, subtitle, body) 34 | if (isQuanX()) $notify(title, subtitle, body) 35 | } 36 | log = (message) => console.log(message) 37 | get = (url, cb) => { 38 | if (isSurge()) { 39 | $httpClient.get(url, cb) 40 | } 41 | if (isQuanX()) { 42 | url.method = 'GET' 43 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 44 | } 45 | } 46 | post = (url, cb) => { 47 | if (isSurge()) { 48 | $httpClient.post(url, cb) 49 | } 50 | if (isQuanX()) { 51 | url.method = 'POST' 52 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 53 | } 54 | } 55 | done = (value = {}) => { 56 | $done(value) 57 | } 58 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 59 | } 60 | senku.done() 61 | -------------------------------------------------------------------------------- /chavyleung/dbsj/dbsj.js: -------------------------------------------------------------------------------- 1 | const cookieName = '豆瓣时间' 2 | const signurlKey = 'senku_signurl_dbsj' 3 | const signheaderKey = 'senku_signheader_dbsj' 4 | const signbodyKey = 'senku_signbody_dbsj' 5 | const senku = init() 6 | const signurlVal = senku.getdata(signurlKey) 7 | const signheaderVal = senku.getdata(signheaderKey) 8 | 9 | sign() 10 | 11 | function sign() { 12 | 13 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal)} 14 | senku.get(url, (error, response, data) => { 15 | const result = JSON.parse(data) 16 | let subTitle = `` 17 | let detail = `` 18 | const has_checked = result.today_status.has_checked 19 | const continuous_check_in_count = result.continuous_check_in_count 20 | const status = result.auto_check.status 21 | if (status == "success") { 22 | subTitle = `签到结果: 成功` 23 | detail = `连续签到天数${continuous_check_in_count}天` 24 | } else if (has_checked == 1) { 25 | const date = result.today_check.created_at 26 | subTitle = `签到结果: 重复 签到时间${date}` 27 | } 28 | senku.msg(cookieName, subTitle, detail) 29 | senku.done() 30 | }) 31 | } 32 | 33 | 34 | function init() { 35 | isSurge = () => { 36 | return undefined === this.$httpClient ? false : true 37 | } 38 | isQuanX = () => { 39 | return undefined === this.$task ? false : true 40 | } 41 | getdata = (key) => { 42 | if (isSurge()) return $persistentStore.read(key) 43 | if (isQuanX()) return $prefs.valueForKey(key) 44 | } 45 | setdata = (key, val) => { 46 | if (isSurge()) return $persistentStore.write(key, val) 47 | if (isQuanX()) return $prefs.setValueForKey(key, val) 48 | } 49 | msg = (title, subtitle, body) => { 50 | if (isSurge()) $notification.post(title, subtitle, body) 51 | if (isQuanX()) $notify(title, subtitle, body) 52 | } 53 | log = (message) => console.log(message) 54 | get = (url, cb) => { 55 | if (isSurge()) { 56 | $httpClient.get(url, cb) 57 | } 58 | if (isQuanX()) { 59 | url.method = 'GET' 60 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 61 | } 62 | } 63 | post = (url, cb) => { 64 | if (isSurge()) { 65 | $httpClient.post(url, cb) 66 | } 67 | if (isQuanX()) { 68 | url.method = 'POST' 69 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 70 | } 71 | } 72 | done = (value = {}) => { 73 | $done(value) 74 | } 75 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 76 | } 77 | -------------------------------------------------------------------------------- /chavyleung/dongqiudi/README.md: -------------------------------------------------------------------------------- 1 | # 懂球帝 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | api.dongqiudi.com 10 | 11 | [Script] 12 | http-request ^https:\/\/api\.dongqiudi\.com\/v2\/user\/is_login script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/dongqiudi/dongqiudi.cookie.js 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/dongqiudi/dongqiudi.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | api.dongqiudi.com 21 | 22 | [rewrite_local] 23 | # 189及以前版本 24 | ^https:\/\/api\.dongqiudi\.com\/v2\/user\/is_login url script-response-body dongqiudi.cookie.js 25 | # 190及以后版本 26 | ^https:\/\/api\.dongqiudi\.com\/v2\/user\/is_login url script-request-header dongqiudi.cookie.js 27 | 28 | [task_local] 29 | 1 0 * * * dongqiudi.js 30 | ``` 31 | 32 | ## 说明 33 | 34 | 1. 先把`api.dongqiudi.com`加到`[MITM]` 35 | 2. 再配置重写规则: 36 | - Surge: 把两条远程脚本放到`[Script]` 37 | - QuanX: 把`dongqiudi.cookie.js`和`dongqiudi.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 38 | 3. 打开懂球帝 (打开前先杀掉 APP) 39 | 4. 系统提示: `获取Cookie: 成功` (如果不提示获取成功, 尝试杀进程再进个人中心) 40 | 5. 最后就可以把第 1 条脚本注释掉了 41 | 42 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 43 | 44 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 45 | 46 | ## 常见问题 47 | 48 | 1. 无法写入 Cookie 49 | 50 | - 检查 Surge 系统通知权限放开了没 51 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 52 | 53 | 2. 写入 Cookie 成功, 但签到不成功 54 | 55 | - 看看是不是在登录前就写入 Cookie 了 56 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 57 | 58 | 3. 为什么有时成功有时失败 59 | 60 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 61 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 62 | 63 | - `Surge`配置: 64 | 65 | ```properties 66 | # 没有什么是一顿饭解决不了的: 67 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 68 | # 如果有,那就两顿: 69 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 70 | # 实在不行,三顿也能接受: 71 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 72 | 73 | # 再粗暴点,直接: 74 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 75 | ``` 76 | 77 | - `QuanX`配置: 78 | 79 | ```properties 80 | [task_local] 81 | 1 0 * * * xxx.js # 每天00:01执行一次 82 | 2 0 * * * xxx.js # 每天00:02执行一次 83 | 3 0 * * * xxx.js # 每天00:03执行一次 84 | 85 | */60 * * * * xxx.js # 每60分执行一次 86 | ``` 87 | 88 | ## 感谢 89 | 90 | [@NobyDa](https://github.com/NobyDa) 91 | 92 | [@lhie1](https://github.com/lhie1) 93 | 94 | [@ConnersHua](https://github.com/ConnersHua) 95 | -------------------------------------------------------------------------------- /chavyleung/dongqiudi/dongqiudi.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '懂球帝' 2 | const cookieKey = 'chavy_cookie_dongqiudi' 3 | const chavy = init() 4 | const cookieVal = JSON.stringify({ 5 | UUID: $request.headers['UUID'], 6 | Authorization: $request.headers['Authorization'] 7 | }) 8 | if (cookieVal && chavy.setdata(cookieVal, cookieKey)) { 9 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 10 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 11 | } 12 | function init() { 13 | isSurge = () => { 14 | return undefined === this.$httpClient ? false : true 15 | } 16 | isQuanX = () => { 17 | return undefined === this.$task ? false : true 18 | } 19 | getdata = (key) => { 20 | if (isSurge()) return $persistentStore.read(key) 21 | if (isQuanX()) return $prefs.valueForKey(key) 22 | } 23 | setdata = (key, val) => { 24 | if (isSurge()) return $persistentStore.write(key, val) 25 | if (isQuanX()) return $prefs.setValueForKey(key, val) 26 | } 27 | msg = (title, subtitle, body) => { 28 | if (isSurge()) $notification.post(title, subtitle, body) 29 | if (isQuanX()) $notify(title, subtitle, body) 30 | } 31 | log = (message) => console.log(message) 32 | get = (url, cb) => { 33 | if (isSurge()) { 34 | $httpClient.get(url, cb) 35 | } 36 | if (isQuanX()) { 37 | url.method = 'GET' 38 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 39 | } 40 | } 41 | post = (url, cb) => { 42 | if (isSurge()) { 43 | $httpClient.post(url, cb) 44 | } 45 | if (isQuanX()) { 46 | url.method = 'POST' 47 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 48 | } 49 | } 50 | done = (value = {}) => { 51 | $done(value) 52 | } 53 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 54 | } 55 | chavy.done() 56 | -------------------------------------------------------------------------------- /chavyleung/duokan/README.md: -------------------------------------------------------------------------------- 1 | # 多看阅读 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | > QuanX 需要: v1.0.6-build195 及以后版本 (TestFlight) 6 | 7 | ## 配置 (Surge) 8 | 9 | ```properties 10 | [MITM] 11 | www.duokan.com 12 | 13 | [Script] 14 | http-request ^https:\/\/www\.duokan\.com\/checkin\/v0\/status script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/duokan/duokan.cookie.js, requires-body=true 15 | 16 | cron "0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/duokan/duokan.js 17 | ``` 18 | 19 | ## 配置 (QuanX) 20 | 21 | ```properties 22 | [MITM] 23 | www.duokan.com 24 | 25 | [rewrite_local] 26 | # [商店版] QuanX v1.0.6-build194 及更早版本 27 | ^https:\/\/www\.duokan\.com\/checkin\/v0\/status url script-request-body duokan.cookie.js 28 | 29 | # [TestFlight] QuanX v1.0.6-build195 及以后版本 30 | ^https:\/\/www\.duokan\.com\/checkin\/v0\/status url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/duokan/duokan.cookie.js 31 | 32 | [task_local] 33 | 0 0 * * * duokan.js 34 | ``` 35 | 36 | ## 说明 37 | 1. 先把 `www.duokan.com` 加到 `[MITM]` 38 | 2. 再配置重写规则: 39 | - Surge: 把两条远程脚本放到 `[Script]` 40 | - QuanX: 把 `duokan.cookie.js` 和 `duokan.js` 传到 `On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 41 | 3. 获取 Cookie: `我的` > `签到任务` 等到提示获取 Cookie 成功即可 42 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 43 | 44 | > 第 2 条脚本是签到脚本, 每天 `00:00` 执行一次. 45 | 46 | ## 常见问题 47 | 48 | 1. 无法写入 Cookie 49 | 50 | - 检查 Surge 系统通知权限放开了没 51 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 52 | 53 | 2. 写入 Cookie 成功, 但签到不成功 54 | 55 | - 看看是不是在登录前就写入 Cookie 了 56 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 57 | 58 | 3. 为什么有时成功有时失败 59 | 60 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 61 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 62 | 63 | - `Surge`配置: 64 | 65 | ```properties 66 | # 没有什么是一顿饭解决不了的: 67 | cron "10 0 0 * * *" script-path=xxx.js # 每天 00:00:10 执行一次 68 | # 如果有,那就两顿: 69 | cron "20 0 0 * * *" script-path=xxx.js # 每天 00:00:20 执行一次 70 | # 实在不行,三顿也能接受: 71 | cron "30 0 0 * * *" script-path=xxx.js # 每天 00:00:30 执行一次 72 | 73 | # 再粗暴点,直接: 74 | cron "* */60 * * * *" script-path=xxx.js # 每 60 分执行一次 75 | ``` 76 | 77 | - `QuanX`配置: 78 | 79 | ```properties 80 | [task_local] 81 | 1 0 * * * xxx.js # 每天 00:01 执行一次 82 | 2 0 * * * xxx.js # 每天 00:02 执行一次 83 | 3 0 * * * xxx.js # 每天 00:03 执行一次 84 | 85 | */60 * * * * xxx.js # 每 60 分执行一次 86 | ``` 87 | 88 | ## 感谢 89 | 90 | [@NobyDa](https://github.com/NobyDa) 91 | 92 | [@lhie1](https://github.com/lhie1) 93 | 94 | [@ConnersHua](https://github.com/ConnersHua) -------------------------------------------------------------------------------- /chavyleung/duokan/duokan.cookie.js: -------------------------------------------------------------------------------- 1 | const DUOKAN_COOKIE_KEY = 'duokan_cookie' 2 | const DUOKAN_DEVICE_ID_KEY = 'duokan_device_id' 3 | 4 | let $util = init() 5 | 6 | if (typeof $request !== 'undefined') { 7 | getCookie() 8 | } 9 | $util.done({}) 10 | 11 | function getCookie() { 12 | let cookieVal = $request.headers['Cookie'] 13 | $util.log(`cookie: ${cookieVal}`) 14 | if (cookieVal.indexOf('token=') !== -1 && cookieVal.indexOf('device_id=') !== -1) { 15 | let regexp = /device_id=(.*?);/g 16 | let matched = regexp.exec(cookieVal) 17 | if (matched) { 18 | let deviceId = matched[1] 19 | $util.log(`deviceId: ${deviceId}`) 20 | if ($util.setdata(cookieVal, DUOKAN_COOKIE_KEY) && $util.setdata(deviceId, DUOKAN_DEVICE_ID_KEY)) { 21 | $util.msg(`获取多看阅读 Cookie 成功 🎉`) 22 | } 23 | } 24 | } 25 | } 26 | 27 | function init() { 28 | isSurge = () => { 29 | return undefined !== this.$httpClient 30 | } 31 | isQuanX = () => { 32 | return undefined !== this.$task 33 | } 34 | getdata = (key) => { 35 | if (isSurge()) return $persistentStore.read(key) 36 | if (isQuanX()) return $prefs.valueForKey(key) 37 | } 38 | setdata = (key, val) => { 39 | if (isSurge()) return $persistentStore.write(key, val) 40 | if (isQuanX()) return $prefs.setValueForKey(key, val) 41 | } 42 | msg = (title, subtitle = '', body = '') => { 43 | if (isSurge()) $notification.post(title, subtitle, body) 44 | if (isQuanX()) $notify(title, subtitle, body) 45 | } 46 | log = (msg) => { 47 | console.log(`${msg}\n`) 48 | } 49 | get = (options, callback) => { 50 | if (isQuanX()) { 51 | if (typeof options == 'string') options = { url: options } 52 | options['method'] = 'GET' 53 | return $task.fetch(options).then( 54 | (response) => { 55 | response['status'] = response.statusCode 56 | callback(null, response, response.body) 57 | }, 58 | (reason) => callback(reason.error, null, null) 59 | ) 60 | } 61 | if (isSurge()) return $httpClient.get(options, callback) 62 | } 63 | post = (options, callback) => { 64 | if (isQuanX()) { 65 | if (typeof options == 'string') options = { url: options } 66 | options['method'] = 'POST' 67 | $task.fetch(options).then( 68 | (response) => { 69 | response['status'] = response.statusCode 70 | callback(null, response, response.body) 71 | }, 72 | (reason) => callback(reason.error, null, null) 73 | ) 74 | } 75 | if (isSurge()) $httpClient.post(options, callback) 76 | } 77 | done = (value = {}) => { 78 | $done(value) 79 | } 80 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 81 | } 82 | -------------------------------------------------------------------------------- /chavyleung/everphoto/README.md: -------------------------------------------------------------------------------- 1 | # 时光相册 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | api.everphoto.cn 10 | 11 | [Script] 12 | http-request ^https:\/\/api.everphoto.cn\/users\/self\/checkin\/v2 script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/everphoto/everphoto.cookie.js 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/everphoto/everphoto.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | api.everphoto.cn 21 | 22 | [rewrite_local] 23 | ^https:\/\/api.everphoto.cn\/users\/self\/checkin\/v2 url script-request-header everphoto.cookie.js 24 | 25 | [task_local] 26 | 1 0 * * * everphoto.js 27 | ``` 28 | 29 | ## 说明 30 | 31 | 1. 先把`api.everphoto.cn`加到`[MITM]` 32 | 2. 再配置重写规则: 33 | - Surge: 把两条远程脚本放到`[Script]` 34 | - QuanX: 把`everphoto.cookie.js`和`everphoto.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 35 | 3. 打开 APP 然后手动签到 1 次, 系统提示: `获取Cookie: 成功` 36 | 4. 最后就可以把第 1 条脚本注释掉了 37 | 5. 运行一次脚本, 如果提示重复签到, 那就算成功了! 38 | 39 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 40 | 41 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 42 | 43 | ## 常见问题 44 | 45 | 1. 无法写入 Cookie 46 | 47 | - 检查 Surge 系统通知权限放开了没 48 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 49 | 50 | 2. 写入 Cookie 成功, 但签到不成功 51 | 52 | - 看看是不是在登录前就写入 Cookie 了 53 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 54 | 55 | 3. 为什么有时成功有时失败 56 | 57 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 58 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 59 | 60 | - `Surge`配置: 61 | 62 | ```properties 63 | # 没有什么是一顿饭解决不了的: 64 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 65 | # 如果有,那就两顿: 66 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 67 | # 实在不行,三顿也能接受: 68 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 69 | 70 | # 再粗暴点,直接: 71 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 72 | ``` 73 | 74 | - `QuanX`配置: 75 | 76 | ```properties 77 | [task_local] 78 | 1 0 * * * xxx.js # 每天00:01执行一次 79 | 2 0 * * * xxx.js # 每天00:02执行一次 80 | 3 0 * * * xxx.js # 每天00:03执行一次 81 | 82 | */60 * * * * xxx.js # 每60分执行一次 83 | ``` 84 | 85 | ## 感谢 86 | 87 | [@NobyDa](https://github.com/NobyDa) 88 | 89 | [@lhie1](https://github.com/lhie1) 90 | 91 | [@ConnersHua](https://github.com/ConnersHua) 92 | -------------------------------------------------------------------------------- /chavyleung/everphoto/everphoto.cookie.js: -------------------------------------------------------------------------------- 1 | const chavy = init() 2 | const cookieName = '时光相册' 3 | const KEY_signurl = 'chavy_sign_url_everphoto' 4 | const KEY_signheader = 'chavy_sign_header_everphoto' 5 | 6 | if ($request && $request.method != 'OPTIONS') { 7 | try { 8 | chavy.log(`🔔 ${cookieName} 开始获取: Cookies`) 9 | const VAL_signurl = $request.url 10 | const VAL_signheader = JSON.stringify($request.headers) 11 | if (VAL_signurl) { 12 | chavy.setdata(VAL_signurl, KEY_signurl) 13 | chavy.log(`❕ ${cookieName} VAL_signurl: ${VAL_signurl}`) 14 | } 15 | if (VAL_signheader) { 16 | chavy.setdata(VAL_signheader, KEY_signheader) 17 | chavy.log(`❕ ${cookieName} VAL_signheader: ${VAL_signheader}`) 18 | } 19 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 20 | } catch (e) { 21 | chavy.msg(cookieName, `获取Cookie: 失败`, e) 22 | chavy.log(`❌ ${cookieName} 获取Cookie: 失败: ${e}`) 23 | } 24 | } 25 | 26 | function init() { 27 | isSurge = () => { 28 | return undefined === this.$httpClient ? false : true 29 | } 30 | isQuanX = () => { 31 | return undefined === this.$task ? false : true 32 | } 33 | getdata = (key) => { 34 | if (isSurge()) return $persistentStore.read(key) 35 | if (isQuanX()) return $prefs.valueForKey(key) 36 | } 37 | setdata = (key, val) => { 38 | if (isSurge()) return $persistentStore.write(key, val) 39 | if (isQuanX()) return $prefs.setValueForKey(key, val) 40 | } 41 | msg = (title, subtitle, body) => { 42 | if (isSurge()) $notification.post(title, subtitle, body) 43 | if (isQuanX()) $notify(title, subtitle, body) 44 | } 45 | log = (message) => console.log(message) 46 | get = (url, cb) => { 47 | if (isSurge()) { 48 | $httpClient.get(url, cb) 49 | } 50 | if (isQuanX()) { 51 | url.method = 'GET' 52 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 53 | } 54 | } 55 | post = (url, cb) => { 56 | if (isSurge()) { 57 | $httpClient.post(url, cb) 58 | } 59 | if (isQuanX()) { 60 | url.method = 'POST' 61 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 62 | } 63 | } 64 | done = (value = {}) => { 65 | $done(value) 66 | } 67 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 68 | } 69 | chavy.done() 70 | -------------------------------------------------------------------------------- /chavyleung/fandeng/fandeng.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '樊登读书' 2 | const signurlKey = 'senku_signurl_pandeng' 3 | const signheaderKey = 'senku_signheader_pandeng' 4 | const signbodyKey = 'senku_signbody_pandeng' 5 | const senku = init() 6 | 7 | const requrl = $request.url 8 | if ($request && $request.method != 'OPTIONS') { 9 | const signurlVal = requrl 10 | const signheaderVal = JSON.stringify($request.headers) 11 | const signbodyVal = $request.body 12 | senku.log(`signurlVal:${signurlVal}`) 13 | senku.log(`signheaderVal:${signheaderVal}`) 14 | senku.log(`signbodyVal:${signbodyVal}`) 15 | if (signurlVal) senku.setdata(signurlVal, signurlKey) 16 | if (signheaderVal) senku.setdata(signheaderVal, signheaderKey) 17 | if (signbodyVal) senku.setdata(signbodyVal, signbodyKey) 18 | senku.msg(cookieName, `获取Cookie: 成功`, ``) 19 | } 20 | 21 | function init() { 22 | isSurge = () => { 23 | return undefined === this.$httpClient ? false : true 24 | } 25 | isQuanX = () => { 26 | return undefined === this.$task ? false : true 27 | } 28 | getdata = (key) => { 29 | if (isSurge()) return $persistentStore.read(key) 30 | if (isQuanX()) return $prefs.valueForKey(key) 31 | } 32 | setdata = (key, val) => { 33 | if (isSurge()) return $persistentStore.write(key, val) 34 | if (isQuanX()) return $prefs.setValueForKey(key, val) 35 | } 36 | msg = (title, subtitle, body) => { 37 | if (isSurge()) $notification.post(title, subtitle, body) 38 | if (isQuanX()) $notify(title, subtitle, body) 39 | } 40 | log = (message) => console.log(message) 41 | get = (url, cb) => { 42 | if (isSurge()) { 43 | $httpClient.get(url, cb) 44 | } 45 | if (isQuanX()) { 46 | url.method = 'GET' 47 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 48 | } 49 | } 50 | post = (url, cb) => { 51 | if (isSurge()) { 52 | $httpClient.post(url, cb) 53 | } 54 | if (isQuanX()) { 55 | url.method = 'POST' 56 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 57 | } 58 | } 59 | done = (value = {}) => { 60 | $done(value) 61 | } 62 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 63 | } 64 | senku.done() 65 | -------------------------------------------------------------------------------- /chavyleung/fandeng/fandeng.js: -------------------------------------------------------------------------------- 1 | const cookieName = '樊登读书' 2 | const signurlKey = 'senku_signurl_pandeng' 3 | const signheaderKey = 'senku_signheader_pandeng' 4 | const signbodyKey = 'senku_signbody_pandeng' 5 | const senku = init() 6 | const signurlVal = senku.getdata(signurlKey) 7 | const signheaderVal = senku.getdata(signheaderKey) 8 | const signBodyVal = senku.getdata(signbodyKey) 9 | 10 | sign() 11 | 12 | function sign() { 13 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal), body: signBodyVal } 14 | senku.post(url, (error, response, data) => { 15 | senku.log(`${cookieName}, data: ${data}`) 16 | const res = JSON.parse(data) 17 | let subTitle = `` 18 | let detail = `` 19 | if (res.status == 1) { 20 | subTitle = `签到结果: 成功` 21 | } else { 22 | subTitle = `签到结果: 失败` 23 | detail = `状态: ${res.message}` 24 | } 25 | senku.msg(cookieName, subTitle, detail) 26 | senku.done() 27 | }) 28 | } 29 | 30 | function init() { 31 | isSurge = () => { 32 | return undefined === this.$httpClient ? false : true 33 | } 34 | isQuanX = () => { 35 | return undefined === this.$task ? false : true 36 | } 37 | getdata = (key) => { 38 | if (isSurge()) return $persistentStore.read(key) 39 | if (isQuanX()) return $prefs.valueForKey(key) 40 | } 41 | setdata = (key, val) => { 42 | if (isSurge()) return $persistentStore.write(key, val) 43 | if (isQuanX()) return $prefs.setValueForKey(key, val) 44 | } 45 | msg = (title, subtitle, body) => { 46 | if (isSurge()) $notification.post(title, subtitle, body) 47 | if (isQuanX()) $notify(title, subtitle, body) 48 | } 49 | log = (message) => console.log(message) 50 | get = (url, cb) => { 51 | if (isSurge()) { 52 | $httpClient.get(url, cb) 53 | } 54 | if (isQuanX()) { 55 | url.method = 'GET' 56 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 57 | } 58 | } 59 | post = (url, cb) => { 60 | if (isSurge()) { 61 | $httpClient.post(url, cb) 62 | } 63 | if (isQuanX()) { 64 | url.method = 'POST' 65 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 66 | } 67 | } 68 | done = (value = {}) => { 69 | $done(value) 70 | } 71 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 72 | } 73 | -------------------------------------------------------------------------------- /chavyleung/feng/feng.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '威锋网' 2 | const cookieKey = 'chavy_cookie_feng' 3 | const chavy = init() 4 | const cookieVal = $request.headers['Cookie'] 5 | if (cookieVal.indexOf('userInfo') >= 0) { 6 | if (cookieVal) { 7 | if (chavy.setdata(cookieVal, cookieKey)) { 8 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 9 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 10 | } 11 | } 12 | } else { 13 | let subTitle = '获取Cookie: 失败' 14 | let detail = `请确保在已登录状态下获取Cookie` 15 | chavy.msg(`${cookieName}`, subTitle, detail) 16 | chavy.log(`[${cookieName}] ${subTitle}, cookie: ${cookieVal}`) 17 | } 18 | function init() { 19 | isSurge = () => { 20 | return undefined === this.$httpClient ? false : true 21 | } 22 | isQuanX = () => { 23 | return undefined === this.$task ? false : true 24 | } 25 | getdata = (key) => { 26 | if (isSurge()) return $persistentStore.read(key) 27 | if (isQuanX()) return $prefs.valueForKey(key) 28 | } 29 | setdata = (key, val) => { 30 | if (isSurge()) return $persistentStore.write(key, val) 31 | if (isQuanX()) return $prefs.setValueForKey(key, val) 32 | } 33 | msg = (title, subtitle, body) => { 34 | if (isSurge()) $notification.post(title, subtitle, body) 35 | if (isQuanX()) $notify(title, subtitle, body) 36 | } 37 | log = (message) => console.log(message) 38 | get = (url, cb) => { 39 | if (isSurge()) { 40 | $httpClient.get(url, cb) 41 | } 42 | if (isQuanX()) { 43 | url.method = 'GET' 44 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 45 | } 46 | } 47 | post = (url, cb) => { 48 | if (isSurge()) { 49 | $httpClient.post(url, cb) 50 | } 51 | if (isQuanX()) { 52 | url.method = 'POST' 53 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 54 | } 55 | } 56 | done = (value = {}) => { 57 | $done(value) 58 | } 59 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 60 | } 61 | chavy.done() 62 | -------------------------------------------------------------------------------- /chavyleung/fenqile/fenqile.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '分期乐' 2 | const signurlKey = 'senku_signurl_fenqile' 3 | const signheaderKey = 'senku_signheader_fenqile' 4 | const signbodyKey = 'senku_signbody_fenqile' 5 | const signDailyKey = 'senku_signDailyKey_fenqile' 6 | const signDailyUrlKey = 'senku_signDailyUrlKey_fenqile' 7 | const senku = init() 8 | 9 | const requrl = $request.url 10 | if ($request && $request.method != 'OPTIONS' && requrl.match(/\/route0014\/star\/sign\//)) { 11 | const signurlVal = requrl 12 | const signheaderVal = JSON.stringify($request.headers) 13 | const signbodyVal = $request.body 14 | if (signurlVal) senku.setdata(signurlVal, signurlKey) 15 | if (signheaderVal) senku.setdata(signheaderVal, signheaderKey) 16 | if (signbodyVal) senku.setdata(signbodyVal, signbodyKey) 17 | senku.msg(cookieName, `获取Cookie: 成功`, `签到领乐星`) 18 | } else { 19 | const signDailyUrlVal = $request.url 20 | const signDailyVal = $request.body; 21 | if (signDailyUrlVal) senku.setdata(signDailyUrlVal,signDailyUrlKey) 22 | if (signDailyVal) senku.setdata(signDailyVal,signDailyKey) 23 | senku.msg(cookieName, `获取Cookie: 成功`, `天天领乐星`) 24 | senku.log() 25 | } 26 | 27 | function init() { 28 | isSurge = () => { 29 | return undefined === this.$httpClient ? false : true 30 | } 31 | isQuanX = () => { 32 | return undefined === this.$task ? false : true 33 | } 34 | getdata = (key) => { 35 | if (isSurge()) return $persistentStore.read(key) 36 | if (isQuanX()) return $prefs.valueForKey(key) 37 | } 38 | setdata = (key, val) => { 39 | if (isSurge()) return $persistentStore.write(key, val) 40 | if (isQuanX()) return $prefs.setValueForKey(key, val) 41 | } 42 | msg = (title, subtitle, body) => { 43 | if (isSurge()) $notification.post(title, subtitle, body) 44 | if (isQuanX()) $notify(title, subtitle, body) 45 | } 46 | log = (message) => console.log(message) 47 | get = (url, cb) => { 48 | if (isSurge()) { 49 | $httpClient.get(url, cb) 50 | } 51 | if (isQuanX()) { 52 | url.method = 'GET' 53 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 54 | } 55 | } 56 | post = (url, cb) => { 57 | if (isSurge()) { 58 | $httpClient.post(url, cb) 59 | } 60 | if (isQuanX()) { 61 | url.method = 'POST' 62 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 63 | } 64 | } 65 | done = (value = {}) => { 66 | $done(value) 67 | } 68 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 69 | } 70 | senku.done() 71 | -------------------------------------------------------------------------------- /chavyleung/flyertea/README.md: -------------------------------------------------------------------------------- 1 | # 飞客茶馆 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | > 2020.1.11 QuanX 在`190`版本开始, 获取 Cookie 方式需要从`script-response-body`改为`script-request-header` 6 | 7 | ## 配置 (Surge) 8 | 9 | ```properties 10 | [MITM] 11 | www.flyertea.com 12 | 13 | [Script] 14 | http-request ^https:\/\/www\.flyertea\.com\/source\/plugin\/mobile\/mobile\.php\?module=getdata&.* script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/flyertea/flyertea.cookie.js 15 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/flyertea/flyertea.js 16 | ``` 17 | 18 | ## 配置 (QuanX) 19 | 20 | ```properties 21 | [MITM] 22 | www.flyertea.com 23 | 24 | [rewrite_local] 25 | # 189及以前版本 26 | ^https:\/\/www\.flyertea\.com\/source\/plugin\/mobile\/mobile\.php\?module=getdata&.* url script-response-body flyertea.cookie.js 27 | # 190及以后版本 28 | ^https:\/\/www\.flyertea\.com\/source\/plugin\/mobile\/mobile\.php\?module=getdata&.* url script-request-header flyertea.cookie.js 29 | 30 | [task_local] 31 | 1 0 * * * flyertea.js 32 | ``` 33 | 34 | ## 说明 35 | 36 | 1. 先把`www.flyertea.com`加到`[MITM]` 37 | 2. 再配置重写规则: 38 | - Surge: 把两条远程脚本放到`[Script]` 39 | - QuanX: 把`flyertea.cookie.js`和`flyertea.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 40 | 3. 打开 APP, 访问下`个人中心` 41 | 4. 系统提示: `获取Cookie: 成功` (如果不提示获取成功, 尝试杀进程再进个人中心) 42 | 5. 最后就可以把第 1 条脚本注释掉了 43 | 44 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 45 | 46 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 47 | 48 | ## 常见问题 49 | 50 | 1. 无法写入 Cookie 51 | 52 | - 检查 Surge 系统通知权限放开了没 53 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 54 | 55 | 2. 写入 Cookie 成功, 但签到不成功 56 | 57 | - 看看是不是在登录前就写入 Cookie 了 58 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 59 | 60 | 3. 为什么有时成功有时失败 61 | 62 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 63 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 64 | 65 | - `Surge`配置: 66 | 67 | ```properties 68 | # 没有什么是一顿饭解决不了的: 69 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 70 | # 如果有,那就两顿: 71 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 72 | # 实在不行,三顿也能接受: 73 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 74 | 75 | # 再粗暴点,直接: 76 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 77 | ``` 78 | 79 | - `QuanX`配置: 80 | 81 | ```properties 82 | [task_local] 83 | 1 0 * * * xxx.js # 每天00:01执行一次 84 | 2 0 * * * xxx.js # 每天00:02执行一次 85 | 3 0 * * * xxx.js # 每天00:03执行一次 86 | 87 | */60 * * * * xxx.js # 每60分执行一次 88 | ``` 89 | 90 | ## 感谢 91 | 92 | [@NobyDa](https://github.com/NobyDa) 93 | 94 | [@lhie1](https://github.com/lhie1) 95 | 96 | [@ConnersHua](https://github.com/ConnersHua) 97 | -------------------------------------------------------------------------------- /chavyleung/flyertea/flyertea.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '飞客茶馆' 2 | const cookieKey = 'chavy_cookie_flyertea' 3 | const tokenKey = 'chavy_token_flyertea' 4 | const chavy = init() 5 | const cookieVal = $request.headers['Cookie'] 6 | if (cookieVal) { 7 | if (chavy.setdata(cookieVal, cookieKey)) { 8 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 9 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 10 | } 11 | } 12 | 13 | const queryparam = $request.url.split('?')[1] 14 | if (queryparam) { 15 | const params = {} 16 | for (param of $request.url.split('?')[1].split('&')) { 17 | params[param.split('=')[0]] = param.split('=')[1] 18 | } 19 | const token = JSON.stringify(params) 20 | if (chavy.setdata(token, tokenKey)) { 21 | chavy.msg(`${cookieName}`, '获取Token: 成功', '') 22 | chavy.log(`[${cookieName}] 获取Token: 成功, token: ${token}`) 23 | } 24 | } 25 | 26 | function init() { 27 | isSurge = () => { 28 | return undefined === this.$httpClient ? false : true 29 | } 30 | isQuanX = () => { 31 | return undefined === this.$task ? false : true 32 | } 33 | getdata = (key) => { 34 | if (isSurge()) return $persistentStore.read(key) 35 | if (isQuanX()) return $prefs.valueForKey(key) 36 | } 37 | setdata = (key, val) => { 38 | if (isSurge()) return $persistentStore.write(key, val) 39 | if (isQuanX()) return $prefs.setValueForKey(key, val) 40 | } 41 | msg = (title, subtitle, body) => { 42 | if (isSurge()) $notification.post(title, subtitle, body) 43 | if (isQuanX()) $notify(title, subtitle, body) 44 | } 45 | log = (message) => console.log(message) 46 | get = (url, cb) => { 47 | if (isSurge()) { 48 | $httpClient.get(url, cb) 49 | } 50 | if (isQuanX()) { 51 | url.method = 'GET' 52 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 53 | } 54 | } 55 | post = (url, cb) => { 56 | if (isSurge()) { 57 | $httpClient.post(url, cb) 58 | } 59 | if (isQuanX()) { 60 | url.method = 'POST' 61 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 62 | } 63 | } 64 | done = (value = {}) => { 65 | $done(value) 66 | } 67 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 68 | } 69 | chavy.done() 70 | -------------------------------------------------------------------------------- /chavyleung/gdoil/README.md: -------------------------------------------------------------------------------- 1 | # 加油广东 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | > 2020.2.28 更新域名: gdws.nsenz.com > m.gdoil.cn 6 | 7 | ## 配置 (Surge) 8 | 9 | ```properties 10 | [MITM] 11 | m.gdoil.cn 12 | 13 | [Script] 14 | http-request ^https:\/\/m.gdoil.cn\/webapi\/usersign\/addusersign script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/gdoil/gdoil.cookie.js 15 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/gdoil/gdoil.js 16 | ``` 17 | 18 | ## 配置 (QuanX) 19 | 20 | ```properties 21 | [MITM] 22 | m.gdoil.cn 23 | 24 | [rewrite_local] 25 | ^https:\/\/m.gdoil.cn\/webapi\/usersign\/addusersign url script-request-header gdoil.cookie.js 26 | 27 | [task_local] 28 | 1 0 * * * gdoil.js 29 | ``` 30 | 31 | ## 说明 32 | 33 | 1. 先把`m.gdoil.cn`加到`[MITM]` 34 | 2. 再配置重写规则: 35 | - Surge: 把两条远程脚本放到`[Script]` 36 | - QuanX: 把`gdoil.cookie.js`和`gdoil.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 37 | 3. 打开 APP 然后手动签到 1 次, 系统提示: `获取Cookie: 成功` 38 | 4. 最后就可以把第 1 条脚本注释掉了 39 | 5. 运行一次脚本, 如果提示重复签到, 那就算成功了! 40 | 41 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 42 | 43 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 44 | 45 | ## 常见问题 46 | 47 | 1. 无法写入 Cookie 48 | 49 | - 检查 Surge 系统通知权限放开了没 50 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 51 | 52 | 2. 写入 Cookie 成功, 但签到不成功 53 | 54 | - 看看是不是在登录前就写入 Cookie 了 55 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 56 | 57 | 3. 为什么有时成功有时失败 58 | 59 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 60 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 61 | 62 | - `Surge`配置: 63 | 64 | ```properties 65 | # 没有什么是一顿饭解决不了的: 66 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 67 | # 如果有,那就两顿: 68 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 69 | # 实在不行,三顿也能接受: 70 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 71 | 72 | # 再粗暴点,直接: 73 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 74 | ``` 75 | 76 | - `QuanX`配置: 77 | 78 | ```properties 79 | [task_local] 80 | 1 0 * * * xxx.js # 每天00:01执行一次 81 | 2 0 * * * xxx.js # 每天00:02执行一次 82 | 3 0 * * * xxx.js # 每天00:03执行一次 83 | 84 | */60 * * * * xxx.js # 每60分执行一次 85 | ``` 86 | 87 | ## 感谢 88 | 89 | [@NobyDa](https://github.com/NobyDa) 90 | 91 | [@lhie1](https://github.com/lhie1) 92 | 93 | [@ConnersHua](https://github.com/ConnersHua) 94 | -------------------------------------------------------------------------------- /chavyleung/gdoil/gdoil.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '加油广东' 2 | const signurlKey = 'chavy_signurl_gdoil' 3 | const signheaderKey = 'chavy_signheader_gdoil' 4 | const chavy = init() 5 | 6 | if ($request && $request.method != 'OPTIONS') { 7 | const signurlVal = $request.url 8 | const signheaderVal = JSON.stringify($request.headers) 9 | if (signurlVal) chavy.setdata(signurlVal, signurlKey) 10 | if (signheaderVal) chavy.setdata(signheaderVal, signheaderKey) 11 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 12 | } 13 | 14 | function init() { 15 | isSurge = () => { 16 | return undefined === this.$httpClient ? false : true 17 | } 18 | isQuanX = () => { 19 | return undefined === this.$task ? false : true 20 | } 21 | getdata = (key) => { 22 | if (isSurge()) return $persistentStore.read(key) 23 | if (isQuanX()) return $prefs.valueForKey(key) 24 | } 25 | setdata = (key, val) => { 26 | if (isSurge()) return $persistentStore.write(key, val) 27 | if (isQuanX()) return $prefs.setValueForKey(key, val) 28 | } 29 | msg = (title, subtitle, body) => { 30 | if (isSurge()) $notification.post(title, subtitle, body) 31 | if (isQuanX()) $notify(title, subtitle, body) 32 | } 33 | log = (message) => console.log(message) 34 | get = (url, cb) => { 35 | if (isSurge()) { 36 | $httpClient.get(url, cb) 37 | } 38 | if (isQuanX()) { 39 | url.method = 'GET' 40 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 41 | } 42 | } 43 | post = (url, cb) => { 44 | if (isSurge()) { 45 | $httpClient.post(url, cb) 46 | } 47 | if (isQuanX()) { 48 | url.method = 'POST' 49 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 50 | } 51 | } 52 | done = (value = {}) => { 53 | $done(value) 54 | } 55 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 56 | } 57 | chavy.done() 58 | -------------------------------------------------------------------------------- /chavyleung/gdoil/gdoil.js: -------------------------------------------------------------------------------- 1 | const cookieName = '加油广东' 2 | const signurlKey = 'chavy_signurl_gdoil' 3 | const signheaderKey = 'chavy_signheader_gdoil' 4 | const chavy = init() 5 | const signurlVal = chavy.getdata(signurlKey) 6 | const signheaderVal = chavy.getdata(signheaderKey) 7 | 8 | sign() 9 | 10 | function sign() { 11 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal) } 12 | url.body = '{}' 13 | chavy.post(url, (error, response, data) => { 14 | chavy.log(`${cookieName}, data: ${data}`) 15 | const result = JSON.parse(data) 16 | const title = `${cookieName}` 17 | let subTitle = '' 18 | let detail = '' 19 | if (result.result == true) { 20 | subTitle = `签到结果: 成功` 21 | } else { 22 | if (result.msg.indexOf('已经签到') >= 0) subTitle = `签到结果: 成功 (重复签到)` 23 | else subTitle = `签到结果: 失败` 24 | detail = `说明: ${result.msg}` 25 | } 26 | chavy.msg(title, subTitle, detail) 27 | chavy.done() 28 | }) 29 | } 30 | 31 | function init() { 32 | isSurge = () => { 33 | return undefined === this.$httpClient ? false : true 34 | } 35 | isQuanX = () => { 36 | return undefined === this.$task ? false : true 37 | } 38 | getdata = (key) => { 39 | if (isSurge()) return $persistentStore.read(key) 40 | if (isQuanX()) return $prefs.valueForKey(key) 41 | } 42 | setdata = (key, val) => { 43 | if (isSurge()) return $persistentStore.write(key, val) 44 | if (isQuanX()) return $prefs.setValueForKey(key, val) 45 | } 46 | msg = (title, subtitle, body) => { 47 | if (isSurge()) $notification.post(title, subtitle, body) 48 | if (isQuanX()) $notify(title, subtitle, body) 49 | } 50 | log = (message) => console.log(message) 51 | get = (url, cb) => { 52 | if (isSurge()) { 53 | $httpClient.get(url, cb) 54 | } 55 | if (isQuanX()) { 56 | url.method = 'GET' 57 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 58 | } 59 | } 60 | post = (url, cb) => { 61 | if (isSurge()) { 62 | $httpClient.post(url, cb) 63 | } 64 | if (isQuanX()) { 65 | url.method = 'POST' 66 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 67 | } 68 | } 69 | done = (value = {}) => { 70 | $done(value) 71 | } 72 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 73 | } 74 | -------------------------------------------------------------------------------- /chavyleung/hycan/hycan.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'HYCAN合创' 2 | const signurlKey = 'signurl_hycan' 3 | const signheaderKey = 'signheader_hycan' 4 | const hycan = init() 5 | 6 | if ($request && $request.method == 'POST') { 7 | const signurlVal = $request.url 8 | const signheaderVal = JSON.stringify($request.headers) 9 | 10 | if (signurlVal) hycan.setdata(signurlVal, signurlKey) 11 | if (signheaderVal) hycan.setdata(signheaderVal, signheaderKey) 12 | hycan.msg(cookieName, `获取Cookie: 成功`, ``) 13 | } 14 | 15 | function init() { 16 | isSurge = () => { 17 | return undefined === this.$httpClient ? false : true 18 | } 19 | isQuanX = () => { 20 | return undefined === this.$task ? false : true 21 | } 22 | getdata = (key) => { 23 | if (isSurge()) return $persistentStore.read(key) 24 | if (isQuanX()) return $prefs.valueForKey(key) 25 | } 26 | setdata = (key, val) => { 27 | if (isSurge()) return $persistentStore.write(key, val) 28 | if (isQuanX()) return $prefs.setValueForKey(key, val) 29 | } 30 | msg = (title, subtitle, body) => { 31 | if (isSurge()) $notification.post(title, subtitle, body) 32 | if (isQuanX()) $notify(title, subtitle, body) 33 | } 34 | log = (message) => console.log(message) 35 | get = (url, cb) => { 36 | if (isSurge()) { 37 | $httpClient.get(url, cb) 38 | } 39 | if (isQuanX()) { 40 | url.method = 'GET' 41 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 42 | } 43 | } 44 | post = (url, cb) => { 45 | if (isSurge()) { 46 | $httpClient.post(url, cb) 47 | } 48 | if (isQuanX()) { 49 | url.method = 'POST' 50 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 51 | } 52 | } 53 | put = (url, cb) => { 54 | if (isSurge()) { 55 | $httpClient.put(url, cb) 56 | } 57 | if (isQuanX()) { 58 | url.method = 'PUT' 59 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 60 | } 61 | } 62 | done = (value = {}) => { 63 | $done(value) 64 | } 65 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, put, done } 66 | } 67 | hycan.done() -------------------------------------------------------------------------------- /chavyleung/hycan/hycan.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'HYCAN合创' 2 | const signurlKey = 'signurl_hycan' 3 | const signheaderKey = 'signheader_hycan' 4 | const hycan = init() 5 | const signurlVal = hycan.getdata(signurlKey) 6 | const signheaderVal = hycan.getdata(signheaderKey) 7 | 8 | sign() 9 | 10 | function sign() { 11 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal) } 12 | hycan.post(url, (error, response, data) => { 13 | hycan.log(`${cookieName}, data: ${data}`) 14 | const title = `${cookieName}` 15 | let subTitle = '' 16 | let detail = '' 17 | const result = JSON.parse(data) 18 | if (result.data.addScore == true) { 19 | subTitle = `签到结果: 成功` 20 | detail = `签到积分: ${result.data.score}, 签到详情: ${result.data.msg}` 21 | } else if (result.data.addScore == false) { 22 | subTitle = `签到结果: 成功 (重复签到)` 23 | } else { 24 | subTitle = `签到结果: 失败` 25 | detail = `说明: token失效, ${result.msg}` 26 | } 27 | hycan.msg(title, subTitle, detail) 28 | hycan.done() 29 | }) 30 | } 31 | 32 | function init() { 33 | isSurge = () => { 34 | return undefined === this.$httpClient ? false : true 35 | } 36 | isQuanX = () => { 37 | return undefined === this.$task ? false : true 38 | } 39 | getdata = (key) => { 40 | if (isSurge()) return $persistentStore.read(key) 41 | if (isQuanX()) return $prefs.valueForKey(key) 42 | } 43 | setdata = (key, val) => { 44 | if (isSurge()) return $persistentStore.write(key, val) 45 | if (isQuanX()) return $prefs.setValueForKey(key, val) 46 | } 47 | msg = (title, subtitle, body) => { 48 | if (isSurge()) $notification.post(title, subtitle, body) 49 | if (isQuanX()) $notify(title, subtitle, body) 50 | } 51 | log = (message) => console.log(message) 52 | get = (url, cb) => { 53 | if (isSurge()) { 54 | $httpClient.get(url, cb) 55 | } 56 | if (isQuanX()) { 57 | url.method = 'GET' 58 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 59 | } 60 | } 61 | post = (url, cb) => { 62 | if (isSurge()) { 63 | $httpClient.post(url, cb) 64 | } 65 | if (isQuanX()) { 66 | url.method = 'POST' 67 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 68 | } 69 | } 70 | put = (url, cb) => { 71 | if (isSurge()) { 72 | $httpClient.put(url, cb) 73 | } 74 | if (isQuanX()) { 75 | url.method = 'PUT' 76 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 77 | } 78 | } 79 | done = (value = {}) => { 80 | $done(value) 81 | } 82 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, put, done } 83 | } 84 | -------------------------------------------------------------------------------- /chavyleung/jd/jd.618.cookie.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Chavy iOS JD618 Cookies Module 2 | #!desc=获取京东 618 活动会话信息 3 | #!system=ios 4 | 5 | [Script] 6 | Rewrite: JD618 = type=http-request,pattern=^https:\/\/api.m.jd.com\/client.action\?functionId=cakebaker_getHomeData,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/jd/jd.618.cookie.js,requires-body=true,debug=true 7 | 8 | [MITM] 9 | hostname = %INSERT%, api.m.jd.com -------------------------------------------------------------------------------- /chavyleung/jd/jd.618.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Chavy iOS JD618 Task Module 2 | #!desc=执行京东 618 活动任务 3 | #!system=ios 4 | 5 | [Script] 6 | Tasks: JD618 = type=cron,cronexp="10,30,50 0,1 * * *",script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/jd/jd.618.adapt.js,wake-system=true,timeout=1200 7 | Tasks: JD618.Boom = type=cron,cronexp="0 10,12,18,20,21 * * *",script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/jd/jd.618.boom.js,wake-system=true 8 | Tasks: JD618.Boom = type=cron,cronexp="30 21 * * *",script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/jd/jd.618.boom.js,wake-system=true -------------------------------------------------------------------------------- /chavyleung/jddj/jddj.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '京东到家' 2 | const signheaderKey = 'chen_signheader_jddj' 3 | const chen = init() 4 | if (this.$request) { 5 | const signheaderVal = JSON.stringify($request.headers) 6 | if (signheaderVal) { 7 | chen.setdata(signheaderVal, signheaderKey) 8 | chen.msg(cookieName, `获取Cookie: 成功`, ``) 9 | } 10 | } 11 | function init() { 12 | isSurge = () => { 13 | return undefined === this.$httpClient ? false : true 14 | } 15 | isQuanX = () => { 16 | return undefined === this.$task ? false : true 17 | } 18 | getdata = (key) => { 19 | if (isSurge()) return $persistentStore.read(key) 20 | if (isQuanX()) return $prefs.valueForKey(key) 21 | } 22 | setdata = (key, val) => { 23 | if (isSurge()) return $persistentStore.write(key, val) 24 | if (isQuanX()) return $prefs.setValueForKey(key, val) 25 | } 26 | msg = (title, subtitle, body) => { 27 | if (isSurge()) $notification.post(title, subtitle, body) 28 | if (isQuanX()) $notify(title, subtitle, body) 29 | } 30 | log = (message) => console.log(message) 31 | get = (url, cb) => { 32 | if (isSurge()) { 33 | $httpClient.get(url, cb) 34 | } 35 | if (isQuanX()) { 36 | url.method = 'GET' 37 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 38 | } 39 | } 40 | post = (url, cb) => { 41 | if (isSurge()) { 42 | $httpClient.post(url, cb) 43 | } 44 | if (isQuanX()) { 45 | url.method = 'POST' 46 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 47 | } 48 | } 49 | done = (value = {}) => { 50 | $done(value) 51 | } 52 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 53 | } 54 | chen.done() 55 | -------------------------------------------------------------------------------- /chavyleung/jddj/jddj.js: -------------------------------------------------------------------------------- 1 | const cookieName ='京东到家' 2 | const signheaderKey = 'chen_signheader_jddj' 3 | const chen = init() 4 | const signheaderVal = chen.getdata(signheaderKey) 5 | sign() 6 | function sign() { 7 | let url = {url: `https://daojia.jd.com/client?functionId=signin%2FuserSigninNew&body=%7B%7D`,headers: JSON.parse(signheaderVal)} 8 | chen.get(url, (error, response, data) => { 9 | chen.log(`${cookieName}, data: ${data}`) 10 | let res = JSON.parse(data) 11 | const title = `${cookieName}` 12 | let subTitle = `` 13 | let detail = `` 14 | if (res.success&&res.result.points!='undefined') { 15 | subTitle = `签到结果:成功` 16 | detail = `获取鲜豆:${res.result.points}` 17 | } else if(!res.success&&res.code==202){ 18 | subTitle = `签到结果: 失败` 19 | detail = `说明: ${res.msg}` 20 | } 21 | else if (!res.success&&res.code==-1){ 22 | subTitle = `签到成功,请勿重复操作` 23 | } 24 | else{ 25 | subTitle = `未知错误,截图日志` 26 | } 27 | chen.msg(title, subTitle, detail) 28 | }) 29 | } 30 | 31 | function init() { 32 | isSurge = () => { 33 | return undefined === this.$httpClient ? false : true 34 | } 35 | isQuanX = () => { 36 | return undefined === this.$task ? false : true 37 | } 38 | getdata = (key) => { 39 | if (isSurge()) return $persistentStore.read(key) 40 | if (isQuanX()) return $prefs.valueForKey(key) 41 | } 42 | setdata = (key, val) => { 43 | if (isSurge()) return $persistentStore.write(key, val) 44 | if (isQuanX()) return $prefs.setValueForKey(key, val) 45 | } 46 | msg = (title, subtitle, body) => { 47 | if (isSurge()) $notification.post(title, subtitle, body) 48 | if (isQuanX()) $notify(title, subtitle, body) 49 | } 50 | log = (message) => console.log(message) 51 | get = (url, cb) => { 52 | if (isSurge()) { 53 | $httpClient.get(url, cb) 54 | } 55 | if (isQuanX()) { 56 | url.method = 'GET' 57 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 58 | } 59 | } 60 | post = (url, cb) => { 61 | if (isSurge()) { 62 | $httpClient.post(url, cb) 63 | } 64 | if (isQuanX()) { 65 | url.method = 'POST' 66 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 67 | } 68 | } 69 | done = (value = {}) => { 70 | $done(value) 71 | } 72 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 73 | } -------------------------------------------------------------------------------- /chavyleung/loon.box.conf: -------------------------------------------------------------------------------- 1 | hostname = 8.8.8.8, 1.1.1.1 2 | 3 | http-request ^https://8.8.8.8/api script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js, requires-body=true 4 | http-request ^https://8.8.8.8/(home|sub|my|app|log|revert)($|\/) script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js, requires-body=true 5 | http-request ^https?://1.1.1.1/(api|home|sub|my|app|log|revert)($|\/) script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js, requires-body=true, timeout=120 6 | http-request ^https?://boxjs.com(/api|/home|/sub|/my|/app|/log|/revert)?($|\/) script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js, requires-body=true, timeout=120, tag=BoxJs -------------------------------------------------------------------------------- /chavyleung/maomicd/README.md: -------------------------------------------------------------------------------- 1 | # 猫咪音乐网 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | www.maomicd.com 10 | 11 | [Script] 12 | http-request https:\/\/www.maomicd.com\/plugin.php\?id=k_misign:sign&operation=qiandao script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/maomicd/maomicd.cookie.js 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/maomicd/maomicd.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | www.maomicd.com 21 | 22 | [rewrite_local] 23 | https:\/\/www.maomicd.com\/plugin.php\?id=k_misign:sign&operation=qiandao url script-request-header maomicd.cookie.js 24 | 25 | [task_local] 26 | 1 0 * * * maomicd.js 27 | ``` 28 | 29 | ## 说明 30 | 31 | 1. 先把`www.maomicd.com`加到`[MITM]` 32 | 2. 再配置重写规则: 33 | - Surge: 把两条远程脚本放到`[Script]` 34 | - QuanX: 把`maomicd.cookie.js`和`maomicd.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 35 | 3. 打开 网站 `https://www.maomicd.com` 然后手动签到 1 次, 系统提示: `获取Cookie: 成功` 36 | 4. 最后就可以把获取 Cookie 的脚本注释掉了 37 | 5. 运行一次脚本, 如果提示重复签到, 那就算成功了! 38 | 39 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 40 | 41 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 42 | 43 | ## 常见问题 44 | 45 | 1. 无法写入 Cookie 46 | 47 | - 检查 Surge 系统通知权限放开了没 48 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 49 | 50 | 2. 写入 Cookie 成功, 但签到不成功 51 | 52 | - 看看是不是在登录前就写入 Cookie 了 53 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 54 | 55 | 3. 为什么有时成功有时失败 56 | 57 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 58 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 59 | 60 | - `Surge`配置: 61 | 62 | ```properties 63 | # 没有什么是一顿饭解决不了的: 64 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 65 | # 如果有,那就两顿: 66 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 67 | # 实在不行,三顿也能接受: 68 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 69 | 70 | # 再粗暴点,直接: 71 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 72 | ``` 73 | 74 | - `QuanX`配置: 75 | 76 | ```properties 77 | [task_local] 78 | 1 0 * * * xxx.js # 每天00:01执行一次 79 | 2 0 * * * xxx.js # 每天00:02执行一次 80 | 3 0 * * * xxx.js # 每天00:03执行一次 81 | 82 | */60 * * * * xxx.js # 每60分执行一次 83 | ``` 84 | 85 | ## 感谢 86 | 87 | [@NobyDa](https://github.com/NobyDa) 88 | 89 | [@lhie1](https://github.com/lhie1) 90 | 91 | [@ConnersHua](https://github.com/ConnersHua) 92 | -------------------------------------------------------------------------------- /chavyleung/maomicd/maomicd.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '猫咪音乐网' 2 | const signurlKey = 'chavy_signurl_maomicd' 3 | const signheaderKey = 'chavy_signheader_maomicd' 4 | const chavy = init() 5 | 6 | if ($request && $request.method != 'OPTIONS') { 7 | const signurlVal = $request.url 8 | const signheaderVal = JSON.stringify($request.headers) 9 | if (signurlVal) chavy.setdata(signurlVal, signurlKey) 10 | if (signheaderVal) chavy.setdata(signheaderVal, signheaderKey) 11 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 12 | } 13 | 14 | function init() { 15 | isSurge = () => { 16 | return undefined === this.$httpClient ? false : true 17 | } 18 | isQuanX = () => { 19 | return undefined === this.$task ? false : true 20 | } 21 | getdata = (key) => { 22 | if (isSurge()) return $persistentStore.read(key) 23 | if (isQuanX()) return $prefs.valueForKey(key) 24 | } 25 | setdata = (key, val) => { 26 | if (isSurge()) return $persistentStore.write(key, val) 27 | if (isQuanX()) return $prefs.setValueForKey(key, val) 28 | } 29 | msg = (title, subtitle, body) => { 30 | if (isSurge()) $notification.post(title, subtitle, body) 31 | if (isQuanX()) $notify(title, subtitle, body) 32 | } 33 | log = (message) => console.log(message) 34 | get = (url, cb) => { 35 | if (isSurge()) { 36 | $httpClient.get(url, cb) 37 | } 38 | if (isQuanX()) { 39 | url.method = 'GET' 40 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 41 | } 42 | } 43 | post = (url, cb) => { 44 | if (isSurge()) { 45 | $httpClient.post(url, cb) 46 | } 47 | if (isQuanX()) { 48 | url.method = 'POST' 49 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 50 | } 51 | } 52 | done = (value = {}) => { 53 | $done(value) 54 | } 55 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 56 | } 57 | chavy.done() 58 | -------------------------------------------------------------------------------- /chavyleung/maomicd/maomicd.js: -------------------------------------------------------------------------------- 1 | const cookieName = '猫咪音乐网' 2 | const signurlKey = 'chavy_signurl_maomicd' 3 | const signheaderKey = 'chavy_signheader_maomicd' 4 | const chavy = init() 5 | const signurlVal = chavy.getdata(signurlKey) 6 | const signheaderVal = chavy.getdata(signheaderKey) 7 | 8 | sign() 9 | 10 | function sign() { 11 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal) } 12 | chavy.get(url, (error, response, data) => { 13 | chavy.log(`${cookieName}, data: ${data}`) 14 | let subTitle = `` 15 | let detail = `` 16 | let result = data.match(/()<\/root>/) 17 | if (result) { 18 | result = result[2] 19 | if (result == '') subTitle = `签到结果: 成功` 20 | else if (result.indexOf('今日已签') >= 0) subTitle = `签到结果: 成功 (重复签到)` 21 | else (subTitle = `签到结果: 未知`), (detail = `说明: ${result}`) 22 | } else { 23 | subTitle = `签到结果: 失败` 24 | } 25 | chavy.msg(cookieName, subTitle, detail) 26 | chavy.done() 27 | }) 28 | } 29 | 30 | function init() { 31 | isSurge = () => { 32 | return undefined === this.$httpClient ? false : true 33 | } 34 | isQuanX = () => { 35 | return undefined === this.$task ? false : true 36 | } 37 | getdata = (key) => { 38 | if (isSurge()) return $persistentStore.read(key) 39 | if (isQuanX()) return $prefs.valueForKey(key) 40 | } 41 | setdata = (key, val) => { 42 | if (isSurge()) return $persistentStore.write(key, val) 43 | if (isQuanX()) return $prefs.setValueForKey(key, val) 44 | } 45 | msg = (title, subtitle, body) => { 46 | if (isSurge()) $notification.post(title, subtitle, body) 47 | if (isQuanX()) $notify(title, subtitle, body) 48 | } 49 | log = (message) => console.log(message) 50 | get = (url, cb) => { 51 | if (isSurge()) { 52 | $httpClient.get(url, cb) 53 | } 54 | if (isQuanX()) { 55 | url.method = 'GET' 56 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 57 | } 58 | } 59 | post = (url, cb) => { 60 | if (isSurge()) { 61 | $httpClient.post(url, cb) 62 | } 63 | if (isQuanX()) { 64 | url.method = 'POST' 65 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 66 | } 67 | } 68 | done = (value = {}) => { 69 | $done(value) 70 | } 71 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 72 | } 73 | -------------------------------------------------------------------------------- /chavyleung/mcdd/README.md: -------------------------------------------------------------------------------- 1 | # 叮咚买菜 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | maicai.api.ddxq.mobi 10 | 11 | [Script] 12 | http-request ^https:\/\/maicai.api.ddxq.mobi\/point\/home script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/mcdd/mcdd.cookie.js 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/mcdd/mcdd.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | maicai.api.ddxq.mobi 21 | 22 | [rewrite_local] 23 | ^https:\/\/maicai.api.ddxq.mobi\/point\/home url script-request-header mcdd.cookie.js 24 | 25 | [task_local] 26 | 1 0 * * * mcdd.js 27 | ``` 28 | 29 | ## 说明 30 | 31 | 1. 先把`maicai.api.ddxq.mobi`加到`[MITM]` 32 | 2. 再配置重写规则: 33 | - Surge: 把两条远程脚本放到`[Script]` 34 | - QuanX: 把`mcdd.cookie.js`和`mcdd.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 35 | 3. 打开 APP, 访问下`我的`>`积分` 36 | 4. 系统提示: `获取Cookie: 成功` (如果不提示获取成功, 尝试杀进程再进个人中心) 37 | 5. 最后就可以把第 1 条脚本注释掉了 38 | 39 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 40 | 41 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 42 | 43 | ## 常见问题 44 | 45 | 1. 无法写入 Cookie 46 | 47 | - 检查 Surge 系统通知权限放开了没 48 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 49 | 50 | 2. 写入 Cookie 成功, 但签到不成功 51 | 52 | - 看看是不是在登录前就写入 Cookie 了 53 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 54 | 55 | 3. 为什么有时成功有时失败 56 | 57 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 58 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 59 | 60 | - `Surge`配置: 61 | 62 | ```properties 63 | # 没有什么是一顿饭解决不了的: 64 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 65 | # 如果有,那就两顿: 66 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 67 | # 实在不行,三顿也能接受: 68 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 69 | 70 | # 再粗暴点,直接: 71 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 72 | ``` 73 | 74 | - `QuanX`配置: 75 | 76 | ```properties 77 | [task_local] 78 | 1 0 * * * xxx.js # 每天00:01执行一次 79 | 2 0 * * * xxx.js # 每天00:02执行一次 80 | 3 0 * * * xxx.js # 每天00:03执行一次 81 | 82 | */60 * * * * xxx.js # 每60分执行一次 83 | ``` 84 | 85 | ## 感谢 86 | 87 | [@NobyDa](https://github.com/NobyDa) 88 | 89 | [@lhie1](https://github.com/lhie1) 90 | 91 | [@ConnersHua](https://github.com/ConnersHua) 92 | -------------------------------------------------------------------------------- /chavyleung/mcdd/mcdd.cookie.js: -------------------------------------------------------------------------------- 1 | const chavy = init() 2 | const cookieName = '叮咚买菜' 3 | const KEY_homeurl = 'chavy_home_url_mcdd' 4 | const KEY_homeheader = 'chavy_home_header_mcdd' 5 | 6 | if ($request && $request.method != 'OPTIONS') { 7 | try { 8 | chavy.log(`🔔 ${cookieName} 开始获取: Cookies`) 9 | const VAL_homeurl = $request.url 10 | const VAL_homeheader = JSON.stringify($request.headers) 11 | if (VAL_homeurl) { 12 | chavy.setdata(VAL_homeurl, KEY_homeurl) 13 | chavy.log(`❕ ${cookieName} VAL_homeurl: ${VAL_homeurl}`) 14 | } 15 | if (VAL_homeheader) { 16 | chavy.setdata(VAL_homeheader, KEY_homeheader) 17 | chavy.log(`❕ ${cookieName} VAL_homeheader: ${VAL_homeheader}`) 18 | } 19 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 20 | } catch (e) { 21 | chavy.msg(cookieName, `获取Cookie: 失败`, e) 22 | chavy.log(`❌ ${cookieName} 获取Cookie: 失败: ${e}`) 23 | } 24 | } 25 | 26 | function init() { 27 | isSurge = () => { 28 | return undefined === this.$httpClient ? false : true 29 | } 30 | isQuanX = () => { 31 | return undefined === this.$task ? false : true 32 | } 33 | getdata = (key) => { 34 | if (isSurge()) return $persistentStore.read(key) 35 | if (isQuanX()) return $prefs.valueForKey(key) 36 | } 37 | setdata = (key, val) => { 38 | if (isSurge()) return $persistentStore.write(key, val) 39 | if (isQuanX()) return $prefs.setValueForKey(key, val) 40 | } 41 | msg = (title, subtitle, body) => { 42 | if (isSurge()) $notification.post(title, subtitle, body) 43 | if (isQuanX()) $notify(title, subtitle, body) 44 | } 45 | log = (message) => console.log(message) 46 | get = (url, cb) => { 47 | if (isSurge()) { 48 | $httpClient.get(url, cb) 49 | } 50 | if (isQuanX()) { 51 | url.method = 'GET' 52 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 53 | } 54 | } 55 | post = (url, cb) => { 56 | if (isSurge()) { 57 | $httpClient.post(url, cb) 58 | } 59 | if (isQuanX()) { 60 | url.method = 'POST' 61 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 62 | } 63 | } 64 | done = (value = {}) => { 65 | $done(value) 66 | } 67 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 68 | } 69 | chavy.done() 70 | -------------------------------------------------------------------------------- /chavyleung/meituan/README.md: -------------------------------------------------------------------------------- 1 | # 美团 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | > QuanX 需要: v1.0.6-build195 及以后版本 (TestFlight) 6 | 7 | ## 配置 (Surge) 8 | 9 | ```properties 10 | [MITM] 11 | hostname = i.meituan.com 12 | 13 | [Script] 14 | http-request ^https:\/\/i.meituan.com\/evolve\/signin\/signpost\/ script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/meituan/meituan.cookie.js, requires-body=true 15 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/meituan/meituan.js 16 | ``` 17 | 18 | ## 配置 (QuanX) 19 | 20 | ```properties 21 | [MITM] 22 | i.meituan.com 23 | 24 | [rewrite_local] 25 | 26 | # [商店版] QuanX v1.0.6-build194 及更早版本 27 | # 不支持 28 | 29 | # [TestFlight] QuanX v1.0.6-build195 及以后版本 30 | ^https:\/\/i.meituan.com\/evolve\/signin\/signpost\/ url script-request-body meituan.cookie.js 31 | 32 | [task_local] 33 | 1 0 * * * meituan.js 34 | ``` 35 | 36 | ## 说明 37 | 38 | 1. 先把`i.meituan.com`加到`[MITM]` 39 | 2. 再配置重写规则: 40 | - Surge: 把两条远程脚本放到`[Script]` 41 | - QuanX: 把`meituan.cookie.js`和`meituan.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 42 | 3. 打开 APP , 然后手动签到 1 次, 系统提示: `获取Cookie: 成功` (`首页` > `红包签到`) 43 | 4. 把获取 Cookie 的脚本注释掉 44 | 5. 运行一次脚本, 如果提示重复签到, 那就算成功了! 45 | 46 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 47 | 48 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 49 | 50 | ## 常见问题 51 | 52 | 1. 无法写入 Cookie 53 | 54 | - 检查 Surge 系统通知权限放开了没 55 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 56 | 57 | 2. 写入 Cookie 成功, 但签到不成功 58 | 59 | - 看看是不是在登录前就写入 Cookie 了 60 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 61 | 62 | 3. 为什么有时成功有时失败 63 | 64 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 65 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 66 | 67 | - `Surge`配置: 68 | 69 | ```properties 70 | # 没有什么是一顿饭解决不了的: 71 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 72 | # 如果有,那就两顿: 73 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 74 | # 实在不行,三顿也能接受: 75 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 76 | 77 | # 再粗暴点,直接: 78 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 79 | ``` 80 | 81 | - `QuanX`配置: 82 | 83 | ```properties 84 | [task_local] 85 | 1 0 * * * xxx.js # 每天00:01执行一次 86 | 2 0 * * * xxx.js # 每天00:02执行一次 87 | 3 0 * * * xxx.js # 每天00:03执行一次 88 | 89 | */60 * * * * xxx.js # 每60分执行一次 90 | ``` 91 | 92 | ## 感谢 93 | 94 | [@NobyDa](https://github.com/NobyDa) 95 | 96 | [@lhie1](https://github.com/lhie1) 97 | 98 | [@ConnersHua](https://github.com/ConnersHua) 99 | -------------------------------------------------------------------------------- /chavyleung/meituan/meituan.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '美团' 2 | const tokenurlKey = 'chavy_tokenurl_meituan' 3 | const tokenheaderKey = 'chavy_tokenheader_meituan' 4 | const signurlKey = 'chavy_signurl_meituan' 5 | const signheaderKey = 'chavy_signheader_meituan' 6 | const signbodyKey = 'chavy_signbody_meituan' 7 | const chavy = init() 8 | 9 | const requrl = $request.url 10 | if ($request && $request.method != 'OPTIONS' && requrl.match(/\/evolve\/signin\/signpost\//)) { 11 | const signurlVal = requrl 12 | const signheaderVal = JSON.stringify($request.headers) 13 | const signbodyVal = $request.body 14 | if (signurlVal) chavy.setdata(signurlVal, signurlKey) 15 | if (signheaderVal) chavy.setdata(signheaderVal, signheaderKey) 16 | if (signbodyVal) chavy.setdata(signbodyVal, signbodyKey) 17 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 18 | } 19 | 20 | function init() { 21 | isSurge = () => { 22 | return undefined === this.$httpClient ? false : true 23 | } 24 | isQuanX = () => { 25 | return undefined === this.$task ? false : true 26 | } 27 | getdata = (key) => { 28 | if (isSurge()) return $persistentStore.read(key) 29 | if (isQuanX()) return $prefs.valueForKey(key) 30 | } 31 | setdata = (key, val) => { 32 | if (isSurge()) return $persistentStore.write(key, val) 33 | if (isQuanX()) return $prefs.setValueForKey(key, val) 34 | } 35 | msg = (title, subtitle, body) => { 36 | if (isSurge()) $notification.post(title, subtitle, body) 37 | if (isQuanX()) $notify(title, subtitle, body) 38 | } 39 | log = (message) => console.log(message) 40 | get = (url, cb) => { 41 | if (isSurge()) { 42 | $httpClient.get(url, cb) 43 | } 44 | if (isQuanX()) { 45 | url.method = 'GET' 46 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 47 | } 48 | } 49 | post = (url, cb) => { 50 | if (isSurge()) { 51 | $httpClient.post(url, cb) 52 | } 53 | if (isQuanX()) { 54 | url.method = 'POST' 55 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 56 | } 57 | } 58 | done = (value = {}) => { 59 | $done(value) 60 | } 61 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 62 | } 63 | chavy.done() 64 | -------------------------------------------------------------------------------- /chavyleung/mgtv/README.md: -------------------------------------------------------------------------------- 1 | # 芒果 TV 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | credits.bz.mgtv.com 10 | 11 | [Script] 12 | http-request ^https:\/\/credits.bz.mgtv.com\/user\/creditsTake script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/mgtv/mgtv.cookie.js 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/mgtv/mgtv.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | credits.bz.mgtv.com 21 | 22 | [rewrite_local] 23 | ^https:\/\/credits.bz.mgtv.com\/user\/creditsTake url script-request-header mgtv.cookie.js 24 | 25 | [task_local] 26 | 1 0 * * * mgtv.js 27 | ``` 28 | 29 | ## 说明 30 | 31 | 1. 先把`credits.bz.mgtv.com`加到`[MITM]` 32 | 2. 再配置重写规则: 33 | - Surge: 把两条远程脚本放到`[Script]` 34 | - QuanX: 把`mgtv.cookie.js`和`mgtv.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 35 | 3. 打开 APP 然后手动签到 1 次, 系统提示: `获取Cookie: 成功` 36 | 4. 最后就可以把第 1 条脚本注释掉了 37 | 5. 运行一次脚本, 如果提示重复签到, 那就算成功了! 38 | 39 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 40 | 41 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 42 | 43 | ## 常见问题 44 | 45 | 1. 无法写入 Cookie 46 | 47 | - 检查 Surge 系统通知权限放开了没 48 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 49 | 50 | 2. 写入 Cookie 成功, 但签到不成功 51 | 52 | - 看看是不是在登录前就写入 Cookie 了 53 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 54 | 55 | 3. 为什么有时成功有时失败 56 | 57 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 58 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 59 | 60 | - `Surge`配置: 61 | 62 | ```properties 63 | # 没有什么是一顿饭解决不了的: 64 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 65 | # 如果有,那就两顿: 66 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 67 | # 实在不行,三顿也能接受: 68 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 69 | 70 | # 再粗暴点,直接: 71 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 72 | ``` 73 | 74 | - `QuanX`配置: 75 | 76 | ```properties 77 | [task_local] 78 | 1 0 * * * xxx.js # 每天00:01执行一次 79 | 2 0 * * * xxx.js # 每天00:02执行一次 80 | 3 0 * * * xxx.js # 每天00:03执行一次 81 | 82 | */60 * * * * xxx.js # 每60分执行一次 83 | ``` 84 | 85 | ## 感谢 86 | 87 | [@NobyDa](https://github.com/NobyDa) 88 | 89 | [@lhie1](https://github.com/lhie1) 90 | 91 | [@ConnersHua](https://github.com/ConnersHua) 92 | -------------------------------------------------------------------------------- /chavyleung/mgtv/mgtv.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '芒果TV' 2 | const signurlKey = 'chavy_signurl_mgtv' 3 | const signheaderKey = 'chavy_signheader_mgtv' 4 | const chavy = init() 5 | 6 | if ($request && $request.method != 'OPTIONS') { 7 | const signurlVal = $request.url 8 | const signheaderVal = JSON.stringify($request.headers) 9 | if (signurlVal) chavy.setdata(signurlVal, signurlKey) 10 | if (signheaderVal) chavy.setdata(signheaderVal, signheaderKey) 11 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 12 | } 13 | 14 | function init() { 15 | isSurge = () => { 16 | return undefined === this.$httpClient ? false : true 17 | } 18 | isQuanX = () => { 19 | return undefined === this.$task ? false : true 20 | } 21 | getdata = (key) => { 22 | if (isSurge()) return $persistentStore.read(key) 23 | if (isQuanX()) return $prefs.valueForKey(key) 24 | } 25 | setdata = (key, val) => { 26 | if (isSurge()) return $persistentStore.write(key, val) 27 | if (isQuanX()) return $prefs.setValueForKey(key, val) 28 | } 29 | msg = (title, subtitle, body) => { 30 | if (isSurge()) $notification.post(title, subtitle, body) 31 | if (isQuanX()) $notify(title, subtitle, body) 32 | } 33 | log = (message) => console.log(message) 34 | get = (url, cb) => { 35 | if (isSurge()) { 36 | $httpClient.get(url, cb) 37 | } 38 | if (isQuanX()) { 39 | url.method = 'GET' 40 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 41 | } 42 | } 43 | post = (url, cb) => { 44 | if (isSurge()) { 45 | $httpClient.post(url, cb) 46 | } 47 | if (isQuanX()) { 48 | url.method = 'POST' 49 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 50 | } 51 | } 52 | done = (value = {}) => { 53 | $done(value) 54 | } 55 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 56 | } 57 | chavy.done() 58 | -------------------------------------------------------------------------------- /chavyleung/mgtv/mgtv.js: -------------------------------------------------------------------------------- 1 | const cookieName = '芒果TV' 2 | const signurlKey = 'chavy_signurl_mgtv' 3 | const signheaderKey = 'chavy_signheader_mgtv' 4 | const chavy = init() 5 | const signurlVal = chavy.getdata(signurlKey) 6 | const signheaderVal = chavy.getdata(signheaderKey) 7 | 8 | sign() 9 | 10 | function sign() { 11 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal) } 12 | url.body = '{}' 13 | chavy.post(url, (error, response, data) => { 14 | chavy.log(`${cookieName}, data: ${data}`) 15 | const title = `${cookieName}` 16 | let subTitle = '' 17 | let detail = '' 18 | const result = JSON.parse(data.match(/\(([^\)]*)\)/)[1]) 19 | if (result.code == 200) { 20 | subTitle = `签到结果: 成功` 21 | detail = `共签: ${result.data.curDay}天, 连签: ${result.data.curDayTotal}天, 积分: ${result.data.balance} +${result.data.credits})` 22 | } else if (result.code == 1002) { 23 | subTitle = `签到结果: 成功 (重复签到)` 24 | } else { 25 | subTitle = `签到结果: 失败` 26 | detail = `编码: ${result.code}, 说明: ${result.msg}` 27 | } 28 | chavy.msg(title, subTitle, detail) 29 | chavy.done() 30 | }) 31 | } 32 | 33 | function init() { 34 | isSurge = () => { 35 | return undefined === this.$httpClient ? false : true 36 | } 37 | isQuanX = () => { 38 | return undefined === this.$task ? false : true 39 | } 40 | getdata = (key) => { 41 | if (isSurge()) return $persistentStore.read(key) 42 | if (isQuanX()) return $prefs.valueForKey(key) 43 | } 44 | setdata = (key, val) => { 45 | if (isSurge()) return $persistentStore.write(key, val) 46 | if (isQuanX()) return $prefs.setValueForKey(key, val) 47 | } 48 | msg = (title, subtitle, body) => { 49 | if (isSurge()) $notification.post(title, subtitle, body) 50 | if (isQuanX()) $notify(title, subtitle, body) 51 | } 52 | log = (message) => console.log(message) 53 | get = (url, cb) => { 54 | if (isSurge()) { 55 | $httpClient.get(url, cb) 56 | } 57 | if (isQuanX()) { 58 | url.method = 'GET' 59 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 60 | } 61 | } 62 | post = (url, cb) => { 63 | if (isSurge()) { 64 | $httpClient.post(url, cb) 65 | } 66 | if (isQuanX()) { 67 | url.method = 'POST' 68 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 69 | } 70 | } 71 | done = (value = {}) => { 72 | $done(value) 73 | } 74 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 75 | } 76 | -------------------------------------------------------------------------------- /chavyleung/mihoyo/README.md: -------------------------------------------------------------------------------- 1 | # 米游社 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | api-takumi.mihoyo.com 10 | 11 | [Script] 12 | http-request ^https:\/\/api-takumi.mihoyo.com\/apihub\/api\/getGameList script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/mihoyo/mihoyo.cookie.js 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/mihoyo/mihoyo.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | api-takumi.mihoyo.com 21 | 22 | [rewrite_local] 23 | ^https:\/\/api-takumi.mihoyo.com\/apihub\/api\/getGameList url script-request-header mihoyo.cookie.js 24 | 25 | [task_local] 26 | 1 0 * * * mihoyo.js 27 | ``` 28 | 29 | ## 说明 30 | 31 | 1. 先把`api-takumi.mihoyo.com`加到`[MITM]` 32 | 2. 再配置重写规则: 33 | - Surge: 把两条远程脚本放到`[Script]` 34 | - QuanX: 把`mihoyo.cookie.js`和`mihoyo.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 35 | 3. 打开 APP , 系统提示: `获取Cookie: 成功` 36 | 4. 最后就可以把第 1 条脚本注释掉了 37 | 5. 运行一次脚本, 如果提示重复签到, 那就算成功了! 38 | 39 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 40 | 41 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 42 | 43 | ## 常见问题 44 | 45 | 1. 无法写入 Cookie 46 | 47 | - 检查 Surge 系统通知权限放开了没 48 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 49 | 50 | 2. 写入 Cookie 成功, 但签到不成功 51 | 52 | - 看看是不是在登录前就写入 Cookie 了 53 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 54 | 55 | 3. 为什么有时成功有时失败 56 | 57 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 58 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 59 | 60 | - `Surge`配置: 61 | 62 | ```properties 63 | # 没有什么是一顿饭解决不了的: 64 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 65 | # 如果有,那就两顿: 66 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 67 | # 实在不行,三顿也能接受: 68 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 69 | 70 | # 再粗暴点,直接: 71 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 72 | ``` 73 | 74 | - `QuanX`配置: 75 | 76 | ```properties 77 | [task_local] 78 | 1 0 * * * xxx.js # 每天00:01执行一次 79 | 2 0 * * * xxx.js # 每天00:02执行一次 80 | 3 0 * * * xxx.js # 每天00:03执行一次 81 | 82 | */60 * * * * xxx.js # 每60分执行一次 83 | ``` 84 | 85 | ## 感谢 86 | 87 | [@NobyDa](https://github.com/NobyDa) 88 | 89 | [@lhie1](https://github.com/lhie1) 90 | 91 | [@ConnersHua](https://github.com/ConnersHua) 92 | -------------------------------------------------------------------------------- /chavyleung/mihoyo/mihoyo.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '米游社' 2 | const signurlKey = 'chavy_signurl_mihoyo' 3 | const signheaderKey = 'chavy_signheader_mihoyo' 4 | const chavy = init() 5 | 6 | if ($request && $request.method != 'OPTIONS') { 7 | const signurlVal = $request.url 8 | const signheaderVal = JSON.stringify($request.headers) 9 | if (signurlVal) chavy.setdata(signurlVal, signurlKey) 10 | if (signheaderVal) chavy.setdata(signheaderVal, signheaderKey) 11 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 12 | } 13 | 14 | function init() { 15 | isSurge = () => { 16 | return undefined === this.$httpClient ? false : true 17 | } 18 | isQuanX = () => { 19 | return undefined === this.$task ? false : true 20 | } 21 | getdata = (key) => { 22 | if (isSurge()) return $persistentStore.read(key) 23 | if (isQuanX()) return $prefs.valueForKey(key) 24 | } 25 | setdata = (key, val) => { 26 | if (isSurge()) return $persistentStore.write(key, val) 27 | if (isQuanX()) return $prefs.setValueForKey(key, val) 28 | } 29 | msg = (title, subtitle, body) => { 30 | if (isSurge()) $notification.post(title, subtitle, body) 31 | if (isQuanX()) $notify(title, subtitle, body) 32 | } 33 | log = (message) => console.log(message) 34 | get = (url, cb) => { 35 | if (isSurge()) { 36 | $httpClient.get(url, cb) 37 | } 38 | if (isQuanX()) { 39 | url.method = 'GET' 40 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 41 | } 42 | } 43 | post = (url, cb) => { 44 | if (isSurge()) { 45 | $httpClient.post(url, cb) 46 | } 47 | if (isQuanX()) { 48 | url.method = 'POST' 49 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 50 | } 51 | } 52 | done = (value = {}) => { 53 | $done(value) 54 | } 55 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 56 | } 57 | chavy.done() 58 | -------------------------------------------------------------------------------- /chavyleung/neteasemusic/README.md: -------------------------------------------------------------------------------- 1 | # 网易云音乐 2 | 3 | > 2020.6.15 4 | > 5 | > 1. 增加自动重试机制 (BoxJs 可调整次数及间隔) 6 | > 2. 增加等级显示 (需按新方式获取会话) 7 | 8 | ## 配置 (Surge & Loon) 9 | 10 | ```properties 11 | [MITM] 12 | music.163.com 13 | 14 | [Script] 15 | http-request ^https:\/\/music.163.com\/weapi\/user\/level script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/neteasemusic/neteasemusic.cookie.js,requires-body=true 16 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/neteasemusic/neteasemusic.js 17 | ``` 18 | 19 | ## 配置 (QuanX) 20 | 21 | ```properties 22 | [MITM] 23 | music.163.com 24 | 25 | [rewrite_local] 26 | ^https:\/\/music.163.com\/weapi\/user\/level url script-request-body neteasemusic.cookie.js 27 | 28 | [task_local] 29 | 1 0 * * * neteasemusic.js 30 | ``` 31 | 32 | ## 说明 33 | 34 | 1. 先登录: 35 | 2. 再访问: 36 | 3. 提示: `获取会话: 成功!` 37 | 38 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 39 | 40 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 41 | 42 | ## 常见问题 43 | 44 | 1. 无法写入 Cookie 45 | 46 | - 检查 Surge 系统通知权限放开了没 47 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 48 | 49 | 2. 写入 Cookie 成功, 但签到不成功 50 | 51 | - 看看是不是在登录前就写入 Cookie 了 52 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 53 | 54 | 3. 为什么有时成功有时失败 55 | 56 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 57 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 58 | 59 | - `Surge`配置: 60 | 61 | ```properties 62 | # 没有什么是一顿饭解决不了的: 63 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 64 | # 如果有,那就两顿: 65 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 66 | # 实在不行,三顿也能接受: 67 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 68 | 69 | # 再粗暴点,直接: 70 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 71 | ``` 72 | 73 | - `QuanX`配置: 74 | 75 | ```properties 76 | [task_local] 77 | 1 0 * * * xxx.js # 每天00:01执行一次 78 | 2 0 * * * xxx.js # 每天00:02执行一次 79 | 3 0 * * * xxx.js # 每天00:03执行一次 80 | 81 | */60 * * * * xxx.js # 每60分执行一次 82 | ``` 83 | 84 | ## 感谢 85 | 86 | [@NobyDa](https://github.com/NobyDa) 87 | 88 | [@lhie1](https://github.com/lhie1) 89 | 90 | [@ConnersHua](https://github.com/ConnersHua) 91 | -------------------------------------------------------------------------------- /chavyleung/neteasemusic/neteasemusic.cookie.js: -------------------------------------------------------------------------------- 1 | const $ = new Env('网易云音乐') 2 | 3 | !(async () => { 4 | $.log('', `🔔 ${$.name}, 获取会话: 开始!`, '') 5 | const session = {} 6 | session.url = $request.url 7 | session.body = $request.body 8 | session.headers = $request.headers 9 | delete session.headers['Content-Length'] 10 | $.log('', `url: ${session.url}`, `body: ${session.body}`, `headers: ${JSON.stringify(session.headers)}`) 11 | if ($.setdata(JSON.stringify(session), 'chavy_cookie_neteasemusic')) { 12 | $.subt = '获取会话: 成功!' 13 | } else { 14 | $.subt = '获取会话: 失败!' 15 | } 16 | })() 17 | .catch((e) => { 18 | $.subt = '获取会话: 失败!' 19 | $.desc = `原因: ${e}` 20 | $.log(`❌ ${$.name}, 获取会话: 失败! 原因: ${e}!`) 21 | }) 22 | .finally(() => { 23 | $.msg($.name, $.subt, $.desc), $.log('', `🔔 ${$.name}, 获取会话: 结束!`, ''), $.done() 24 | }) 25 | 26 | // prettier-ignore 27 | function Env(s){this.name=s,this.data=null,this.logs=[],this.isSurge=(()=>"undefined"!=typeof $httpClient),this.isQuanX=(()=>"undefined"!=typeof $task),this.isNode=(()=>"undefined"!=typeof module&&!!module.exports),this.log=((...s)=>{this.logs=[...this.logs,...s],s?console.log(s.join("\n")):console.log(this.logs.join("\n"))}),this.msg=((s=this.name,t="",i="")=>{this.isSurge()&&$notification.post(s,t,i),this.isQuanX()&&$notify(s,t,i);const e=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];s&&e.push(s),t&&e.push(t),i&&e.push(i),console.log(e.join("\n"))}),this.getdata=(s=>{if(this.isSurge())return $persistentStore.read(s);if(this.isQuanX())return $prefs.valueForKey(s);if(this.isNode()){const t="box.dat";return this.fs=this.fs?this.fs:require("fs"),this.fs.existsSync(t)?(this.data=JSON.parse(this.fs.readFileSync(t)),this.data[s]):null}}),this.setdata=((s,t)=>{if(this.isSurge())return $persistentStore.write(s,t);if(this.isQuanX())return $prefs.setValueForKey(s,t);if(this.isNode()){const i="box.dat";return this.fs=this.fs?this.fs:require("fs"),!!this.fs.existsSync(i)&&(this.data=JSON.parse(this.fs.readFileSync(i)),this.data[t]=s,this.fs.writeFileSync(i,JSON.stringify(this.data)),!0)}}),this.wait=((s,t=s)=>i=>setTimeout(()=>i(),Math.floor(Math.random()*(t-s+1)+s))),this.get=((s,t)=>this.send(s,"GET",t)),this.post=((s,t)=>this.send(s,"POST",t)),this.send=((s,t,i)=>{if(this.isSurge()){const e="POST"==t?$httpClient.post:$httpClient.get;e(s,(s,t,e)=>{t&&(t.body=e,t.statusCode=t.status),i(s,t,e)})}this.isQuanX()&&(s.method=t,$task.fetch(s).then(s=>{s.status=s.statusCode,i(null,s,s.body)},s=>i(s.error,s,s))),this.isNode()&&(this.request=this.request?this.request:require("request"),s.method=t,s.gzip=!0,this.request(s,(s,t,e)=>{t&&(t.status=t.statusCode),i(null,t,e)}))}),this.done=((s={})=>this.isNode()?null:$done(s))} 28 | -------------------------------------------------------------------------------- /chavyleung/neteasemusic/quanx/neteasemusic.cookie.js: -------------------------------------------------------------------------------- 1 | const $ = new Env('网易云音乐') 2 | 3 | !(async () => { 4 | $.log('', `🔔 ${$.name}, 获取会话: 开始!`, '') 5 | const session = {} 6 | session.url = $request.url 7 | session.body = $request.body 8 | session.headers = $request.headers 9 | delete session.headers['Content-Length'] 10 | $.log('', `url: ${session.url}`, `body: ${session.body}`, `headers: ${JSON.stringify(session.headers)}`) 11 | if ($.setdata(JSON.stringify(session), 'chavy_cookie_neteasemusic')) { 12 | $.subt = '获取会话: 成功!' 13 | } else { 14 | $.subt = '获取会话: 失败!' 15 | } 16 | })() 17 | .catch((e) => { 18 | $.subt = '获取会话: 失败!' 19 | $.desc = `原因: ${e}` 20 | $.log(`❌ ${$.name}, 获取会话: 失败! 原因: ${e}!`) 21 | }) 22 | .finally(() => { 23 | $.msg($.name, $.subt, $.desc), $.log('', `🔔 ${$.name}, 获取会话: 结束!`, ''), $.done() 24 | }) 25 | 26 | // prettier-ignore 27 | function Env(t){this.name=t,this.logs=[],this.isSurge=(()=>"undefined"!=typeof $httpClient),this.isQuanX=(()=>"undefined"!=typeof $task),this.log=((...t)=>{this.logs=[...this.logs,...t],t?console.log(t.join("\n")):console.log(this.logs.join("\n"))}),this.msg=((t=this.name,s="",i="")=>{this.isSurge()&&$notification.post(t,s,i),this.isQuanX()&&$notify(t,s,i);const e=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t&&e.push(t),s&&e.push(s),i&&e.push(i),console.log(e.join("\n"))}),this.getdata=(t=>this.isSurge()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):void 0),this.setdata=((t,s)=>this.isSurge()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):void 0),this.get=((t,s)=>this.send(t,"GET",s)),this.wait=((t,s=t)=>i=>setTimeout(()=>i(),Math.floor(Math.random()*(s-t+1)+t))),this.post=((t,s)=>this.send(t,"POST",s)),this.send=((t,s,i)=>{if(this.isSurge()){const e="POST"==s?$httpClient.post:$httpClient.get;e(t,(t,s,e)=>{s&&(s.body=e,s.statusCode=s.status),i(t,s,e)})}this.isQuanX()&&(t.method=s,$task.fetch(t).then(t=>{t.status=t.statusCode,i(null,t,t.body)},t=>i(t.error,t,t)))}),this.done=((t={})=>$done(t))} 28 | -------------------------------------------------------------------------------- /chavyleung/neteasenews/README.md: -------------------------------------------------------------------------------- 1 | # 网易新闻 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | > 2020.2.4 QuanX v1.0.6-build195 及以后版本可以直接使用 `neteasenews.cookie.js` 自动获取 Cookie 6 | 7 | > 2020.2.4 如果是 195 以前的版本, 或者想尝试手动抓包获取参数, 请点[这里](https://github.com/chavyleung/scripts/tree/master/neteasenews/README.old.md) 8 | 9 | ## 配置 (Surge) 10 | 11 | ```properties 12 | [MITM] 13 | *.m.163.com 14 | 15 | [Script] 16 | http-request ^https:\/\/(.*?)c\.m\.163\.com\/uc\/api\/sign\/v3\/commit script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/neteasenews/neteasenews.cookie.js,requires-body=true 17 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/neteasenews/neteasenews.js 18 | ``` 19 | 20 | ## 配置 (QuanX) 21 | 22 | ```properties 23 | [MITM] 24 | *.m.163.com 25 | 26 | [rewrite_local] 27 | ^https:\/\/(.*?)c\.m\.163\.com\/uc\/api\/sign\/v3\/commit url script-request-body neteasenews.cookie.js 28 | 29 | [task_local] 30 | 1 0 * * * neteasenews.js 31 | ``` 32 | 33 | ## 说明 34 | 35 | 1. 先把`*.m.163.com`加到`[MITM]` 36 | 2. 再配置重写规则: 37 | - Surge: 把两条远程脚本放到`[Script]` 38 | - QuanX: 把`neteasenews.cookie.js`和`neteasenews.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 39 | 3. 打开 APP 然后手动签到 1 次: 40 | 4. 系统提示: `获取Cookie: 成功`, `获取Body: 成功` 41 | 5. 最后就可以把第 1 条脚本注释掉了 42 | 6. 运行一次脚本, 如果提示重复签到, 那就算成功了! 43 | 44 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 45 | 46 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 47 | 48 | ## 常见问题 49 | 50 | 1. 无法写入 Cookie 51 | 52 | - 检查 Surge 系统通知权限放开了没 53 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 54 | 55 | 2. 写入 Cookie 成功, 但签到不成功 56 | 57 | - 看看是不是在登录前就写入 Cookie 了 58 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 59 | 60 | 3. 为什么有时成功有时失败 61 | 62 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 63 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 64 | 65 | - `Surge`配置: 66 | 67 | ```properties 68 | # 没有什么是一顿饭解决不了的: 69 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 70 | # 如果有,那就两顿: 71 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 72 | # 实在不行,三顿也能接受: 73 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 74 | 75 | # 再粗暴点,直接: 76 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 77 | ``` 78 | 79 | - `QuanX`配置: 80 | 81 | ```properties 82 | [task_local] 83 | 1 0 * * * xxx.js # 每天00:01执行一次 84 | 2 0 * * * xxx.js # 每天00:02执行一次 85 | 3 0 * * * xxx.js # 每天00:03执行一次 86 | 87 | */60 * * * * xxx.js # 每60分执行一次 88 | ``` 89 | 90 | ## 感谢 91 | 92 | [@NobyDa](https://github.com/NobyDa) 93 | 94 | [@lhie1](https://github.com/lhie1) 95 | 96 | [@ConnersHua](https://github.com/ConnersHua) 97 | -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第10步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第10步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第1步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第1步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第2步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第2步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第3步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第3步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第4-5步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第4-5步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第6步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第6步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第7步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第7步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第8步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第8步.png -------------------------------------------------------------------------------- /chavyleung/neteasenews/抓包步骤/第9步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/neteasenews/抓包步骤/第9步.png -------------------------------------------------------------------------------- /chavyleung/nio/nio.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '蔚来' 2 | const signurlKey = 'signurl_nextevcar' 3 | const signheaderKey = 'signheader_nextevcar' 4 | const nextevcar = init() 5 | 6 | if ($request && $request.method == 'POST') { 7 | const signurlVal = $request.url 8 | const signheaderVal = JSON.stringify($request.headers) 9 | 10 | if (signurlVal) nextevcar.setdata(signurlVal, signurlKey) 11 | if (signheaderVal) nextevcar.setdata(signheaderVal, signheaderKey) 12 | nextevcar.msg(cookieName, `获取Cookie: 成功`, ``) 13 | } 14 | 15 | function init() { 16 | isSurge = () => { 17 | return undefined === this.$httpClient ? false : true 18 | } 19 | isQuanX = () => { 20 | return undefined === this.$task ? false : true 21 | } 22 | getdata = (key) => { 23 | if (isSurge()) return $persistentStore.read(key) 24 | if (isQuanX()) return $prefs.valueForKey(key) 25 | } 26 | setdata = (key, val) => { 27 | if (isSurge()) return $persistentStore.write(key, val) 28 | if (isQuanX()) return $prefs.setValueForKey(key, val) 29 | } 30 | msg = (title, subtitle, body) => { 31 | if (isSurge()) $notification.post(title, subtitle, body) 32 | if (isQuanX()) $notify(title, subtitle, body) 33 | } 34 | log = (message) => console.log(message) 35 | get = (url, cb) => { 36 | if (isSurge()) { 37 | $httpClient.get(url, cb) 38 | } 39 | if (isQuanX()) { 40 | url.method = 'GET' 41 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 42 | } 43 | } 44 | post = (url, cb) => { 45 | if (isSurge()) { 46 | $httpClient.post(url, cb) 47 | } 48 | if (isQuanX()) { 49 | url.method = 'POST' 50 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 51 | } 52 | } 53 | put = (url, cb) => { 54 | if (isSurge()) { 55 | $httpClient.put(url, cb) 56 | } 57 | if (isQuanX()) { 58 | url.method = 'PUT' 59 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 60 | } 61 | } 62 | done = (value = {}) => { 63 | $done(value) 64 | } 65 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, put, done } 66 | } 67 | nextevcar.done() -------------------------------------------------------------------------------- /chavyleung/nio/nio.js: -------------------------------------------------------------------------------- 1 | const cookieName = '蔚来' 2 | const signurlKey = 'signurl_nextevcar' 3 | const signheaderKey = 'signheader_nextevcar' 4 | const nextevcar = init() 5 | const signurlVal = nextevcar.getdata(signurlKey) 6 | const signheaderVal = nextevcar.getdata(signheaderKey) 7 | 8 | sign() 9 | 10 | function sign() { 11 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal) } 12 | nextevcar.post(url, (error, response, data) => { 13 | nextevcar.log(`${cookieName}, data: ${data}`) 14 | const title = `${cookieName}` 15 | let subTitle = '' 16 | let detail = '' 17 | const result = JSON.parse(data) 18 | if (result.result_code == "success") { 19 | subTitle = `签到结果: 成功` 20 | detail = `签到积分: ${result.data.stats.credit_amount}, 连签: ${result.data.stats.continuous_checkin_days}天` 21 | } else if (result.result_code == "credit_limit_reached") { 22 | subTitle = `签到结果: 成功 (重复签到)` 23 | } else { 24 | subTitle = `签到结果: 失败` 25 | detail = `说明: ${result.debug_msg}, 请重新获取` 26 | } 27 | nextevcar.msg(title, subTitle, detail) 28 | nextevcar.done() 29 | }) 30 | } 31 | 32 | function init() { 33 | isSurge = () => { 34 | return undefined === this.$httpClient ? false : true 35 | } 36 | isQuanX = () => { 37 | return undefined === this.$task ? false : true 38 | } 39 | getdata = (key) => { 40 | if (isSurge()) return $persistentStore.read(key) 41 | if (isQuanX()) return $prefs.valueForKey(key) 42 | } 43 | setdata = (key, val) => { 44 | if (isSurge()) return $persistentStore.write(key, val) 45 | if (isQuanX()) return $prefs.setValueForKey(key, val) 46 | } 47 | msg = (title, subtitle, body) => { 48 | if (isSurge()) $notification.post(title, subtitle, body) 49 | if (isQuanX()) $notify(title, subtitle, body) 50 | } 51 | log = (message) => console.log(message) 52 | get = (url, cb) => { 53 | if (isSurge()) { 54 | $httpClient.get(url, cb) 55 | } 56 | if (isQuanX()) { 57 | url.method = 'GET' 58 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 59 | } 60 | } 61 | post = (url, cb) => { 62 | if (isSurge()) { 63 | $httpClient.post(url, cb) 64 | } 65 | if (isQuanX()) { 66 | url.method = 'POST' 67 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 68 | } 69 | } 70 | put = (url, cb) => { 71 | if (isSurge()) { 72 | $httpClient.put(url, cb) 73 | } 74 | if (isQuanX()) { 75 | url.method = 'PUT' 76 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 77 | } 78 | } 79 | done = (value = {}) => { 80 | $done(value) 81 | } 82 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, put, done } 83 | } 84 | -------------------------------------------------------------------------------- /chavyleung/noteyoudao/noteyoudao.cookie.js: -------------------------------------------------------------------------------- 1 | const $ = new Env('有道云笔记') 2 | 3 | !(async () => { 4 | $.log('', `🔔 ${$.name}, 获取会话: 开始!`, '') 5 | const VAL_url = $request.url 6 | const VAL_body = $request.body 7 | const VAL_headers = JSON.stringify($request.headers) 8 | 9 | $.log('', `❌ ${$.name}`, `url: ${$request.url}`, `body: ${$request.body}`, `headers: ${JSON.stringify($request.headers)}`, '') 10 | 11 | if (VAL_url && VAL_body && VAL_headers) { 12 | $.setdata(VAL_url, 'chavy_signurl_noteyoudao') 13 | $.setdata(VAL_body, 'chavy_signbody_noteyoudao') 14 | $.setdata(VAL_headers, 'chavy_signheaders_noteyoudao') 15 | $.subt = '获取会话: 成功 (签到)!' 16 | } 17 | })() 18 | .catch((e) => { 19 | $.subt = '获取会话: 失败!' 20 | $.desc = `原因: ${e}` 21 | $.log(`❌ ${$.name}, 获取会话: 失败! 原因: ${e}!`) 22 | }) 23 | .finally(() => { 24 | $.msg($.name, $.subt, $.desc), $.log('', `🔔 ${$.name}, 获取会话: 结束!`, ''), $.done() 25 | }) 26 | 27 | // prettier-ignore 28 | function Env(t){this.name=t,this.logs=[],this.isSurge=(()=>"undefined"!=typeof $httpClient),this.isQuanX=(()=>"undefined"!=typeof $task),this.log=((...t)=>{this.logs=[...this.logs,...t],t?console.log(t.join("\n")):console.log(this.logs.join("\n"))}),this.msg=((t=this.name,s="",i="")=>{this.isSurge()&&$notification.post(t,s,i),this.isQuanX()&&$notify(t,s,i),this.log("==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="),t&&this.log(t),s&&this.log(s),i&&this.log(i)}),this.getdata=(t=>this.isSurge()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):void 0),this.setdata=((t,s)=>this.isSurge()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):void 0),this.get=((t,s)=>this.send(t,"GET",s)),this.wait=((t,s=t)=>i=>setTimeout(()=>i(),Math.floor(Math.random()*(s-t+1)+t))),this.post=((t,s)=>this.send(t,"POST",s)),this.send=((t,s,i)=>{if(this.isSurge()){const e="POST"==s?$httpClient.post:$httpClient.get;e(t,(t,s,e)=>{s&&(s.body=e,s.statusCode=s.status),i(t,s,e)})}this.isQuanX()&&(t.method=s,$task.fetch(t).then(t=>{t.status=t.statusCode,i(null,t,t.body)},t=>i(t.error,t,t)))}),this.done=((t={})=>$done(t))} 29 | -------------------------------------------------------------------------------- /chavyleung/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chavy_scripts", 3 | "version": "1.0.0", 4 | "main": "Env.js", 5 | "scripts": { 6 | "dev": "http-server ." 7 | }, 8 | "repository": "https://github.com/chavyleung/scripts.git", 9 | "author": "Chavy ", 10 | "license": "MIT", 11 | "dependencies": { 12 | "crypto-js": "^4.0.0", 13 | "got": "^11.5.1", 14 | "http-server": "^0.12.3", 15 | "tough-cookie": "^4.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /chavyleung/qmkg/qmkg.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '全民K歌' 2 | const signurlKey = 'senku_signurl_qmkg' 3 | const signheaderKey = 'senku_signheader_qmkg' 4 | const signbodyKey = 'senku_signbody_qmkg' 5 | const senku = init() 6 | 7 | const requrl = $request.url 8 | if ($request && $request.method != 'OPTIONS') { 9 | const signurlVal = requrl 10 | const signheaderVal = JSON.stringify($request.headers) 11 | const signbodyVal = $request.body 12 | const cmd = JSON.parse($request.body).cmd 13 | senku.log(`signurlVal:${signurlVal}`) 14 | senku.log(`signheaderVal:${signheaderVal}`) 15 | senku.log(`signbodyVal:${signbodyVal}`) 16 | if (signurlVal) senku.setdata(signurlVal, signurlKey) 17 | if (signheaderVal) senku.setdata(signheaderVal, signheaderKey) 18 | if (signbodyVal && cmd=='task.revisionSignInGetAward') { 19 | senku.setdata(signbodyVal, signbodyKey) 20 | senku.msg(cookieName, `获取Cookie: 成功`, ``) 21 | } 22 | } 23 | 24 | function init() { 25 | isSurge = () => { 26 | return undefined === this.$httpClient ? false : true 27 | } 28 | isQuanX = () => { 29 | return undefined === this.$task ? false : true 30 | } 31 | getdata = (key) => { 32 | if (isSurge()) return $persistentStore.read(key) 33 | if (isQuanX()) return $prefs.valueForKey(key) 34 | } 35 | setdata = (key, val) => { 36 | if (isSurge()) return $persistentStore.write(key, val) 37 | if (isQuanX()) return $prefs.setValueForKey(key, val) 38 | } 39 | msg = (title, subtitle, body) => { 40 | if (isSurge()) $notification.post(title, subtitle, body) 41 | if (isQuanX()) $notify(title, subtitle, body) 42 | } 43 | log = (message) => console.log(message) 44 | get = (url, cb) => { 45 | if (isSurge()) { 46 | $httpClient.get(url, cb) 47 | } 48 | if (isQuanX()) { 49 | url.method = 'GET' 50 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 51 | } 52 | } 53 | post = (url, cb) => { 54 | if (isSurge()) { 55 | $httpClient.post(url, cb) 56 | } 57 | if (isQuanX()) { 58 | url.method = 'POST' 59 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 60 | } 61 | } 62 | done = (value = {}) => { 63 | $done(value) 64 | } 65 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 66 | } 67 | senku.done() 68 | -------------------------------------------------------------------------------- /chavyleung/qmkg/qmkg.js: -------------------------------------------------------------------------------- 1 | const cookieName = '全民K歌' 2 | const signurlKey = 'senku_signurl_qmkg' 3 | const signheaderKey = 'senku_signheader_qmkg' 4 | const signbodyKey = 'senku_signbody_qmkg' 5 | const senku = init() 6 | const signurlVal = senku.getdata(signurlKey) 7 | const signheaderVal = senku.getdata(signheaderKey) 8 | const signBodyVal = senku.getdata(signbodyKey) 9 | 10 | sign() 11 | 12 | function sign() { 13 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal), body: signBodyVal } 14 | senku.post(url, (error, response, data) => { 15 | const result = JSON.parse(data) 16 | const total = result.data['task.revisionSignInGetAward'].total 17 | const ret = result.data['task.revisionSignInGetAward'].ret 18 | let subTitle = `` 19 | let detail = `` 20 | if (total != 0) { 21 | const num = result.data['task.revisionSignInGetAward'].awards[0].num 22 | subTitle = `签到结果: 成功` 23 | detail = `获得鲜花: ${num}朵,已连续签到:${total}天` 24 | } else if (ret == -11532) { 25 | subTitle = `签到结果: 成功 (重复签到)` 26 | } else { 27 | subTitle = `签到结果: 失败` 28 | } 29 | senku.msg(cookieName, subTitle, detail) 30 | senku.done() 31 | }) 32 | } 33 | 34 | function init() { 35 | isSurge = () => { 36 | return undefined === this.$httpClient ? false : true 37 | } 38 | isQuanX = () => { 39 | return undefined === this.$task ? false : true 40 | } 41 | getdata = (key) => { 42 | if (isSurge()) return $persistentStore.read(key) 43 | if (isQuanX()) return $prefs.valueForKey(key) 44 | } 45 | setdata = (key, val) => { 46 | if (isSurge()) return $persistentStore.write(key, val) 47 | if (isQuanX()) return $prefs.setValueForKey(key, val) 48 | } 49 | msg = (title, subtitle, body) => { 50 | if (isSurge()) $notification.post(title, subtitle, body) 51 | if (isQuanX()) $notify(title, subtitle, body) 52 | } 53 | log = (message) => console.log(message) 54 | get = (url, cb) => { 55 | if (isSurge()) { 56 | $httpClient.get(url, cb) 57 | } 58 | if (isQuanX()) { 59 | url.method = 'GET' 60 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 61 | } 62 | } 63 | post = (url, cb) => { 64 | if (isSurge()) { 65 | $httpClient.post(url, cb) 66 | } 67 | if (isQuanX()) { 68 | url.method = 'POST' 69 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 70 | } 71 | } 72 | done = (value = {}) => { 73 | $done(value) 74 | } 75 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 76 | } 77 | -------------------------------------------------------------------------------- /chavyleung/qtt/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/chavyleung/qtt/.DS_Store -------------------------------------------------------------------------------- /chavyleung/qunar/README.md: -------------------------------------------------------------------------------- 1 | # 去哪儿 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | user.qunar.com 10 | 11 | [Script] 12 | http-request ^https:\/\/user.qunar.com\/webapi\/member\/signIndexV2.htm script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/qunar/qunar.cookie.js 13 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/qunar/qunar.js 14 | ``` 15 | 16 | ## 配置 (QuanX) 17 | 18 | ```properties 19 | [MITM] 20 | user.qunar.com 21 | 22 | [rewrite_local] 23 | ^https:\/\/user.qunar.com\/webapi\/member\/signIndexV2.htm url script-request-header qunar.cookie.js 24 | 25 | [task_local] 26 | 1 0 * * * qunar.js 27 | ``` 28 | 29 | ## 说明 30 | 31 | 1. 先把`user.qunar.com`加到`[MITM]` 32 | 2. 再配置重写规则: 33 | - Surge: 把两条远程脚本放到`[Script]` 34 | - QuanX: 把`qunar.cookie.js`和`qunar.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 35 | 3. 打开 APP 然后手动签到 1 次: 36 | 4. 系统提示: `获取Cookie: 成功` 37 | 5. 最后就可以把第 1 条脚本注释掉了 38 | 6. 运行一次脚本, 如果提示重复签到, 那就算成功了! 39 | 40 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 41 | 42 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 43 | 44 | ## 常见问题 45 | 46 | 1. 无法写入 Cookie 47 | 48 | - 检查 Surge 系统通知权限放开了没 49 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 50 | 51 | 2. 写入 Cookie 成功, 但签到不成功 52 | 53 | - 看看是不是在登录前就写入 Cookie 了 54 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 55 | 56 | 3. 为什么有时成功有时失败 57 | 58 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 59 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 60 | 61 | - `Surge`配置: 62 | 63 | ```properties 64 | # 没有什么是一顿饭解决不了的: 65 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 66 | # 如果有,那就两顿: 67 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 68 | # 实在不行,三顿也能接受: 69 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 70 | 71 | # 再粗暴点,直接: 72 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 73 | ``` 74 | 75 | - `QuanX`配置: 76 | 77 | ```properties 78 | [task_local] 79 | 1 0 * * * xxx.js # 每天00:01执行一次 80 | 2 0 * * * xxx.js # 每天00:02执行一次 81 | 3 0 * * * xxx.js # 每天00:03执行一次 82 | 83 | */60 * * * * xxx.js # 每60分执行一次 84 | ``` 85 | 86 | ## 感谢 87 | 88 | [@NobyDa](https://github.com/NobyDa) 89 | 90 | [@lhie1](https://github.com/lhie1) 91 | 92 | [@ConnersHua](https://github.com/ConnersHua) 93 | -------------------------------------------------------------------------------- /chavyleung/qunar/qunar.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '去哪儿' 2 | const cookieKey = 'chavy_cookie_qunar' 3 | const chavy = init() 4 | const cookieVal = JSON.stringify($request.headers) 5 | 6 | if (cookieVal) { 7 | chavy.setdata(cookieVal, cookieKey) 8 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 9 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 10 | } else { 11 | chavy.msg(`${cookieName}`, '获取Cookie: 失败', '说明: 未知') 12 | chavy.log(`[${cookieName}] 获取Cookie: 失败, cookie: ${cookieVal}`) 13 | } 14 | 15 | function init() { 16 | isSurge = () => { 17 | return undefined === this.$httpClient ? false : true 18 | } 19 | isQuanX = () => { 20 | return undefined === this.$task ? false : true 21 | } 22 | getdata = (key) => { 23 | if (isSurge()) return $persistentStore.read(key) 24 | if (isQuanX()) return $prefs.valueForKey(key) 25 | } 26 | setdata = (key, val) => { 27 | if (isSurge()) return $persistentStore.write(key, val) 28 | if (isQuanX()) return $prefs.setValueForKey(key, val) 29 | } 30 | msg = (title, subtitle, body) => { 31 | if (isSurge()) $notification.post(title, subtitle, body) 32 | if (isQuanX()) $notify(title, subtitle, body) 33 | } 34 | log = (message) => console.log(message) 35 | get = (url, cb) => { 36 | if (isSurge()) { 37 | $httpClient.get(url, cb) 38 | } 39 | if (isQuanX()) { 40 | url.method = 'GET' 41 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 42 | } 43 | } 44 | post = (url, cb) => { 45 | if (isSurge()) { 46 | $httpClient.post(url, cb) 47 | } 48 | if (isQuanX()) { 49 | url.method = 'POST' 50 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 51 | } 52 | } 53 | done = (value = {}) => { 54 | $done(value) 55 | } 56 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 57 | } 58 | chavy.done() 59 | -------------------------------------------------------------------------------- /chavyleung/qunar/qunar.js: -------------------------------------------------------------------------------- 1 | const cookieName = '去哪儿' 2 | const cookieKey = 'chavy_cookie_qunar' 3 | const chavy = init() 4 | const cookieVal = JSON.parse(chavy.getdata(cookieKey)) 5 | 6 | sign() 7 | 8 | function sign() { 9 | let url = { url: `https://user.qunar.com/webapi/member/signNewIndex.htm`, headers: cookieVal } 10 | url.body = `channel=app&platform=ios` 11 | chavy.post(url, (error, response, data) => { 12 | chavy.log(`${cookieName}, data: ${data}`) 13 | let result = JSON.parse(data) 14 | const title = `${cookieName}` 15 | let subTitle = `` 16 | let detail = `` 17 | if (result.errcode == 200) { 18 | if (result.data.modalInfo.title) { 19 | subTitle = '签到结果: 成功' 20 | detail = `${result.data.unit}: ${result.data.preferential.counts}个, 共签: ${result.data.total}天, 连签: ${result.data.continuous}天, 说明: ${result.data.modalInfo.title}` 21 | } else { 22 | subTitle = '签到结果: 成功 (重复签到)' 23 | detail = `${result.data.unit}: ${result.data.preferential.counts}个, 共签: ${result.data.total}天, 连签: ${result.data.continuous}天` 24 | } 25 | } else { 26 | subTitle = '签到结果: 失败' 27 | detail = `编码: ${result.errcode}, 说明: ${result.errmsg}` 28 | } 29 | chavy.msg(title, subTitle, detail) 30 | }) 31 | 32 | chavy.done() 33 | } 34 | 35 | function init() { 36 | isSurge = () => { 37 | return undefined === this.$httpClient ? false : true 38 | } 39 | isQuanX = () => { 40 | return undefined === this.$task ? false : true 41 | } 42 | getdata = (key) => { 43 | if (isSurge()) return $persistentStore.read(key) 44 | if (isQuanX()) return $prefs.valueForKey(key) 45 | } 46 | setdata = (key, val) => { 47 | if (isSurge()) return $persistentStore.write(key, val) 48 | if (isQuanX()) return $prefs.setValueForKey(key, val) 49 | } 50 | msg = (title, subtitle, body) => { 51 | if (isSurge()) $notification.post(title, subtitle, body) 52 | if (isQuanX()) $notify(title, subtitle, body) 53 | } 54 | log = (message) => console.log(message) 55 | get = (url, cb) => { 56 | if (isSurge()) { 57 | $httpClient.get(url, cb) 58 | } 59 | if (isQuanX()) { 60 | url.method = 'GET' 61 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 62 | } 63 | } 64 | post = (url, cb) => { 65 | if (isSurge()) { 66 | $httpClient.post(url, cb) 67 | } 68 | if (isQuanX()) { 69 | url.method = 'POST' 70 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 71 | } 72 | } 73 | done = (value = {}) => { 74 | $done(value) 75 | } 76 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 77 | } 78 | -------------------------------------------------------------------------------- /chavyleung/rrtv/rrtv.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '人人视频' 2 | const cookieKey = 'chavy_cookie_rrtv' 3 | const chavy = init() 4 | const cookieVal = $request.headers['token'] 5 | if (cookieVal) { 6 | if (chavy.setdata(cookieVal, cookieKey)) { 7 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 8 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 9 | } 10 | } 11 | function init() { 12 | isSurge = () => { 13 | return undefined === this.$httpClient ? false : true 14 | } 15 | isQuanX = () => { 16 | return undefined === this.$task ? false : true 17 | } 18 | getdata = (key) => { 19 | if (isSurge()) return $persistentStore.read(key) 20 | if (isQuanX()) return $prefs.valueForKey(key) 21 | } 22 | setdata = (key, val) => { 23 | if (isSurge()) return $persistentStore.write(key, val) 24 | if (isQuanX()) return $prefs.setValueForKey(key, val) 25 | } 26 | msg = (title, subtitle, body) => { 27 | if (isSurge()) $notification.post(title, subtitle, body) 28 | if (isQuanX()) $notify(title, subtitle, body) 29 | } 30 | log = (message) => console.log(message) 31 | get = (url, cb) => { 32 | if (isSurge()) { 33 | $httpClient.get(url, cb) 34 | } 35 | if (isQuanX()) { 36 | url.method = 'GET' 37 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 38 | } 39 | } 40 | post = (url, cb) => { 41 | if (isSurge()) { 42 | $httpClient.post(url, cb) 43 | } 44 | if (isQuanX()) { 45 | url.method = 'POST' 46 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 47 | } 48 | } 49 | done = (value = {}) => { 50 | $done(value) 51 | } 52 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 53 | } 54 | chavy.done() 55 | -------------------------------------------------------------------------------- /chavyleung/sfexpress/sfexpress.cookie.js: -------------------------------------------------------------------------------- 1 | const chavy = init() 2 | const cookieName = '顺丰速运' 3 | const KEY_loginurl = 'chavy_loginurl_sfexpress' 4 | const KEY_loginheader = 'chavy_loginheader_sfexpress' 5 | const KEY_login27url = 'chavy_login27url_sfexpress' 6 | const KEY_login27header = 'chavy_login27header_sfexpress' 7 | 8 | if ($request && $request.method != 'OPTIONS' && $request.url.match(/app\/index/)) { 9 | const VAL_loginurl = $request.url 10 | const VAL_loginheader = JSON.stringify($request.headers) 11 | if (VAL_loginurl) chavy.setdata(VAL_loginurl, KEY_loginurl) 12 | if (VAL_loginheader) chavy.setdata(VAL_loginheader, KEY_loginheader) 13 | chavy.msg(cookieName, `获取Cookie: 成功`, ``) 14 | } else if ($request && $request.method != 'OPTIONS' && $request.url.match(/mcs-mimp\/share\/(.*?)Redirect/)) { 15 | const VAL_login27url = $request.url 16 | const VAL_login27header = JSON.stringify($request.headers) 17 | if (VAL_login27url) chavy.setdata(VAL_login27url, KEY_login27url) 18 | if (VAL_login27header) chavy.setdata(VAL_login27header, KEY_login27header) 19 | chavy.msg(cookieName, `获取Cookie: 成功 (27周年)`, ``) 20 | } 21 | 22 | function init() { 23 | isSurge = () => { 24 | return undefined === this.$httpClient ? false : true 25 | } 26 | isQuanX = () => { 27 | return undefined === this.$task ? false : true 28 | } 29 | getdata = (key) => { 30 | if (isSurge()) return $persistentStore.read(key) 31 | if (isQuanX()) return $prefs.valueForKey(key) 32 | } 33 | setdata = (key, val) => { 34 | if (isSurge()) return $persistentStore.write(key, val) 35 | if (isQuanX()) return $prefs.setValueForKey(key, val) 36 | } 37 | msg = (title, subtitle, body) => { 38 | if (isSurge()) $notification.post(title, subtitle, body) 39 | if (isQuanX()) $notify(title, subtitle, body) 40 | } 41 | log = (message) => console.log(message) 42 | get = (url, cb) => { 43 | if (isSurge()) { 44 | $httpClient.get(url, cb) 45 | } 46 | if (isQuanX()) { 47 | url.method = 'GET' 48 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 49 | } 50 | } 51 | post = (url, cb) => { 52 | if (isSurge()) { 53 | $httpClient.post(url, cb) 54 | } 55 | if (isQuanX()) { 56 | url.method = 'POST' 57 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 58 | } 59 | } 60 | done = (value = {}) => { 61 | $done(value) 62 | } 63 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 64 | } 65 | chavy.done() 66 | -------------------------------------------------------------------------------- /chavyleung/smzdm/README.md: -------------------------------------------------------------------------------- 1 | # 什么值得买 2 | 3 | ## 配置 4 | 5 | ```properties 6 | [MITM] 7 | *.smzdm.com 8 | 9 | [Script] 10 | http-request ^https:\/\/www\.smzdm\.com\/?.? script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/smzdm/smzdm.cookie.js 11 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/smzdm/smzdm.js 12 | ``` 13 | 14 | ## 说明 15 | 16 | 1. 先把`*.smzdm.com`加到`[MITM]` 17 | 2. 再把两条远程脚本放到`[Script]` 18 | 3. 浏览器访问并登录: https://zhiyou.smzdm.com/user/login 19 | 4. 打开浏览器访问: https://www.smzdm.com 20 | 5. `Surge`提示: `Cookie [什么值得买] 写入成功` 21 | 6. 最后就可以把第 1 条脚本注释掉了 22 | 23 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 24 | 25 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 26 | 27 | ## 常见问题 28 | 29 | 1. 无法写入 Cookie 30 | 31 | - 检查 Surge 系统通知权限放开了没 32 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 33 | 34 | 2. 写入 Cookie 成功, 但签到不成功 35 | 36 | - 看看是不是在登录前就写入 Cookie 了 37 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 38 | 39 | 3. 为什么有时成功有时失败 40 | 41 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 42 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 43 | 44 | - `Surge`配置: 45 | 46 | ```properties 47 | # 没有什么是一顿饭解决不了的: 48 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 49 | # 如果有,那就两顿: 50 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 51 | # 实在不行,三顿也能接受: 52 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 53 | 54 | # 再粗暴点,直接: 55 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 56 | ``` 57 | 58 | - `QuanX`配置: 59 | 60 | ```properties 61 | [task_local] 62 | 1 0 * * * xxx.js # 每天00:01执行一次 63 | 2 0 * * * xxx.js # 每天00:02执行一次 64 | 3 0 * * * xxx.js # 每天00:03执行一次 65 | 66 | */60 * * * * xxx.js # 每60分执行一次 67 | ``` 68 | 69 | ## 感谢 70 | 71 | [@NobyDa](https://github.com/NobyDa) 72 | 73 | [@lhie1](https://github.com/lhie1) 74 | 75 | [@ConnersHua](https://github.com/ConnersHua) 76 | -------------------------------------------------------------------------------- /chavyleung/smzdm/quanx/README.md: -------------------------------------------------------------------------------- 1 | # 什么值得买 2 | 3 | ## 配置 4 | 5 | ```properties 6 | [MITM] 7 | *.smzdm.com 8 | 9 | [rewrite_local] 10 | # 189及以前版本 11 | ^https:\/\/www\.smzdm\.com\/?.? url script-response-body smzdm.cookie.js 12 | # 190及以后版本 13 | ^https:\/\/www\.smzdm\.com\/?.? url script-request-header smzdm.cookie.js 14 | 15 | [task_local] 16 | 1 0 * * * smzdm.js 17 | ``` 18 | 19 | ## 说明 20 | 21 | 1. 先把`*.smzdm.com`加到`[MITM]` 22 | 2. 把`smzdm.cookie.js`和`smzdm.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关) 23 | 3. 再把两条脚本分别放到`[rewrite_local]`和`[task_local]` 24 | 4. 浏览器访问并登录: https://zhiyou.smzdm.com/user/login 25 | 5. 打开浏览器访问: https://www.smzdm.com 26 | 6. `QuanX`提示: `Cookie [什么值得买] 写入成功` 27 | 7. 最后就可以把`[rewrite_local]`的脚本注释掉了 28 | 29 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 30 | 31 | > 第 2 条脚本是签到脚本, 每天`00:01:00`执行一次. 32 | 33 | ## 常见问题 34 | 35 | 1. 无法写入 Cookie 36 | 37 | - 检查 QuanX 系统通知权限放开了没 38 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 39 | 40 | 2. 写入 Cookie 成功, 但签到不成功 41 | 42 | - 看看是不是在登录前就写入 Cookie 了 43 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 44 | 45 | 3. 为什么有时成功有时失败 46 | 47 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 48 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 49 | 50 | - `Surge`配置: 51 | 52 | ```properties 53 | # 没有什么是一顿饭解决不了的: 54 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 55 | # 如果有,那就两顿: 56 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 57 | # 实在不行,三顿也能接受: 58 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 59 | 60 | # 再粗暴点,直接: 61 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 62 | ``` 63 | 64 | - `QuanX`配置: 65 | 66 | ```properties 67 | [task_local] 68 | 1 0 * * * xxx.js # 每天00:01执行一次 69 | 2 0 * * * xxx.js # 每天00:02执行一次 70 | 3 0 * * * xxx.js # 每天00:03执行一次 71 | 72 | */60 * * * * xxx.js # 每60分执行一次 73 | ``` 74 | 75 | ## 感谢 76 | 77 | [@NobyDa](https://github.com/NobyDa) 78 | 79 | [@lhie1](https://github.com/lhie1) 80 | 81 | [@ConnersHua](https://github.com/ConnersHua) 82 | -------------------------------------------------------------------------------- /chavyleung/smzdm/quanx/smzdm.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '什么值得买' 2 | const cookieKey = 'chavy_cookie_smzdm' 3 | const cookieVal = $request.headers['Cookie'] 4 | 5 | if (cookieVal) { 6 | let cookie = $prefs.setValueForKey(cookieVal, cookieKey) 7 | if (cookie) { 8 | let msg = `${cookieName}` 9 | $notify(msg, 'Cookie写入成功', '详见日志') 10 | console.log(msg) 11 | console.log(cookieVal) 12 | } 13 | } 14 | 15 | $done({}) 16 | -------------------------------------------------------------------------------- /chavyleung/smzdm/smzdm.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '什么值得买' 2 | const cookieKey = 'chavy_cookie_smzdm' 3 | const cookieVal = $request.headers['Cookie'] 4 | 5 | if (cookieVal) { 6 | let cookie = $persistentStore.write(cookieVal, cookieKey) 7 | if (cookie) { 8 | let msg = `${cookieName}` 9 | $notification.post(msg, 'Cookie写入成功', '详见日志') 10 | console.log(msg) 11 | console.log(cookieVal) 12 | } 13 | } 14 | 15 | $done({}) 16 | -------------------------------------------------------------------------------- /chavyleung/surge.box.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=BoxJs 2 | #!desc=http://boxjs.com, https://8.8.8.8, https://1.1.1.1 3 | 4 | [Script] 5 | Rewrite: BoxJs = type=http-request,pattern=^https://8.8.8.8(/api|/home|/sub|/my|/app|/log|/revert)?($|\/),script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js,requires-body=true,max-size=0,timeout=120 6 | Rewrite: BoxJs = type=http-request,pattern=^https?://1.1.1.1(/api|/home|/sub|/my|/app|/log|/revert)?($|\/),script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js,requires-body=true,max-size=0,timeout=120 7 | Rewrite: BoxJs = type=http-request,pattern=^https?://boxjs.com(/api|/home|/sub|/my|/app|/log|/revert)?($|\/),script-path=https://gitee.com/chavyleung/scripts/raw/master/chavy.box.js, requires-body=true, timeout=120 8 | 9 | [MITM] 10 | hostname = %INSERT%, 8.8.8.8, 1.1.1.1 -------------------------------------------------------------------------------- /chavyleung/tieba/tieba.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '百度贴吧' 2 | const cookieKey = 'chavy_cookie_tieba' 3 | const chavy = init() 4 | const cookieVal = $request.headers['Cookie'] 5 | 6 | if (cookieVal.indexOf('BDUSS') > 0) { 7 | let cookie = chavy.setdata(cookieVal, cookieKey) 8 | if (cookie) { 9 | let subTitle = '获取Cookie: 成功' 10 | chavy.msg(`${cookieName}`, subTitle, '') 11 | chavy.log(`[${cookieName}] ${subTitle}, cookie: ${cookieVal}`) 12 | } 13 | } else { 14 | let subTitle = '获取Cookie: 失败' 15 | let detail = `请确保在已登录状态下获取Cookie` 16 | chavy.msg(`${cookieName}`, subTitle, detail) 17 | chavy.log(`[${cookieName}] ${subTitle}, cookie: ${cookieVal}`) 18 | } 19 | 20 | function init() { 21 | isSurge = () => { 22 | return undefined === this.$httpClient ? false : true 23 | } 24 | isQuanX = () => { 25 | return undefined === this.$task ? false : true 26 | } 27 | getdata = (key) => { 28 | if (isSurge()) return $persistentStore.read(key) 29 | if (isQuanX()) return $prefs.valueForKey(key) 30 | } 31 | setdata = (key, val) => { 32 | if (isSurge()) return $persistentStore.write(key, val) 33 | if (isQuanX()) return $prefs.setValueForKey(key, val) 34 | } 35 | msg = (title, subtitle, body) => { 36 | if (isSurge()) $notification.post(title, subtitle, body) 37 | if (isQuanX()) $notify(title, subtitle, body) 38 | } 39 | log = (message) => console.log(message) 40 | get = (url, cb) => { 41 | if (isSurge()) { 42 | $httpClient.get(url, cb) 43 | } 44 | if (isQuanX()) { 45 | url.method = 'GET' 46 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 47 | } 48 | } 49 | post = (url, cb) => { 50 | if (isSurge()) { 51 | $httpClient.post(url, cb) 52 | } 53 | if (isQuanX()) { 54 | url.method = 'POST' 55 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 56 | } 57 | } 58 | done = (value = {}) => { 59 | $done(value) 60 | } 61 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 62 | } 63 | 64 | chavy.done() 65 | -------------------------------------------------------------------------------- /chavyleung/tncj/README.md: -------------------------------------------------------------------------------- 1 | # 头脑吃鸡 2 | 3 | > 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可 4 | 5 | ## 配置 (Surge) 6 | 7 | ```properties 8 | [MITM] 9 | tncj.hortorgames.com 10 | 11 | [Script] 12 | http-response ^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/tncj/tncj.min.js 13 | ``` 14 | 15 | ## 配置 (QuanX) 16 | 17 | ```properties 18 | [MITM] 19 | tncj.hortorgames.com 20 | 21 | [rewrite_local] 22 | ^https://tncj.hortorgames.com/chicken/fight/(answer|findQuiz) url script-response-body tncj.min.js 23 | 24 | ``` 25 | 26 | ## 感谢 27 | 28 | [@LeeeMooo](https://github.com/LeeeMooo) 29 | -------------------------------------------------------------------------------- /chavyleung/v2ex/README.md: -------------------------------------------------------------------------------- 1 | # V2EX 2 | 3 | ## 配置 4 | 5 | ```properties 6 | [MITM] 7 | *.v2ex.com 8 | 9 | [Script] 10 | http-request ^https:\/\/www\.v2ex\.com\/mission\/daily script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/v2ex/v2ex.cookie.js 11 | cron "10 0 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/v2ex/v2ex.js 12 | ``` 13 | 14 | ## 说明 15 | 16 | 1. 先把`*.v2ex.com`加到`[MITM]` 17 | 2. 再把两条远程脚本放到`[Script]` 18 | 3. 浏览器访问并登录: https://www.v2ex.com 19 | 4. 打开浏览器访问: https://www.v2ex.com/mission/daily 20 | 5. `Surge`提示: `Cookie [V2EX] 写入成功` 21 | 6. 最后就可以把第 1 条脚本注释掉了 22 | 23 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 24 | 25 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 26 | 27 | ## 常见问题 28 | 29 | 1. 无法写入 Cookie 30 | 31 | - 检查 Surge 系统通知权限放开了没 32 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 33 | 34 | 2. 写入 Cookie 成功, 但签到不成功 35 | 36 | - 看看是不是在登录前就写入 Cookie 了 37 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 38 | 39 | 3. 为什么有时成功有时失败 40 | 41 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 42 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 43 | 44 | - `Surge`配置: 45 | 46 | ```properties 47 | # 没有什么是一顿饭解决不了的: 48 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 49 | # 如果有,那就两顿: 50 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 51 | # 实在不行,三顿也能接受: 52 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 53 | 54 | # 再粗暴点,直接: 55 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 56 | ``` 57 | 58 | - `QuanX`配置: 59 | 60 | ```properties 61 | [task_local] 62 | 1 0 * * * xxx.js # 每天00:01执行一次 63 | 2 0 * * * xxx.js # 每天00:02执行一次 64 | 3 0 * * * xxx.js # 每天00:03执行一次 65 | 66 | */60 * * * * xxx.js # 每60分执行一次 67 | ``` 68 | 69 | ## 感谢 70 | 71 | [@NobyDa](https://github.com/NobyDa) 72 | 73 | [@lhie1](https://github.com/lhie1) 74 | 75 | [@ConnersHua](https://github.com/ConnersHua) 76 | -------------------------------------------------------------------------------- /chavyleung/v2ex/quanx/README.md: -------------------------------------------------------------------------------- 1 | # 百度贴吧 2 | 3 | > 2020.1.11 QuanX 在`190`版本开始, 获取 Cookie 方式需要从`script-response-body`改为`script-request-header` 4 | 5 | ## 配置 6 | 7 | ```properties 8 | [MITM] 9 | *.v2ex.com 10 | 11 | [rewrite_local] 12 | # 189及以前版本 13 | ^https:\/\/www\.v2ex\.com\/mission\/daily url script-response-body v2ex.cookie.js 14 | # 190及以后版本 15 | ^https:\/\/www\.v2ex\.com\/mission\/daily url script-request-header v2ex.cookie.js 16 | 17 | [task_local] 18 | 1 0 * * * v2ex.js 19 | ``` 20 | 21 | ## 说明 22 | 23 | 1. 先把`*.v2ex.com`加到`[MITM]` 24 | 2. 再把两条远程脚本放到`[Script]` 25 | 3. 先在浏览器登录 `(先登录! 先登录! 先登录!)` 26 | 4. 打开浏览器访问: https://www.v2ex.com/mission/daily 27 | 5. `QuanX`提示: `Cookie [V2EX] 写入成功` (如果提示多条写入成功,忽略就好) 28 | 6. 最后就可以把第 1 条脚本注释掉了 29 | 30 | > 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie. 31 | 32 | > 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次. 33 | 34 | ## 常见问题 35 | 36 | 1. 无法写入 Cookie 37 | 38 | - 检查 QuanX 系统通知权限放开了没 39 | - 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴) 40 | 41 | 2. 写入 Cookie 成功, 但签到不成功 42 | 43 | - 看看是不是在登录前就写入 Cookie 了 44 | - 如果是,请确保在登录成功后,再尝试写入 Cookie 45 | 46 | 3. 为什么有时成功有时失败 47 | 48 | - 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败) 49 | - 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学): 50 | 51 | - `Surge`配置: 52 | 53 | ```properties 54 | # 没有什么是一顿饭解决不了的: 55 | cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次 56 | # 如果有,那就两顿: 57 | cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次 58 | # 实在不行,三顿也能接受: 59 | cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次 60 | 61 | # 再粗暴点,直接: 62 | cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次 63 | ``` 64 | 65 | - `QuanX`配置: 66 | 67 | ```properties 68 | [task_local] 69 | 1 0 * * * xxx.js # 每天00:01执行一次 70 | 2 0 * * * xxx.js # 每天00:02执行一次 71 | 3 0 * * * xxx.js # 每天00:03执行一次 72 | 73 | */60 * * * * xxx.js # 每60分执行一次 74 | ``` 75 | 76 | ## 感谢 77 | 78 | [@NobyDa](https://github.com/NobyDa) 79 | 80 | [@lhie1](https://github.com/lhie1) 81 | 82 | [@ConnersHua](https://github.com/ConnersHua) 83 | -------------------------------------------------------------------------------- /chavyleung/v2ex/quanx/v2ex.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'V2EX' 2 | const cookieKey = 'chavy_cookie_v2ex' 3 | const cookieVal = $request.headers['Cookie'] 4 | 5 | if (cookieVal) { 6 | let cookie = $prefs.setValueForKey(cookieVal, cookieKey) 7 | if (cookie) { 8 | let msg = `${cookieName}` 9 | $notify(msg, 'Cookie写入成功', '详见日志') 10 | console.log(msg) 11 | console.log(cookieVal) 12 | } 13 | } 14 | 15 | $done({}) 16 | -------------------------------------------------------------------------------- /chavyleung/v2ex/quanx/v2ex.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'V2EX' 2 | const cookieKey = 'chavy_cookie_v2ex' 3 | const cookieVal = $prefs.valueForKey(cookieKey) 4 | 5 | function sign() { 6 | let url = { 7 | url: `https://www.v2ex.com/mission/daily`, 8 | method: 'GET', 9 | headers: { 10 | Cookie: cookieVal 11 | } 12 | } 13 | $task.fetch(url).then((response) => { 14 | let data = response.body 15 | if (data.indexOf('每日登录奖励已领取') >= 0) { 16 | let title = `${cookieName}` 17 | let subTitle = `签到结果: 签到跳过` 18 | let detail = `今天已经签过了` 19 | console.log(`${title}, ${subTitle}, ${detail}`) 20 | $notify(title, subTitle, detail) 21 | } else { 22 | signMission(data.match(/]*\/mission\/daily\/redeem\?once=(\d+)[^>]*>/)[1]) 23 | } 24 | }) 25 | } 26 | 27 | function signMission(code) { 28 | let url = { 29 | url: `https://www.v2ex.com/mission/daily/redeem?once=${code}`, 30 | method: 'GET', 31 | headers: { Cookie: cookieVal } 32 | } 33 | $task.fetch(url).then((response) => { 34 | let data = response.body 35 | if (data.indexOf('每日登录奖励已领取') >= 0) { 36 | let title = `${cookieName}` 37 | let subTitle = `签到结果: 签到成功` 38 | let detail = `` 39 | console.log(`${title}, ${subTitle}, ${detail}`) 40 | $notify(title, subTitle, detail) 41 | } else { 42 | let title = `${cookieName}` 43 | let subTitle = `签到结果: 签到失败` 44 | let detail = `详见日志` 45 | console.log(`签到失败: ${cookieName}, data: ${data}`) 46 | $notify(title, subTitle, detail) 47 | } 48 | }) 49 | } 50 | 51 | sign({}) 52 | -------------------------------------------------------------------------------- /chavyleung/v2ex/v2ex.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'V2EX' 2 | const cookieKey = 'chavy_cookie_v2ex' 3 | const cookieVal = $request.headers['Cookie'] 4 | 5 | if (cookieVal) { 6 | let cookie = $persistentStore.write(cookieVal, cookieKey) 7 | if (cookie) { 8 | let msg = `${cookieName}` 9 | $notification.post(msg, 'Cookie写入成功', '详见日志') 10 | console.log(msg) 11 | console.log(cookieVal) 12 | } 13 | } 14 | 15 | $done({}) 16 | -------------------------------------------------------------------------------- /chavyleung/v2ex/v2ex.js: -------------------------------------------------------------------------------- 1 | const cookieName = 'V2EX' 2 | const cookieKey = 'chavy_cookie_v2ex' 3 | const cookieVal = $persistentStore.read(cookieKey) 4 | 5 | function sign() { 6 | let url = { 7 | url: `https://www.v2ex.com/mission/daily`, 8 | headers: { 9 | Cookie: cookieVal 10 | } 11 | } 12 | $httpClient.get(url, (error, response, data) => { 13 | if (data.indexOf('每日登录奖励已领取') >= 0) { 14 | let title = `${cookieName}` 15 | let subTitle = `签到结果: 签到跳过` 16 | let detail = `今天已经签过了` 17 | console.log(`${title}, ${subTitle}, ${detail}`) 18 | $notification.post(title, subTitle, detail) 19 | } else { 20 | signMission(data.match(/]*\/mission\/daily\/redeem\?once=(\d+)[^>]*>/)[1]) 21 | } 22 | }) 23 | $done({}) 24 | } 25 | 26 | function signMission(code) { 27 | let url = { 28 | url: `https://www.v2ex.com/mission/daily/redeem?once=${code}`, 29 | headers: { Cookie: cookieVal } 30 | } 31 | $httpClient.get(url, (error, response, data) => { 32 | if (data.indexOf('每日登录奖励已领取') >= 0) { 33 | let title = `${cookieName}` 34 | let subTitle = `签到结果: 签到成功` 35 | let detail = `` 36 | console.log(`${title}, ${subTitle}, ${detail}`) 37 | $notification.post(title, subTitle, detail) 38 | } else { 39 | let title = `${cookieName}` 40 | let subTitle = `签到结果: 签到失败` 41 | let detail = `详见日志` 42 | console.log(`签到失败: ${cookieName}, error: ${error}, response: ${response}, data: ${data}`) 43 | $notification.post(title, subTitle, detail) 44 | } 45 | }) 46 | } 47 | 48 | sign({}) 49 | -------------------------------------------------------------------------------- /chavyleung/wps/wps.cookie.js: -------------------------------------------------------------------------------- 1 | const $ = new Env('WPS') 2 | 3 | !(async () => { 4 | $.log('', `🔔 ${$.name}, 获取会话: 开始!`, '') 5 | const VAL_url = $request.url 6 | const VAL_headers = JSON.stringify($request.headers) 7 | $.log('', `❕ ${$.name}`, `url: ${$request.url}`, `headers: ${JSON.stringify($request.headers)}`, '') 8 | $.setdata(VAL_url, 'chavy_signhomeurl_wps') 9 | $.setdata(VAL_headers, 'chavy_signhomeheader_wps') 10 | $.subt = '获取会话: 成功!' 11 | })() 12 | .catch((e) => { 13 | $.subt = '获取会话: 失败!' 14 | $.desc = `原因: ${e}` 15 | $.log(`❌ ${$.name}, 获取会话: 失败! 原因: ${e}!`) 16 | }) 17 | .finally(() => { 18 | $.msg($.name, $.subt, $.desc), $.log('', `🔔 ${$.name}, 获取会话: 结束!`, ''), $.done() 19 | }) 20 | 21 | // prettier-ignore 22 | function Env(s){this.name=s,this.data=null,this.logs=[],this.isSurge=(()=>"undefined"!=typeof $httpClient),this.isQuanX=(()=>"undefined"!=typeof $task),this.isNode=(()=>"undefined"!=typeof module&&!!module.exports),this.log=((...s)=>{this.logs=[...this.logs,...s],s?console.log(s.join("\n")):console.log(this.logs.join("\n"))}),this.msg=((s=this.name,t="",i="")=>{this.isSurge()&&$notification.post(s,t,i),this.isQuanX()&&$notify(s,t,i);const e=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];s&&e.push(s),t&&e.push(t),i&&e.push(i),console.log(e.join("\n"))}),this.getdata=(s=>{if(this.isSurge())return $persistentStore.read(s);if(this.isQuanX())return $prefs.valueForKey(s);if(this.isNode()){const t="box.dat";return this.fs=this.fs?this.fs:require("fs"),this.fs.existsSync(t)?(this.data=JSON.parse(this.fs.readFileSync(t)),this.data[s]):null}}),this.setdata=((s,t)=>{if(this.isSurge())return $persistentStore.write(s,t);if(this.isQuanX())return $prefs.setValueForKey(s,t);if(this.isNode()){const i="box.dat";return this.fs=this.fs?this.fs:require("fs"),!!this.fs.existsSync(i)&&(this.data=JSON.parse(this.fs.readFileSync(i)),this.data[t]=s,this.fs.writeFileSync(i,JSON.stringify(this.data)),!0)}}),this.wait=((s,t=s)=>i=>setTimeout(()=>i(),Math.floor(Math.random()*(t-s+1)+s))),this.get=((s,t)=>this.send(s,"GET",t)),this.post=((s,t)=>this.send(s,"POST",t)),this.send=((s,t,i)=>{if(this.isSurge()){const e="POST"==t?$httpClient.post:$httpClient.get;e(s,(s,t,e)=>{t&&(t.body=e,t.statusCode=t.status),i(s,t,e)})}this.isQuanX()&&(s.method=t,$task.fetch(s).then(s=>{s.status=s.statusCode,i(null,s,s.body)},s=>i(s.error,s,s))),this.isNode()&&(this.request=this.request?this.request:require("request"),s.method=t,s.gzip=!0,this.request(s,(s,t,e)=>{t&&(t.status=t.statusCode),i(null,t,e)}))}),this.done=((s={})=>this.isNode()?null:$done(s))} 23 | -------------------------------------------------------------------------------- /chavyleung/wykl/wykl.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '网易考拉' 2 | const signurlKey = 'senku_signurl_wykl' 3 | const signheaderKey = 'senku_signheader_wykl' 4 | const signbodyKey = 'senku_signbody_wykl' 5 | const senku = init() 6 | 7 | const requrl = $request.url 8 | if ($request && $request.method != 'OPTIONS') { 9 | const signurlVal = requrl 10 | const signheaderVal = JSON.stringify($request.headers) 11 | const signbodyVal = $request.body 12 | if (signurlVal) senku.setdata(signurlVal, signurlKey) 13 | if (signheaderVal) senku.setdata(signheaderVal, signheaderKey) 14 | if (signbodyVal) senku.setdata(signbodyVal, signbodyKey) 15 | senku.msg(cookieName, `获取Cookie: 成功`, ``) 16 | } 17 | 18 | function init() { 19 | isSurge = () => { 20 | return undefined === this.$httpClient ? false : true 21 | } 22 | isQuanX = () => { 23 | return undefined === this.$task ? false : true 24 | } 25 | getdata = (key) => { 26 | if (isSurge()) return $persistentStore.read(key) 27 | if (isQuanX()) return $prefs.valueForKey(key) 28 | } 29 | setdata = (key, val) => { 30 | if (isSurge()) return $persistentStore.write(key, val) 31 | if (isQuanX()) return $prefs.setValueForKey(key, val) 32 | } 33 | msg = (title, subtitle, body) => { 34 | if (isSurge()) $notification.post(title, subtitle, body) 35 | if (isQuanX()) $notify(title, subtitle, body) 36 | } 37 | log = (message) => console.log(message) 38 | get = (url, cb) => { 39 | if (isSurge()) { 40 | $httpClient.get(url, cb) 41 | } 42 | if (isQuanX()) { 43 | url.method = 'GET' 44 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 45 | } 46 | } 47 | post = (url, cb) => { 48 | if (isSurge()) { 49 | $httpClient.post(url, cb) 50 | } 51 | if (isQuanX()) { 52 | url.method = 'POST' 53 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 54 | } 55 | } 56 | done = (value = {}) => { 57 | $done(value) 58 | } 59 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 60 | } 61 | senku.done() 62 | -------------------------------------------------------------------------------- /chavyleung/wykl/wykl.js: -------------------------------------------------------------------------------- 1 | const cookieName = '网易考拉' 2 | const signurlKey = 'senku_signurl_wykl' 3 | const signheaderKey = 'senku_signheader_wykl' 4 | const signbodyKey = 'senku_signbody_wykl' 5 | const senku = init() 6 | const signurlVal = senku.getdata(signurlKey) 7 | const signheaderVal = senku.getdata(signheaderKey) 8 | const signBodyVal = senku.getdata(signbodyKey) 9 | 10 | sign() 11 | 12 | function sign() { 13 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal), body: signBodyVal } 14 | senku.post(url, (error, response, data) => { 15 | senku.log(`${cookieName}, data: ${data}`) 16 | const res = JSON.parse(data) 17 | let subTitle = `` 18 | let detail = `` 19 | if (res.retCode == 200) { 20 | subTitle = `签到结果: 成功` 21 | detail = `获得:${res.data.popupWindowInfo.frontRewardName},签到天数:${res.data.signCount}` 22 | } else if (res.retCode==401 || res.retCode==403 || res.code==401) { 23 | subTitle = `签到结果: 成功 (重复签到)` 24 | } else { 25 | subTitle = `签到结果: 失败` 26 | detail = `编码: ${res.code}, 说明: ${res.msg}` 27 | } 28 | senku.msg(cookieName, subTitle, detail) 29 | senku.done() 30 | }) 31 | } 32 | 33 | function init() { 34 | isSurge = () => { 35 | return undefined === this.$httpClient ? false : true 36 | } 37 | isQuanX = () => { 38 | return undefined === this.$task ? false : true 39 | } 40 | getdata = (key) => { 41 | if (isSurge()) return $persistentStore.read(key) 42 | if (isQuanX()) return $prefs.valueForKey(key) 43 | } 44 | setdata = (key, val) => { 45 | if (isSurge()) return $persistentStore.write(key, val) 46 | if (isQuanX()) return $prefs.setValueForKey(key, val) 47 | } 48 | msg = (title, subtitle, body) => { 49 | if (isSurge()) $notification.post(title, subtitle, body) 50 | if (isQuanX()) $notify(title, subtitle, body) 51 | } 52 | log = (message) => console.log(message) 53 | get = (url, cb) => { 54 | if (isSurge()) { 55 | $httpClient.get(url, cb) 56 | } 57 | if (isQuanX()) { 58 | url.method = 'GET' 59 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 60 | } 61 | } 62 | post = (url, cb) => { 63 | if (isSurge()) { 64 | $httpClient.post(url, cb) 65 | } 66 | if (isQuanX()) { 67 | url.method = 'POST' 68 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 69 | } 70 | } 71 | done = (value = {}) => { 72 | $done(value) 73 | } 74 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 75 | } 76 | -------------------------------------------------------------------------------- /chavyleung/ximalaya/ximalaya.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '喜马拉雅' 2 | const cookieKey = 'chavy_cookie_ximalaya' 3 | const chavy = init() 4 | const cookieVal = $request.headers['Cookie'] 5 | if (cookieVal) { 6 | if (chavy.setdata(cookieVal, cookieKey)) { 7 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 8 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 9 | } 10 | } 11 | 12 | function init() { 13 | isSurge = () => { 14 | return undefined === this.$httpClient ? false : true 15 | } 16 | isQuanX = () => { 17 | return undefined === this.$task ? false : true 18 | } 19 | getdata = (key) => { 20 | if (isSurge()) return $persistentStore.read(key) 21 | if (isQuanX()) return $prefs.valueForKey(key) 22 | } 23 | setdata = (key, val) => { 24 | if (isSurge()) return $persistentStore.write(key, val) 25 | if (isQuanX()) return $prefs.setValueForKey(key, val) 26 | } 27 | msg = (title, subtitle, body) => { 28 | if (isSurge()) $notification.post(title, subtitle, body) 29 | if (isQuanX()) $notify(title, subtitle, body) 30 | } 31 | log = (message) => console.log(message) 32 | get = (url, cb) => { 33 | if (isSurge()) { 34 | $httpClient.get(url, cb) 35 | } 36 | if (isQuanX()) { 37 | url.method = 'GET' 38 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 39 | } 40 | } 41 | post = (url, cb) => { 42 | if (isSurge()) { 43 | $httpClient.post(url, cb) 44 | } 45 | if (isQuanX()) { 46 | url.method = 'POST' 47 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 48 | } 49 | } 50 | done = (value = {}) => { 51 | $done(value) 52 | } 53 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 54 | } 55 | chavy.done() 56 | -------------------------------------------------------------------------------- /chavyleung/yanxuan/yanxuan.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '网易严选' 2 | const cookieKey = 'chavy_cookie_yanxuan' 3 | const tokenKey = 'chavy_token_yanxuan' 4 | const chavy = init() 5 | const cookieVal = $request.headers['Cookie'] 6 | if (cookieVal.indexOf('yx_csrf') > 0) { 7 | if (chavy.setdata(cookieVal, cookieKey)) { 8 | chavy.msg(`${cookieName}`, '获取Cookie: 成功', '') 9 | chavy.log(`[${cookieName}] 获取Cookie: 成功, cookie: ${cookieVal}`) 10 | } 11 | } else { 12 | chavy.msg(`${cookieName}`, '获取Cookie: 失败', `请确保在已登录状态下获取Cookie`) 13 | chavy.log(`[${cookieName}] ${subTitle}, cookie: ${cookieVal}`) 14 | } 15 | 16 | const queryparam = $request.url.split('?')[1] 17 | if (queryparam) { 18 | const params = {} 19 | for (param of $request.url.split('?')[1].split('&')) { 20 | params[param.split('=')[0]] = param.split('=')[1] 21 | } 22 | const token = JSON.stringify(params) 23 | if (params['csrf_token'] && chavy.setdata(token, tokenKey)) { 24 | chavy.msg(`${cookieName}`, '获取Token: 成功', '') 25 | chavy.log(`[${cookieName}] 获取Token: 成功, token: ${token}`) 26 | } 27 | } 28 | 29 | function init() { 30 | isSurge = () => { 31 | return undefined === this.$httpClient ? false : true 32 | } 33 | isQuanX = () => { 34 | return undefined === this.$task ? false : true 35 | } 36 | getdata = (key) => { 37 | if (isSurge()) return $persistentStore.read(key) 38 | if (isQuanX()) return $prefs.valueForKey(key) 39 | } 40 | setdata = (key, val) => { 41 | if (isSurge()) return $persistentStore.write(key, val) 42 | if (isQuanX()) return $prefs.setValueForKey(key, val) 43 | } 44 | msg = (title, subtitle, body) => { 45 | if (isSurge()) $notification.post(title, subtitle, body) 46 | if (isQuanX()) $notify(title, subtitle, body) 47 | } 48 | log = (message) => console.log(message) 49 | get = (url, cb) => { 50 | if (isSurge()) { 51 | $httpClient.get(url, cb) 52 | } 53 | if (isQuanX()) { 54 | url.method = 'GET' 55 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 56 | } 57 | } 58 | post = (url, cb) => { 59 | if (isSurge()) { 60 | $httpClient.post(url, cb) 61 | } 62 | if (isQuanX()) { 63 | url.method = 'POST' 64 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 65 | } 66 | } 67 | done = (value = {}) => { 68 | $done(value) 69 | } 70 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 71 | } 72 | chavy.done() 73 | -------------------------------------------------------------------------------- /chavyleung/zimuzu/zimuzu.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '字幕组' 2 | const cookieKey = 'chavy_cookie_zimuzu' 3 | const cookieAppKey = 'chavy_cookie_zimuzu_app' 4 | const authUrlAppKey = 'chavy_auth_url_zimuzu_app' 5 | const chavy = init() 6 | if ($request.headers.Host == 'h5.rrhuodong.com') { 7 | const cookieVal = $request.headers['Cookie'] 8 | if (cookieVal) { 9 | if (chavy.setdata(cookieVal, cookieAppKey)) { 10 | chavy.setdata(``, authUrlAppKey) 11 | chavy.msg(`${cookieName} (APP)`, '获取Cookie: 成功', '') 12 | chavy.log(`[${cookieName} (APP)] 获取Cookie: 成功, cookie: ${cookieVal}`) 13 | } 14 | } 15 | } else if ($request.headers.Host == `ios.zmzapi.com` && $request.url.indexOf('accesskey') >= 0) { 16 | if (chavy.setdata($request.url, authUrlAppKey)) { 17 | chavy.setdata(``, cookieAppKey) 18 | chavy.msg(`${cookieName} (APP)`, '获取Cookie: 成功', '') 19 | chavy.log(`[${cookieName} (APP)] 获取Cookie: 成功, cookie: ${$request.url}`) 20 | } 21 | } else { 22 | const cookieVal = $request.headers['Cookie'] 23 | if (cookieVal) { 24 | if (chavy.setdata(cookieVal, cookieKey)) { 25 | chavy.msg(`${cookieName} (网页)`, '获取Cookie: 成功', '') 26 | chavy.log(`[${cookieName} (网页)] 获取Cookie: 成功, cookie: ${cookieVal}`) 27 | } 28 | } 29 | } 30 | 31 | function init() { 32 | isSurge = () => { 33 | return undefined === this.$httpClient ? false : true 34 | } 35 | isQuanX = () => { 36 | return undefined === this.$task ? false : true 37 | } 38 | getdata = (key) => { 39 | if (isSurge()) return $persistentStore.read(key) 40 | if (isQuanX()) return $prefs.valueForKey(key) 41 | } 42 | setdata = (key, val) => { 43 | if (isSurge()) return $persistentStore.write(key, val) 44 | if (isQuanX()) return $prefs.setValueForKey(key, val) 45 | } 46 | msg = (title, subtitle, body) => { 47 | if (isSurge()) $notification.post(title, subtitle, body) 48 | if (isQuanX()) $notify(title, subtitle, body) 49 | } 50 | log = (message) => console.log(message) 51 | get = (url, cb) => { 52 | if (isSurge()) { 53 | $httpClient.get(url, cb) 54 | } 55 | if (isQuanX()) { 56 | url.method = 'GET' 57 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 58 | } 59 | } 60 | post = (url, cb) => { 61 | if (isSurge()) { 62 | $httpClient.post(url, cb) 63 | } 64 | if (isQuanX()) { 65 | url.method = 'POST' 66 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 67 | } 68 | } 69 | done = (value = {}) => { 70 | $done(value) 71 | } 72 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 73 | } 74 | chavy.done() 75 | -------------------------------------------------------------------------------- /chavyleung/zxhc/zxhc.cookie.js: -------------------------------------------------------------------------------- 1 | const cookieName = '智行火车' 2 | const signurlKey = 'senku_signurl_zxhc' 3 | const signheaderKey = 'senku_signheader_zxhc' 4 | const signbodyKey = 'senku_signbody_zxhc' 5 | const senku = init() 6 | 7 | const requrl = $request.url 8 | if ($request && $request.method != 'OPTIONS') { 9 | const signurlVal = requrl 10 | const signheaderVal = JSON.stringify($request.headers) 11 | const signbodyVal = $request.body 12 | if (signurlVal) senku.setdata(signurlVal, signurlKey) 13 | if (signheaderVal) senku.setdata(signheaderVal, signheaderKey) 14 | if (signbodyVal) senku.setdata(signbodyVal, signbodyKey) 15 | senku.msg(cookieName, `获取Cookie: 成功`, ``) 16 | } 17 | 18 | function init() { 19 | isSurge = () => { 20 | return undefined === this.$httpClient ? false : true 21 | } 22 | isQuanX = () => { 23 | return undefined === this.$task ? false : true 24 | } 25 | getdata = (key) => { 26 | if (isSurge()) return $persistentStore.read(key) 27 | if (isQuanX()) return $prefs.valueForKey(key) 28 | } 29 | setdata = (key, val) => { 30 | if (isSurge()) return $persistentStore.write(key, val) 31 | if (isQuanX()) return $prefs.setValueForKey(key, val) 32 | } 33 | msg = (title, subtitle, body) => { 34 | if (isSurge()) $notification.post(title, subtitle, body) 35 | if (isQuanX()) $notify(title, subtitle, body) 36 | } 37 | log = (message) => console.log(message) 38 | get = (url, cb) => { 39 | if (isSurge()) { 40 | $httpClient.get(url, cb) 41 | } 42 | if (isQuanX()) { 43 | url.method = 'GET' 44 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 45 | } 46 | } 47 | post = (url, cb) => { 48 | if (isSurge()) { 49 | $httpClient.post(url, cb) 50 | } 51 | if (isQuanX()) { 52 | url.method = 'POST' 53 | $task.fetch(url).then((resp) => cb(null, {}, resp.body)) 54 | } 55 | } 56 | done = (value = {}) => { 57 | $done(value) 58 | } 59 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 60 | } 61 | senku.done() 62 | -------------------------------------------------------------------------------- /chavyleung/zxhc/zxhc.js: -------------------------------------------------------------------------------- 1 | const cookieName = '智行火车' 2 | const signurlKey = 'senku_signurl_zxhc' 3 | const signheaderKey = 'senku_signheader_zxhc' 4 | const signbodyKey = 'senku_signbody_zxhc' 5 | const senku = init() 6 | const signurlVal = senku.getdata(signurlKey) 7 | const signheaderVal = senku.getdata(signheaderKey) 8 | const signBodyVal = senku.getdata(signbodyKey) 9 | 10 | sign() 11 | 12 | function sign() { 13 | const url = { url: signurlVal, headers: JSON.parse(signheaderVal), body: signBodyVal } 14 | senku.post(url, (error, response, data) => { 15 | senku.log(`${cookieName}, data: ${data}`) 16 | const res = JSON.parse(data) 17 | let subTitle = `` 18 | let detail = `` 19 | if (res.resultCode == 0) { 20 | subTitle = `签到结果: 成功` 21 | detail = `积分: ${res.credit}` 22 | if (res.coupon!=null) { 23 | detail += `优惠券:${res.coupon}` 24 | } 25 | } else if (res.resultCode == -1) {}{ 26 | subTitle = `签到结果: ${res.resultMessage}` 27 | } 28 | senku.msg(cookieName, subTitle, detail) 29 | senku.done() 30 | }) 31 | } 32 | 33 | function init() { 34 | isSurge = () => { 35 | return undefined === this.$httpClient ? false : true 36 | } 37 | isQuanX = () => { 38 | return undefined === this.$task ? false : true 39 | } 40 | getdata = (key) => { 41 | if (isSurge()) return $persistentStore.read(key) 42 | if (isQuanX()) return $prefs.valueForKey(key) 43 | } 44 | setdata = (key, val) => { 45 | if (isSurge()) return $persistentStore.write(key, val) 46 | if (isQuanX()) return $prefs.setValueForKey(key, val) 47 | } 48 | msg = (title, subtitle, body) => { 49 | if (isSurge()) $notification.post(title, subtitle, body) 50 | if (isQuanX()) $notify(title, subtitle, body) 51 | } 52 | log = (message) => console.log(message) 53 | get = (url, cb) => { 54 | if (isSurge()) { 55 | $httpClient.get(url, cb) 56 | } 57 | if (isQuanX()) { 58 | url.method = 'GET' 59 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 60 | } 61 | } 62 | post = (url, cb) => { 63 | if (isSurge()) { 64 | $httpClient.post(url, cb) 65 | } 66 | if (isQuanX()) { 67 | url.method = 'POST' 68 | $task.fetch(url).then((resp) => cb(null, resp, resp.body)) 69 | } 70 | } 71 | done = (value = {}) => { 72 | $done(value) 73 | } 74 | return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done } 75 | } 76 | -------------------------------------------------------------------------------- /loon_js.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Loon非签到类脚本订阅配置(例如京东、淘宝比价等) 【作者】w37fhy 【电报频道】https://t.me/w37fhy【更新日期】2021/9/24 3 | # GitHub主页(https://github.com/w37fhy/QuantumultX) 4 | 5 | hostname = trade-acs.m.taobao.com,api.m.jd.com, draw.jdfcloud.com, jdjoy.jd.com 6 | 7 | # 京东历史价格 8 | http-response ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) requires-body=1,script-path=https://service.2ti.st/QuanX/Script/jd_tb_price/main.js, tag=京东历史价格 9 | 10 | # 淘宝比价 11 | http-request ^http://.+/amdc/mobileDispatch script-path=https://service.2ti.st/QuanX/Script/jd_tb_price/main.js, requires-body=true, timeout=10, tag=淘宝历史价格1 12 | http-response ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail script-path=https://service.2ti.st/QuanX/Script/jd_tb_price/main.js, requires-body=true, timeout=10, tag=淘宝历史价格2 13 | 14 | -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_blueCoin.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_blueCoin 5 | 6 | on: 7 | schedule: 8 | - cron: '10 17 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【京小超领蓝币(小费)】' 25 | run: | 26 | node jd_blueCoin.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_joy.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy 5 | 6 | on: 7 | schedule: 8 | - cron: '0 4-22/6 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【宠汪汪】' 25 | run: | 26 | node jd_joy.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 30 | -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_joy_feedPets.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy_feedPets 5 | 6 | on: 7 | schedule: 8 | - cron: '*/20 */1 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【宠汪汪喂食脚本】' 25 | run: | 26 | node jd_joy_feedPets.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 30 | -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_joy_reward.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy_reward 5 | 6 | on: 7 | schedule: 8 | - cron: '0 */1 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【宠汪汪积分兑换京豆】' 25 | run: | 26 | node jd_joy_reward.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 30 | -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_joy_steal.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy_steal 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | schedule: 10 | - cron: '0,30 16,21,22 * * *' 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v1 19 | - name: Use Node.js 10.x 20 | uses: actions/setup-node@v1 21 | with: 22 | node-version: 10.x 23 | - name: npm install 24 | run: | 25 | npm install 26 | - name: '运行 【宠汪汪偷好友狗粮与积分】' 27 | run: | 28 | node jd_joy_steal.js 29 | env: 30 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 31 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 32 | -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_moneyTree.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_moneyTree 5 | 6 | on: 7 | schedule: 8 | - cron: '40 */3 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【京东摇钱树】' 25 | run: | 26 | node jd_moneyTree.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_speed.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_speed 5 | 6 | on: 7 | schedule: 8 | - cron: '33 */3 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【天天加速】' 25 | run: | 26 | node jd_speed.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_superMarket.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_superMarket 5 | 6 | on: 7 | schedule: 8 | - cron: '15 */4 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【京小超】' 25 | run: | 26 | node jd_superMarket.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} -------------------------------------------------------------------------------- /lxk0301/.github/workflows/jd_unsubscribe.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_unsubscribe 5 | 6 | on: 7 | schedule: 8 | - cron: '45 15 * * *' 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Use Node.js 10.x 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10.x 21 | - name: npm install 22 | run: | 23 | npm install 24 | - name: '运行 【京东取关商品】' 25 | run: | 26 | node jd_unsubscribe.js 27 | env: 28 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 29 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 30 | -------------------------------------------------------------------------------- /lxk0301/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /package-lock.json 3 | /.idea -------------------------------------------------------------------------------- /lxk0301/README.en.md: -------------------------------------------------------------------------------- 1 | # scripts 2 | 3 | #### Description 4 | {**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} 5 | 6 | #### Software Architecture 7 | Software architecture description 8 | 9 | #### Installation 10 | 11 | 1. xxxx 12 | 2. xxxx 13 | 3. xxxx 14 | 15 | #### Instructions 16 | 17 | 1. xxxx 18 | 2. xxxx 19 | 3. xxxx 20 | 21 | #### Contribution 22 | 23 | 1. Fork the repository 24 | 2. Create Feat_xxx branch 25 | 3. Commit your code 26 | 4. Create Pull Request 27 | 28 | 29 | #### Gitee Feature 30 | 31 | 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md 32 | 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) 33 | 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 34 | 4. The most valuable open source project [GVP](https://gitee.com/gvp) 35 | 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) 36 | 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) 37 | -------------------------------------------------------------------------------- /lxk0301/icon/jd_fruit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/lxk0301/icon/jd_fruit.png -------------------------------------------------------------------------------- /lxk0301/icon/jd_joy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/lxk0301/icon/jd_joy.png -------------------------------------------------------------------------------- /lxk0301/icon/jd_moneyTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/lxk0301/icon/jd_moneyTree.png -------------------------------------------------------------------------------- /lxk0301/icon/jd_pet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/lxk0301/icon/jd_pet.png -------------------------------------------------------------------------------- /lxk0301/icon/jd_plantBean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/lxk0301/icon/jd_plantBean.png -------------------------------------------------------------------------------- /lxk0301/icon/jd_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/lxk0301/icon/jd_speed.png -------------------------------------------------------------------------------- /lxk0301/jdCookie.js: -------------------------------------------------------------------------------- 1 | /* 2 | 此文件为Node.js专用。其他用户请忽略 3 | */ 4 | //此处填写京东账号cookie。注:github action用户ck填写到Settings-Secrets里面 5 | let CookieJDs = [ 6 | '',//账号一ck 7 | '',//账号二ck,如有更多,依次类推 8 | ] 9 | // 判断github action里面是否有京东ck 10 | if (process.env.JD_COOKIE && process.env.JD_COOKIE.split('&') && process.env.JD_COOKIE.split('&').length > 0) { 11 | CookieJDs = process.env.JD_COOKIE.split('&'); 12 | } 13 | for (let i = 0; i < CookieJDs.length; i++) { 14 | const index = (i + 1 === 1) ? '' : (i + 1); 15 | exports['CookieJD' + index] = CookieJDs[i]; 16 | } -------------------------------------------------------------------------------- /lxk0301/jdFruitshareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 此文件为Node.js专用。其他用户请忽略 3 | 支持京东N个账号 4 | */ 5 | //此处填写京东东农场的好友码。注:github action用户ck填写到Settings-Secrets里面 6 | let FruitShareCodes = [ 7 | '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3',//账号一的好友shareCode,不同好友中间用@符号隔开 8 | '6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6',//账号二的好友shareCode,不同好友中间用@符号隔开 9 | ] 10 | // 判断github action里面是否有京东ck 11 | if (process.env.FruitShareCodes && process.env.FruitShareCodes.split('&') && process.env.FruitShareCodes.split('&').length > 0) { 12 | FruitShareCodes = process.env.FruitShareCodes.split('&'); 13 | } 14 | for (let i = 0; i < FruitShareCodes.length; i++) { 15 | const index = (i + 1 === 1) ? '' : (i + 1); 16 | exports['FruitShareCode' + index] = FruitShareCodes[i]; 17 | } -------------------------------------------------------------------------------- /lxk0301/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lxk0301", 3 | "version": "1.0.0", 4 | "description": "{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}", 5 | "main": "AlipayManor.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://gitee.com/lxk0301/scripts.git" 12 | }, 13 | "keywords": [ 14 | "东东农场" 15 | ], 16 | "author": "lxk0301", 17 | "license": "ISC", 18 | "dependencies": { 19 | "crypto-js": "^4.0.0", 20 | "got": "^11.5.1", 21 | "http-server": "^0.12.3", 22 | "node-schedule": "^1.3.2", 23 | "tough-cookie": "^4.0.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /openai.list: -------------------------------------------------------------------------------- 1 | # NAME: OpenAI 2 | 3 | HOST,cdn.auth0.com,OpenAI 4 | HOST,challenges.cloudflare.com,OpenAI 5 | HOST,openaiapi-site.azureedge.net,OpenAI 6 | HOST-SUFFIX,ai.com,OpenAI 7 | HOST-SUFFIX,identrust.com,OpenAI 8 | HOST-SUFFIX,openai.com,OpenAI 9 | HOST-SUFFIX,openaiapi-site.azureedge.net,OpenAI 10 | -------------------------------------------------------------------------------- /surge_js.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=脚本 2 | #!desc=历史比价、去广告等重写脚本 @w37fhy 3 | 4 | [MITM] 5 | hostname = trade-acs.m.taobao.com, api.m.jd.com, *.bilibili.com, music.163.com, act.10010.com, m.client.10010.com, wapside.189.cn:9001, ifac*.iqiyi.com, nebula.kuaishou.com, mp.weixin.qq.com, ms.jr.jd.com 6 | 7 | [Script] 8 | 9 | # 淘宝比价 10 | 淘宝比价1 = type=http-response,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,requires-body=1,max-size=0,script-path=https://service.2ti.st/QuanX/Script/jd_tb_price/main.js,script-update-interval=0 11 | 淘宝比价2 = type=http-request,pattern=^http://.+/amdc/mobileDispatch,requires-body=1,max-size=0,script-path=https://service.2ti.st/QuanX/Script/jd_tb_price/main.js,script-update-interval=0 12 | # 京东比价 13 | 京东比价 = type=http-response,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),requires-body=1,max-size=0,script-path=https://service.2ti.st/QuanX/Script/jd_tb_price/main.js,script-update-interval=86400 14 | 15 | #野比微信公众号去广告 16 | #微信公众号去广告 = requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Wechat.js,type=http-response,pattern=^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad 17 | # Choler微信公众号去广告 18 | http-request ^https://mp\.weixin\.qq\.com/mp/getappmsgad script-path=https://raw.githubusercontent.com/Choler/Surge/master/Script/WeChat.js, tag=WeChat 19 | -------------------------------------------------------------------------------- /surge_task.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=定时任务 2 | #!desc=签到、提醒等定时任务 @w37fhy 3 | 4 | [MITM] 5 | hostname = trade-acs.m.taobao.com, api.m.jd.com, *.bilibili.com, music.163.com, act.10010.com, m.client.10010.com, wapside.189.cn:9001, ifac*.iqiyi.com, nebula.kuaishou.com, mp.weixin.qq.com, ms.jr.jd.com 6 | 7 | [Script] 8 | 京东多合一签到 = type=cron,cronexp=5 0 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js 9 | Bilibili签到 = type=cron,cronexp=10 0 0 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/bilibili/bilibili.js,script-update-interval=0 10 | # bilibili银瓜子转硬币 11 | Bilibili银瓜子转硬币 = type=cron,cronexp=10 0 0 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/bilibili/bilibili.silver2coin.js,script-update-interval=0 12 | 网易云签到 = type=cron,cronexp=10 0 0 * * *,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/neteasemusic/neteasemusic.js,script-update-interval=0 13 | 中国联通签到 = script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.js,type=cron,cronexp=10 0 0 * * * 14 | 爱奇艺签到 = type=cron,cronexp=11 0 * * *,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 15 | 快手极速版签到 = type=cron,cronexp=35 5 0 * * *,script-path=https://raw.githubusercontent.com/Sunert/Scripts/master/Task/kuaishou.js,script-update-interval=0 16 | 机场签到 = type=cron,cronexp=5 0 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/evilbutcher/Quantumult_X/master/check_in/glados/checkin_env.js 17 | 机场签到Cookie版 = type=cron,cronexp=5 0 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/evilbutcher/Quantumult_X/master/check_in/glados/checkincookie_env.js 18 | # 切换会话 19 | 切换会话 = type=cron,cronexp=11 0 * * *,wake-system=1,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/box/switcher/box.switcher.js 20 | -------------------------------------------------------------------------------- /yichahucha/eval_script/qx_script.txt: -------------------------------------------------------------------------------- 1 | hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com 2 | 3 | ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header eval_script.js 4 | 5 | ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body eval_script.js 6 | 7 | ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig) url script-response-body eval_script.js 8 | 9 | ^http://.+/amdc/mobileDispatch url script-request-body eval_script.js 10 | 11 | ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body eval_script.js 12 | 13 | ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body eval_script.js 14 | 15 | ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list) url script-response-body eval_script.js -------------------------------------------------------------------------------- /yichahucha/eval_script/sg_script.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=eval_script.js module 2 | 3 | [MITM] 4 | hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com 5 | 6 | [Script] 7 | eval_script.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js 8 | 9 | eval_script.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=eval_script.js 10 | 11 | eval_script.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig),script-path=eval_script.js 12 | 13 | eval_script.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=eval_script.js 14 | 15 | eval_script.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=eval_script.js 16 | 17 | eval_script.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=eval_script.js 18 | 19 | eval_script.js = type=http-response,requires-body=1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list),script-path=eval_script.js -------------------------------------------------------------------------------- /yichahucha/qx_sub.txt: -------------------------------------------------------------------------------- 1 | hostname = api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com 2 | 3 | ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js 4 | 5 | ^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js 6 | 7 | ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js 8 | 9 | ^http://.+/amdc/mobileDispatch url script-request-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js 10 | 11 | ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js 12 | 13 | ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js 14 | 15 | ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js 16 | -------------------------------------------------------------------------------- /yichahucha/sg_sub.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=eval_script.js module 2 | 3 | [MITM] 4 | hostname = %INSERT% api.weibo.cn,mapi.weibo.com,*.uve.weibo.com,trade-acs.m.taobao.com,api.m.jd.com,ios.prod.ftl.netflix.com 5 | 6 | [Script] 7 | nf_rating.js = type=http-request,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js 8 | 9 | nf_rating.js = type=http-response,requires-body=1,pattern=^https?://ios\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js 10 | 11 | jd_price.js = type=http-response,requires-body=1,pattern=^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/jd_price.js 12 | 13 | tb_price.js = type=http-request,requires-body=1,pattern=^http://.+/amdc/mobileDispatch,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js 14 | 15 | tb_price.js = type=http-response,requires-body=1,pattern=^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/tb_price.js 16 | 17 | wb_launch.js = type=http-response,requires-body=1,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js 18 | 19 | wb_ad.js = type=http-response,requires-body=1,max-size=-1,pattern=^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/photos/pic_recommend_status|video/tiny_stream_video_list|photo/info),script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js 20 | -------------------------------------------------------------------------------- /yichahucha/tb_pre.js: -------------------------------------------------------------------------------- 1 | let headers = $request.headers 2 | let body = $request.body 3 | if (headers["User-Agent"].indexOf("%E6%89%8B%E6%9C%BA%E6%B7%98%E5%AE%9D") != -1) { 4 | let json = Qs2Json(body) 5 | let domain = json.domain.split(" ") 6 | let i = domain.length; 7 | while (i--) { 8 | const block = "trade-acs.m.taobao.com" 9 | const element = domain[i]; 10 | if (element == block) { 11 | domain.splice(i, 1); 12 | } 13 | } 14 | json.domain = domain.join(" ") 15 | body = Json2Qs(json) 16 | } 17 | $done({ 18 | body 19 | }) 20 | 21 | function Qs2Json(url) { 22 | var search = url.substring(url.lastIndexOf("?") + 1); 23 | var obj = {}; 24 | var reg = /([^?&=]+)=([^?&=]*)/g; 25 | search.replace(reg, function(rs, $1, $2) { 26 | var name = decodeURIComponent($1); 27 | var val = decodeURIComponent($2); 28 | val = String(val); 29 | obj[name] = val; 30 | return rs; 31 | }); 32 | return obj; 33 | } 34 | 35 | function Json2Qs(json) { 36 | var temp = []; 37 | for (var k in json) { 38 | temp.push(k + "=" + json[k]); 39 | } 40 | return temp.join("&"); 41 | } -------------------------------------------------------------------------------- /yichahucha/wb_launch.js: -------------------------------------------------------------------------------- 1 | /* 2 | README:https://github.com/yichahucha/surge/tree/master 3 | */ 4 | 5 | const path1 = "/interface/sdk/sdkad.php"; 6 | const path2 = "/wbapplua/wbpullad.lua"; 7 | 8 | const url = $request.url; 9 | var body = $response.body; 10 | 11 | if (url.indexOf(path1) != -1) { 12 | let re = /\{.*\}/; 13 | body = body.match(re); 14 | var obj = JSON.parse(body); 15 | if (obj.background_delay_display_time) obj.background_delay_display_time = 60*60*24*365; 16 | if (obj.show_push_splash_ad) obj.show_push_splash_ad = false; 17 | if (obj.ads) obj.ads = []; 18 | body = JSON.stringify(obj) + 'OK'; 19 | } 20 | 21 | if (url.indexOf(path2) != -1) { 22 | var obj = JSON.parse(body); 23 | if (obj.cached_ad && obj.cached_ad.ads) obj.cached_ad.ads = []; 24 | body = JSON.stringify(obj); 25 | } 26 | 27 | $done({body}); 28 | -------------------------------------------------------------------------------- /zs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w37fhy/QuantumultX/6e8c4f421839572f3f2430316258700e22ff3656/zs.png --------------------------------------------------------------------------------