Init project

This commit is contained in:
blackmatrix7
2021-04-09 19:34:05 +08:00
parent af86d24757
commit f2b8201076
7329 changed files with 2323074 additions and 0 deletions

BIN
script/10010/10010.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

102
script/10010/README.md Normal file
View File

@@ -0,0 +1,102 @@
# 联通每日签到与抽奖
每日自动签到显示已用流量、语音、剩余话费、可用积分每日抽奖4次。
活动期间,**每日必得一张30-3的美团外卖优惠券**,送到和当前签到同手机号的美团账号上,活动到什么时候结束我也不知道。
目前还是有的,实打实的优惠,别错过。
## 配置说明
### Surge
使用模块,地址
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.sgmodule
```
### Quantumult X
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.qxrewrite, tag=联通_获取cookie, update-interval=86400, opt-parser=false, enabled=true
[task_local]
20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.js, tag=联通_签到与抽奖, enabled=true
```
### Loon
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.lnscript, tag=联通_签到与抽奖, enabled=true
```
## 获取Cookie
联通手机营业厅APP经常修改“天天抽奖”入口位置比较稳定的方法是在联通手机营业厅中搜索“天天抽奖”直接通过搜索结果进入。
## 签到效果图
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/images/01.jpg)
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/images/02.jpg)
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

BIN
script/10010/images/01.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
script/10010/images/02.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
# 中国联通每日签到与抽奖
http-request ^https?:\/\/m\.client\.10010\.com\/dailylottery\/static\/(integral|doubleball)\/firstpage requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.min.js,tag=联通_获取cookie
cron "20 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.min.js,tag=联通_签到与抽奖
hostname = m.client.10010.com

1
script/10010/unicom_signin.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# 中国联通App每日签到与抽奖
# [task_local]
# 20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.min.js, tag=联通_签到与抽奖, enabled=true
^https?:\/\/m\.client\.10010\.com\/dailylottery\/static\/(integral|doubleball)\/firstpage url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.min.js
hostname = m.client.10010.com

View File

@@ -0,0 +1,10 @@
#!name=中国联通
#!desc=中国联通每日自动签到与抽奖
#!system=ios
[Script]
联通_签到与抽奖 = type=cron,cronexp=20 0 * * *,timeout=120,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.min.js,
联通_获取cookie = type=http-request,pattern=^https?:\/\/m\.client\.10010\.com\/dailylottery\/static\/(integral|doubleball)\/firstpage,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.min.js,
[MITM]
hostname = %APPEND% m.client.10010.com

9
script/README.md Normal file
View File

@@ -0,0 +1,9 @@
# 脚本
**常见问题**
使用过程中的常见问题,请访问:[https://github.com/blackmatrix7/ios_rule_script/wiki/脚本常见问题](https://github.com/blackmatrix7/ios_rule_script/wiki/脚本常见问题)
**安全性**
关于安全性问题,请访问:[https://github.com/blackmatrix7/ios_rule_script/wiki/脚本的安全性](https://github.com/blackmatrix7/ios_rule_script/wiki/脚本的安全性)

72
script/bilibili/README.md Normal file
View File

@@ -0,0 +1,72 @@
# 哔哩哔哩
## 去广告
### 介绍
哔哩哔哩APP去广告没有广告的哔哩哔哩更值得干杯。
目前已实现:
1. 去除启动广告
2. 去除“推荐”页面广告
3. 去除“追番”页面广告
4. 去除“直播”页面广告
5. 精简“我的”页面功能
6. 去除“动态”中的话题
7. 去除“动态”中的最常访问
8. 精简顶部标签页
9. 去除底部会员购
10. 增加一键Story模式
支持哔哩哔哩与哔哩哔哩概念版
### 特别说明
#### 去APP启动广告
目前几乎所有的整合型去广告规则都带有去除哔哩哔哩启动广告的规则。通过对类似`^https?:\/\/app\.bilibili\.com\/x\/v2\/splash\/list`
正则复写的拦截来屏蔽启动广告。这在大部分情况下都是有效的但是如果忘记打开VPN或其他原因导致拦截失败启动广告缓存到APP中后下次启动启动广告就会出现。此时再通过正则去拦截已无能为力只能重装APP或等待广告过期。
在本项目的去广告策略中采取的是对启动广告请求进行放行同时通过脚本将广告生效时间设置到2030年以去除启动广告。这样做的好处是即使某次拦截失败下次APP重新请求一次广告后启动广告就会消失不需要重装APP。
但这种策略会与几乎所有的整合型去广告规则产生冲突,因为在复写阶段请求就被拦截掉,后续的脚本没法进行处理。
所以如果在使用过程中出现APP启动广告反复出现请尝试将分流和复写规则中所有关于哔哩哔哩的规则进行去除仅保留本脚本的相关复写。
### 部署说明
#### Surge
使用模块
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.sgmodule
```
#### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.qxrewrite, tag=哔哩哔哩_去广告, update-interval=86400, opt-parser=false, enabled=true
```
### Loon
使用插件
```ini
[Plugin]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.lnplugin, tag=哔哩哔哩_去广告, enabled=true
```
## 签到
等待抽空填坑
## 感谢
[@MisterGlasses](https://github.com/MisterGlasses) [@Mazeorz](https://github.com/Mazeorz)

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,34 @@
# BiliBili去广告
[Rule]
DOMAIN-SUFFIX,cm.bilibili.com,REJECT
URL-REGEX,^https?:\/\/api\.bilibili\.com\/x\/v2\/dm\/ad,REJECT
# 可能的一些推广(beta)
URL-REGEX,^https?:\/\/api\.bilibili\.com\/pgc\/season\/app\/related\/recommend\?,REJECT
# BiliBili漫画去广告
URL-REGEX,^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.comic\/flash,REJECT
[URL Rewrite]
# 去除搜索中的大家都在搜
^https?:\/\/api\.vc\.bilibili\.com\/search_svr\/v\d\/Search\/recommend_words - reject-dict
# 去除动态中的话题
^https?:\/\/api\.vc\.bilibili\.com\/topic_svr\/v1\/topic_svr - reject-dict
# 去除动态中的最常访问
^https?:\/\/api\.vc\.bilibili\.com\/dynamic_svr\/v1\/dynamic_svr\/mix_uplist - reject-dict
# 可能的一些推广(beta)
^https?:\/\/api\.bilibili\.com\/pgc\/season\/app\/related\/recommend\? - reject-dict
# BiliBili漫画去广告
^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.Comic\/Flash - reject-dict
^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.Comic\/ListFlash - reject-dict
[Script]
http-response ^https?:\/\/app\.bilibili\.com\/x\/v2\/feed\/index requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_推荐去广告
http-response ^https?:\/\/api\.bilibili\.com\/pgc\/page\/bangumi requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_追番去广告
http-response ^https?:\/\/api\.live\.bilibili\.com\/xlive\/app-room\/v1\/index\/getInfoByRoom requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_直播去广告
http-response ^https?:\/\/api\.vc\.bilibili\.com\/dynamic_svr\/v1\/dynamic_svr\/dynamic_(history|new)\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_动态去广告
http-response ^https?:\/\/app\.bilibili\.com\/x\/v2\/splash\/list requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_开屏去广告
http-response ^https?:\/\/app\.bilibili\.com\/x\/resource\/show\/tab requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_标签页处理
http-response ^https?:\/\/app\.bilibili\.com\/x\/v2\/account\/mine requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_我的页面处理
[MITM]
hostname = app.bilibili.com,api.bilibili.com,api.live.bilibili.com,api.vc.bilibili.com

View File

@@ -0,0 +1,25 @@
# 去除动态中的话题
^https?:\/\/api\.vc\.bilibili\.com\/topic_svr\/v1\/topic_svr url reject-dict
# 去除动态中的最常访问
^https?:\/\/api\.vc\.bilibili\.com\/dynamic_svr\/v1\/dynamic_svr\/mix_uplist url reject-dict
# 可能的一些推广(beta)
^https?:\/\/api\.bilibili\.com\/pgc\/season\/app\/related\/recommend\? url reject-dict
# 推荐去广告
^https?:\/\/app\.bilibili\.com\/x\/v2\/feed\/index url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 追番去广告
^https?:\/\/api\.bilibili\.com\/pgc\/page\/bangumi url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 直播去广告
^https?:\/\/api\.live\.bilibili\.com\/xlive\/app-room\/v1\/index\/getInfoByRoom url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 动态去广告
^https?:\/\/api\.vc\.bilibili\.com\/dynamic_svr\/v1\/dynamic_svr\/dynamic_(history|new)\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 开屏去广告
^https?:\/\/app\.bilibili\.com\/x\/v2\/splash\/list url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 标签页处理
^https?:\/\/app\.bilibili\.com\/x\/resource\/show\/tab url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 我的页面处理
^https?:\/\/app\.bilibili\.com\/x\/v2\/account\/mine url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 漫画去广告
^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.Comic\/Flash url reject-dict
^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.Comic\/ListFlash url reject-dict
hostname = *.bilibili.com,api.live.bilibili.com,api.vc.bilibili.com

View File

@@ -0,0 +1,36 @@
#!name=Bilibili
#!desc=BiliBili去广告
#!system=ios
[Rule]
DOMAIN-SUFFIX,cm.bilibili.com,REJECT
URL-REGEX,^https?:\/\/api\.bilibili\.com\/x\/v2\/dm\/ad,REJECT
# 可能的一些推广(beta)
URL-REGEX,^https?:\/\/api\.bilibili\.com\/pgc\/season\/app\/related\/recommend\?,REJECT
# BiliBili漫画去广告
URL-REGEX,^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.comic\/flash,REJECT
[URL Rewrite]
# 去除搜索中的大家都在搜
^https?:\/\/api\.vc\.bilibili\.com\/search_svr\/v\d\/Search\/recommend_words - reject
# 去除动态中的话题
^https?:\/\/api\.vc\.bilibili\.com\/topic_svr\/v1\/topic_svr - reject
# 去除动态中的最常访问
^https?:\/\/api\.vc\.bilibili\.com\/dynamic_svr\/v1\/dynamic_svr\/mix_uplist - reject
# 可能的一些推广(beta)
^https?:\/\/api\.bilibili\.com\/pgc\/season\/app\/related\/recommend\? - reject
# BiliBili漫画去广告
^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.Comic\/Flash - reject
^https?:\/\/manga\.bilibili\.com\/twirp\/comic\.v\d\.Comic\/ListFlash - reject
[Script]
BiliBili_推荐去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/app\.bilibili\.com\/x\/v2\/feed\/index,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
BiliBili_追番去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.bilibili\.com\/pgc\/page\/bangumi,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
BiliBili_直播去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.live\.bilibili\.com\/xlive\/app-room\/v1\/index\/getInfoByRoom,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
BiliBili_动态去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.vc\.bilibili\.com\/dynamic_svr\/v1\/dynamic_svr\/dynamic_(history|new)\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
BiliBili_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/app\.bilibili\.com\/x\/v2\/splash\/list,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
BiliBili_标签页处理 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/app\.bilibili\.com\/x\/resource\/show\/tab,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
BiliBili_我的页面处理 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/app\.bilibili\.com\/x\/v2\/account\/mine,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
[MITM]
hostname = %APPEND% app.bilibili.com,api.bilibili.com,api.live.bilibili.com,api.vc.bilibili.com

View File

@@ -0,0 +1,103 @@
# 嘀嗒出行
嘀嗒出行自动签到和自动拾取贝壳脚本。每日0点10分执行脚本自动进行当日签到并显示签到获取的贝壳数量。同时拾取所有贝壳广场中的所有贝壳。
2020.09.03:
贝壳已自动拾取,去除通过脚本拾取贝壳的内容。
2020.08.07
目前贝壳似乎是自动拾取的,不需要再通过脚本定时获取,所以每天都会提示“没有发现待拾取的贝壳”,目前不影响使用,暂时不做调整,观察一段时间再说。
## 配置说明
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.sgmodule
### Loon
使用远程脚本
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.lnscript, tag=嘀嗒出行_每日签到, enabled=true
```
### Quantumult X
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.qxrewrite, tag=嘀嗒出行_获取cookie, enabled=true
[task_local]
10 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js, tag=嘀嗒出行_每日签到, enabled=true
```
## 使用说明
打开嘀嗒出行App后进入左侧菜单中的“贝壳广场”正常情况下会自动获取Cookie。如果没有获取成功请查阅Surge等第三方App的执行日志。
执行效果图,脚本更新时可能会进行微调。
![](https://github.com/blackmatrix7/ios_rule_script/raw/master/script/didachuxing/images/didachuxing_checkin01.jpg)
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# 嘀嗒出行每日自动签到
http-request ^https?:\/\/www\.didapinche\.com\/hapis\/api\/t\/Jifen\/.*\?userCid=.* requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js,tag=嘀嗒出行_获取cookie
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js,timeout=10,tag=嘀嗒出行_每日签到
hostname = www.didapinche.com

View File

@@ -0,0 +1,5 @@
# 嘀嗒出行每日自动签到
^https?:\/\/www\.didapinche\.com\/hapis\/api\/t\/Jifen\/.*\?userCid=.* url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js
hostname = www.didapinche.com

View File

@@ -0,0 +1,10 @@
#!name=嘀嗒出行
#!desc=嘀嗒出行每日自动签到
#!system=ios
[Script]
嘀嗒出行_每日签到 = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js,type=cron,cronexp=10 0 * * *
嘀嗒出行_获取cookie = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js,type=http-request,pattern=^https?:\/\/www\.didapinche\.com\/hapis\/api\/t\/Jifen\/.*\?userCid=.*
[MITM]
hostname = %APPEND% www.didapinche.com

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,116 @@
# 滴滴出行
滴滴出行每日签到与抽奖,目前已实现功能:
1. 福利金签到
2. 积分签到
3. 滴滴金融天天有奖签到
4. 会员抽奖
5. 瓜分福利金活动天降羊毛自动拾取
6. 瓜分福利金活动自动薅羊毛
## 配置说明
为适配瓜分百万福利金的活动将默认的模块和插件脚本执行时间调整到早上9点。
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js
### Loon
使用远程脚本配置
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.lnscript, tag=滴滴出行_每日签到, enabled=true
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.qxrewrite, tag=滴滴出行_获取Cookie, enabled=true
[task_local]
00 9 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js, tag=滴滴出行_每日签到, enabled=true
```
## 获取Cookie
重新进入一次滴滴出行APP即可获取Cookie。
## 获取lid
抽奖需要获取lid获取路径为滴滴左上角-钱包-我的钱包-福利金。
## 获取ActivityId
天天有奖首次使用需要手动签到一次获取ActivityId和ChannelId不获取会尝试使用内置的ActivityId和ChannelId。
获取路径:滴滴出行 - 左侧菜单 - 钱包。
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。
### 感谢
[@zZPiglet]( https://github.com/zZPiglet/Task/tree/master/DiDi)

BIN
script/didichuxing/didi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
# 滴滴出行每日自动签到
http-request ^https?:\/\/api\.didialift\.com\/beatles\/userapi\/user\/user\/getuserinfo?.*city_id=(\d+).*token=([^&]*) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,tag=滴滴出行_获取token
http-request ^https?:\/\/as\.xiaojukeji\.com\/ep\/as\/toggles\?.*location_cityid=(\d+).*&ticket=([^&]*) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,tag=滴滴出行_获取ticket
http-request ^https?:\/\/bosp-api\.xiaojukeji\.com\/bosp-api\/lottery\/info?.*lid=([^&]*) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,tag=滴滴出行_获取LotteryId
http-response ^https?:\/\/bosp-api\.xiaojukeji\.com\/wechat\/benefit\/public\/v2\/index requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,tag=滴滴出行_获取GroupId
http-response ^https?:\/\/pay\.diditaxi\.com\.cn\/web_wallet\/v2\/wallet\/home requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,tag=滴滴金融_获取ActivityId与ChannelId
cron "00 9 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,timeout=120,tag=滴滴出行_每日签到
hostname = api.didialift.com,bosp-api.xiaojukeji.com,as.xiaojukeji.com,pay.diditaxi.com.cn

View File

@@ -0,0 +1,14 @@
# 滴滴出行每日自动签到
# 获取Token
^https?:\/\/api\.didialift\.com\/beatles\/userapi\/user\/user\/getuserinfo?.*city_id=(\d+).*&token=([^&]*) url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js
# 获取Ticket(备用无法获取Token时尝试)
^https?:\/\/as\.xiaojukeji\.com\/ep\/as\/toggles\?.*location_cityid=(\d+).*&ticket=([^&]*) url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js
# 获取LotteryId
^https?:\/\/bosp-api\.xiaojukeji\.com\/bosp-api\/lottery\/info?.*lid=([^&]*) url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js
# 获取ActivityId与ChannelId
^https?:\/\/pay\.diditaxi\.com\.cn\/web_wallet\/v2\/wallet\/home url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js
# 获取GroupId
^https?:\/\/bosp-api\.xiaojukeji\.com\/wechat\/benefit\/public\/v2\/index url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js
hostname = api.didialift.com,bosp-api.xiaojukeji.com,as.xiaojukeji.com,*.diditaxi.com.cn

View File

@@ -0,0 +1,15 @@
#!name=滴滴出行
#!desc=滴滴出行每日自动签到与抽奖
#!system=ios
[Script]
滴滴出行_每日签到 = type=cron,timeout=120,cronexp=00 9 * * *,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js
滴滴出行_获取Token = type=http-request,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,pattern=^https?:\/\/api\.didialift\.com\/beatles\/userapi\/user\/user\/getuserinfo?.*city_id=(\d+).*token=([^&]*)
滴滴出行_获取Ticket = type=http-request,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,pattern=^https?:\/\/as\.xiaojukeji\.com\/ep\/as\/toggles\?.*location_cityid=(\d+).*&ticket=([^&]*)
滴滴出行_获取LotteryId = type=http-request,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,pattern=^https?:\/\/bosp-api\.xiaojukeji\.com\/bosp-api\/lottery\/info?.*lid=([^&]*)
滴滴金融_获取ActivityId与ChannelId = type=http-response,requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,pattern=^https?:\/\/pay\.diditaxi\.com\.cn\/web_wallet\/v2\/wallet\/home
滴滴出行_获取GroupId = type=http-response,requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js,pattern=^https?:\/\/bosp-api\.xiaojukeji\.com\/wechat\/benefit\/public\/v2\/index
[MITM]
hostname = %APPEND% api.didialift.com,bosp-api.xiaojukeji.com,as.xiaojukeji.com,pay.diditaxi.com.cn

93
script/dingdong/README.md Normal file
View File

@@ -0,0 +1,93 @@
# 叮咚买菜
叮咚买菜每日自动签到
## 配置说明
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.sgmodule
### Loon
使用远程脚本配置
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.lnscript, tag=叮咚买菜_每日签到, enabled=true
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.qxrewrite, tag=叮咚买菜_获取Cookie, enabled=true
[task_local]
20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js, tag=叮咚买菜_每日签到, enabled=true
```
## 获取Cookie
叮咚买菜APP - 我的 - 右上角签到
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# 叮咚买菜每日自动签到
http-request ^https?:\/\/maicai\.api\.ddxq\.mobi\/point\/home\?api_version requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js,tag=叮咚买菜_获取cookie
cron "20 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js,timeout=30,tag=叮咚买菜_每日签到
hostname = maicai.api.ddxq.mobi

View File

@@ -0,0 +1,5 @@
# 叮咚买菜每日自动签到
^https?:\/\/maicai\.api\.ddxq\.mobi\/point\/home\?api_version url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js
hostname = maicai.api.ddxq.mobi

View File

@@ -0,0 +1,10 @@
#!name=叮咚买菜
#!desc=叮咚买菜每日自动签到
#!system=ios
[Script]
叮咚买菜_每日签到 = type=cron,cronexp=20 0 * * *,timeout=30,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js
叮咚买菜_获取cookie = type=http-request,pattern=^https?:\/\/maicai\.api\.ddxq\.mobi\/point\/home\?api_version,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js
[MITM]
hostname = %APPEND% maicai.api.ddxq.mobi

119
script/eleme/README.md Normal file
View File

@@ -0,0 +1,119 @@
# 饿了么
饿了么每日自动领取会员任务,及自动领取吃货豆功能。
领取会员任务,限饿了么会员使用,解决忘记领取会员任务再下单的问题。
自动领取吃货豆,非会员可能能用,我没有非会员账号,无法验证,有兴趣可以自己试试。
## 最近更新
1. 拆分领取吃货豆和领取会员任务的脚本
2. 支持最新多选一任务
3. 适配饿了么最新的吃货豆活动
4. 增加自动领取吃货豆功能
## 特别说明
目前已将领取吃货豆和领取会员任务的脚本拆分,请按需部署脚本。
如果使用现成的Surge模块或Loon插件则会在0点10分领取吃货豆在早上10点领取任务列表中第一个可以领取的任务。
### 领取吃货豆
脚本自动领取APP中未领取的吃货豆。
### 多选一任务
对于最新更新的多选一任务,脚本会依次尝试领取所有任务。但因为多选一的关系,通常只会有第一个任务能成功领取。
## 配置说明
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.sgmodule
### Loon
使用远程脚本配置
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.lnscript, tag=饿了么_领取吃货豆及任务, enabled=true
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.qxrewrite, tag=饿了么_获取Cookie, enabled=true
[task_local]
10 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js, tag=饿了么_领取吃货豆, enabled=true
00 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js, tag=饿了么_领取会员任务, enabled=true
```
## 获取Cookie
饿了么APP - 我的 - 超级吃货卡
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

BIN
script/eleme/elem.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

187
script/eleme/eleme_daily.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# 饿了么每日自动领取任务及吃货豆
http-request ^https?:\/\/h5\.ele\.me\/restapi\/svip_biz\/v1\/supervip\/queryMissionCollect\??longitude=([^&]*).*latitude=([^&]*) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,tag=饿了么_获取cookie
cron "10 00 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,timeout=60,tag=饿了么_领取吃货豆
cron "00 10 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js,timeout=60,tag=饿了么_领取会员任务
hostname = h5.ele.me

View File

@@ -0,0 +1,5 @@
# 饿了么每日自动领取任务及吃货豆
^https?:\/\/h5\.ele\.me\/restapi\/svip_biz\/v1\/supervip\/queryMissionCollect\??longitude=([^&]*).*latitude=([^&]*) url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
hostname = h5.ele.me

View File

@@ -0,0 +1,11 @@
#!name=饿了么
#!desc=饿了么每日自动领取任务及吃货豆
#!system=ios
[Script]
饿了么_领取吃货豆 = type=cron,cronexp=10 00 * * *,timeout=60,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
饿了么_领取任务 = type=cron,cronexp=00 10 * * *,timeout=60,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js
饿了么_获取cookie = type=http-request,pattern=^https?:\/\/h5\.ele\.me\/restapi\/svip_biz\/v1\/supervip\/queryMissionCollect\??longitude=([^&]*).*latitude=([^&]*),script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
[MITM]
hostname = %APPEND% h5.ele.me

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

93
script/famijia/README.md Normal file
View File

@@ -0,0 +1,93 @@
# Fa米家
Fa米家每日自动签到
## 配置说明
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.sgmodule
### Loon
使用远程脚本配置
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.lnscript, tag=Fa米家_每日签到, enabled=true
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.qxrewrite, tag=Fa米家_获取Cookie, enabled=true
[task_local]
15 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js, tag=Fa米家_每日签到, enabled=true
```
## 获取Cookie
Fa米家APP - 我的 - (滚动到底部)常用服务 - 签到
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

BIN
script/famijia/famijia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# Fa米家每日自动签到
http-request ^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/member\/(signin\/usersign|sign\/current) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js,tag=Fa米家_获取cookie
cron "15 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js,timeout=30,tag=Fa米家_每日签到
hostname = fmapp.chinafamilymart.com.cn

View File

@@ -0,0 +1,5 @@
# Fa米家每日自动签到
^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/member\/(signin\/usersign|sign\/current) url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js
hostname = fmapp.chinafamilymart.com.cn

View File

@@ -0,0 +1,10 @@
#!name=Fa米家
#!desc=Fa米家每日自动签到
#!system=ios
[Script]
Fa米家_每日签到 = type=cron,cronexp=15 0 * * *,timeout=30,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js
Fa米家_获取cookie = type=http-request,pattern=^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/member\/(signin\/usersign|sign\/current),script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js
[MITM]
hostname = %APPEND% fmapp.chinafamilymart.com.cn

61
script/gallery.json Normal file
View File

@@ -0,0 +1,61 @@
{"name":"blackmatrix7",
"task":[
{
"config":"15 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_checkin.js, tag=中国联通, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/10010.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_checkin.qxrewrite,tag=联通_获取Cookie"
},
{
"config":"10 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js, tag=嘀嗒出行, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.qxrewrite,tag=嘀嗒出行_获取Cookie"
},
{
"config":"00 9 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js, tag=滴滴出行, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.qxrewrite,tag=滴滴出行_获取Cookie"
},
{
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js, tag=叮咚买菜, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.qxrewrite,tag=叮咚买菜_获取Cookiee"
},
{
"config":"10 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js, tag=领取吃货豆, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/elem.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.qxrewrite,tag=饿了么_获取Cookie"
},
{
"config":"00 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js, tag=领取会员任务, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/elem.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.qxrewrite,tag=饿了么_获取Cookie"
},
{
"config":"15 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js, tag=Fa米家, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.qxrewrite,tag=Fa米家_获取Cookie"
},
{
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js, tag=Luka, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.qxrewrite,tag=Luka_获取Cookie"
},
{
"config":"30 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js, tag=百度贴吧, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.qxrewrite,tag=贴吧_获取Cookie"
},
{
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js, tag=慢慢买, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanmai.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.qxrewrite,tag=慢慢买_获取Cookie"
},
{
"config":"5 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js, tag=每日签到, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.qxrewrite,tag=什么值得买_获取Cookie"
},
{
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_mission.js, tag=每日任务, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.qxrewrite,tag=什么值得买_获取Cookie"
},
{
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/wanda/wanda_checkin.js, tag=万达电影, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/wanda/wanda.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/wanda/wanda_checkin.qxrewrite,tag=万达_获取Cookie"
},
{
"config":"30 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js, tag=美团买菜, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.qxrewrite,tag=美团买菜_获取Cookie"
}
],
"description":"Script Gallery"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
#!name=家长帮
#!desc=家长帮每日自动签到
#!system=ios
[Script]
家长帮_每日签到 = type=cron,cronexp=20 0 * * *,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/jiazhangbang/jiazhangbang_checkin.js
家长帮_获取cookie = type=http-request,requires-body=false,pattern=^https?:\/\/pgc-cms\.jzb\.com\/api\/channel\/recommend,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/jiazhangbang/jiazhangbang_checkin.js
[MITM]
hostname = %APPEND% mp.jzb.com, pgc-cms.jzb.com

93
script/luka/README.md Normal file
View File

@@ -0,0 +1,93 @@
# Luka
Luka每日自动签到
## 配置说明
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.sgmodule
### Loon
使用远程脚本配置
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.lnscript, tag=Luka_每日签到, enabled=true
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.qxrewrite, tag=Luka_获取Cookie, enabled=true
[task_local]
15 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js, tag=Luka_每日签到, enabled=true
```
## 获取Cookie
打开Luka App即可。
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

BIN
script/luka/luka.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

156
script/luka/luka_signin.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# Luka每日自动签到
http-request ^https?:\/\/luka\-graphql\.ling\.cn\/graphql\/mobile\?operation=UserInfoWithPendingRobotQuery requires-body=1,script-path=https://raw.https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js,tag=Luka_获取cookie
cron "30 0 * * *" script-path=https://raw.https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js,timeout=30,tag=Luka_每日签到
hostname = luka-graphql.ling.cn

View File

@@ -0,0 +1,5 @@
# Luka每日自动签到
^https?:\/\/luka\-graphql\.ling\.cn\/graphql\/mobile\?operation=UserInfoWithPendingRobotQuery url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js
hostname = luka-graphql.ling.cn

View File

@@ -0,0 +1,10 @@
#!name=Luka阅读习惯养成
#!desc=Luka每日自动签到
#!system=ios
[Script]
Luka_每日签到 = type=cron,cronexp=30 0 * * *,timeout=30,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js
Luka_获取cookie = type=http-request,pattern=^https?:\/\/luka\-graphql\.ling\.cn\/graphql\/mobile\?operation=UserInfoWithPendingRobotQuery,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js
[MITM]
hostname = %APPEND% luka-graphql.ling.cn

747
script/magicjs/magic.js Normal file
View File

@@ -0,0 +1,747 @@
const SET_VALUE_REGEX = /http:\/\/(www\.)?magic\.js\/value\/write/
const GET_VALUE_REGEX = /http:\/\/(www\.)?magic\.js\/value\/read/
const DEL_VALUE_REGEX = /http:\/\/(www\.)?magic\.js\/value\/del/
const SCRIPT_NAME = "MagicJS";
let body = {}
let magicJS = MagicJS(SCRIPT_NAME, "INFO");
async function Main(){
if (magicJS.isRequest){
if (SET_VALUE_REGEX.test(magicJS.request.url)){
try{
let key = magicJS.request.url.match(/key=([^&]*)/)[1]
let val = magicJS.request.url.match(/val=([^&]*)/)[1]
let session = magicJS.request.url.match(/session=([^&]*)/)
session = !!session? session[1] : '';
magicJS.write(key, val, session);
if (magicJS.read(key, session) == val){
magicJS.notify('变量写入成功');
body = {'success': true, 'msg': '变量写入成功', 'key': key, 'val': val, 'session': session}
}
else{
magicJS.notify('变量写入失败');
body = {'success': false, 'msg': '变量写入失败', 'key': key, 'val': magicJS.read(key, session), 'session': session}
}
}
catch (err){
magicJS.notify('变量写入失败');
body = {'success': false, 'msg': '变量写入失败'};
}
}
else if (GET_VALUE_REGEX.test(magicJS.request.url)){
try{
let key = magicJS.request.url.match(/key=([^&]*)/)[1]
let session = magicJS.request.url.match(/session=([^&]*)/)
session = !!session? session[1] : '';
val = magicJS.read(key, session);
magicJS.notify('读取变量成功');
body = {'success': true, 'msg': '读取变量成功', 'key': key, 'val': val, 'session': session}
}
catch (err){
magicJS.notify('读取变量失败');
body = {'success': false, 'msg': '读取变量失败'};
}
}
else if (DEL_VALUE_REGEX.test(magicJS.request.url)){
try{
let key = magicJS.request.url.match(/key=([^&]*)/)[1]
let session = magicJS.request.url.match(/session=([^&]*)/)
session = !!session? session[1] : '';
val = magicJS.del(key, session);
if (!!magicJS.read(key, session)){
magicJS.notify('删除变量失败');
body = {'success': true, 'msg': '删除变量失败', 'key': key, 'session': session}
}
else{
magicJS.notify('删除变量成功');
body = {'success': true, 'msg': '删除变量成功', 'key': key, 'session': session}
}
}
catch (err){
magicJS.notify('删除变量失败');
body = {'success': false, 'msg': '删除变量失败'};
}
}
else{
magicJS.notify('请求格式错误');
body = {'success': false, 'msg': '请求格式错误'};
}
body = JSON.stringify(body);
let resp = {}
if (magicJS.isSurge || magicJS.isLoon){
resp = {
response: {
status: 200,
body: body,
headers: {
'Content-type': 'application/json;charset=utf-8'
}
}
}
}
if (magicJS.isQuanX){
resp = {
body: body,
headers: {
'Content-type': 'application/json;charset=utf-8'
},
status: "HTTP/1.1 200 OK"
}
}
magicJS.done(resp);
}
}
Main();
function MagicJS(scriptName='MagicJS', logLevel='INFO'){
return new class{
constructor(){
this.version = '2.2.3.1'
this.scriptName = scriptName;
this.logLevels = {DEBUG: 5, INFO: 4, NOTIFY: 3, WARNING: 2, ERROR: 1, CRITICAL: 0, NONE: -1};
this.isLoon = typeof $loon !== 'undefined';
this.isQuanX = typeof $task !== 'undefined';
this.isJSBox = typeof $drive !== 'undefined';
this.isNode = typeof module !== 'undefined' && !this.isJSBox;
this.isSurge = typeof $httpClient !== 'undefined' && !this.isLoon;
this.node = {'request': undefined, 'fs': undefined, 'data': {}};
this.iOSUserAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1';
this.pcUserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 Edg/84.0.522.59';
this.logLevel = logLevel;
this._barkUrl = '';
if (this.isNode){
this.node.fs = require('fs');
this.node.request = require('request');
try{
this.node.fs.accessSync('./magic.json', this.node.fs.constants.R_OK | this.node.fs.constants.W_OK);
}
catch(err){
this.node.fs.writeFileSync('./magic.json', '{}', {encoding: 'utf8'})
}
this.node.data = require('./magic.json');
}
else if (this.isJSBox){
if (!$file.exists('drive://MagicJS')){
$file.mkdir('drive://MagicJS');
}
if (!$file.exists('drive://MagicJS/magic.json')){
$file.write({
data: $data({string: '{}'}),
path: 'drive://MagicJS/magic.json'
})
}
}
}
set barkUrl(url){this._barkUrl = url.replace(/\/+$/g, '');}
set logLevel(level) {this._logLevel = typeof level === 'string'? level.toUpperCase(): 'DEBUG'};
get logLevel() {return this._logLevel};
get isRequest() {return typeof $request !== 'undefined' && typeof $response === 'undefined'}
get isResponse() {return typeof $response !== 'undefined' }
get request() {return typeof $request !== 'undefined' ? $request : undefined }
get response() {
if (typeof $response !== 'undefined'){
if ($response.hasOwnProperty('status')) $response['statusCode'] = $response['status']
if ($response.hasOwnProperty('statusCode')) $response['status'] = $response['statusCode']
return $response;
}
else{
return undefined;
}
}
get platform(){
if (this.isSurge) return "Surge"
else if (this.isQuanX) return "Quantumult X"
else if (this.isLoon) return "Loon"
else if (this.isJSBox) return "JSBox"
else if (this.isNode) return "Node.js"
else return "unknown"
}
read(key, session=''){
let val = '';
// 读取原始数据
if (this.isSurge || this.isLoon) {
val = $persistentStore.read(key);
}
else if (this.isQuanX) {
val = $prefs.valueForKey(key);
}
else if (this.isNode){
val = this.node.data;
}
else if (this.isJSBox){
val = $file.read('drive://MagicJS/magic.json').string;
}
try {
// Node 和 JSBox数据处理
if (this.isNode) val = val[key]
if (this.isJSBox) val = JSON.parse(val)[key];
// 带Session的情况
if (!!session){
if(typeof val === 'string') val = JSON.parse(val);
val = !!val && typeof val === 'object' ? val[session]: null;
}
}
catch (err){
this.logError(err);
val = !!session? {} : null;
this.del(key);
}
if (typeof val === 'undefined') val = null;
try {if(!!val && typeof val === 'string') val = JSON.parse(val)} catch(err) {}
this.logDebug(`READ DATA [${key}]${!!session? `[${session}]`: ''}(${typeof val})\n${JSON.stringify(val)}`);
return val;
};
write(key, val, session=''){
let data = !!session ? {} : '';
// 读取原先存储的JSON格式数据
if (!!session && (this.isSurge || this.isLoon)) {
data = $persistentStore.read(key);
}
else if (!!session && this.isQuanX) {
data = $prefs.valueForKey(key);
}
else if (this.isNode){
data = this.node.data;
}
else if (this.isJSBox){
data = JSON.parse($file.read('drive://MagicJS/magic.json').string);
}
if (!!session){
// 有Session所有数据都是Object
try {
if (typeof data === 'string') data = JSON.parse(data)
data = typeof data === 'object' && !!data ? data : {};
}
catch(err){
this.logError(err);
this.del(key);
data = {};
};
if (this.isJSBox || this.isNode){
// 构造数据
if (!data.hasOwnProperty(key) || typeof data[key] != 'object'){
data[key] = {};
}
if (!data[key].hasOwnProperty(session)){
data[key][session] = null;
}
// 写入或删除数据
if (typeof val === 'undefined'){
delete data[key][session];
}
else{
data[key][session] = val;
}
}
else {
// 写入或删除数据
if (typeof val === 'undefined'){
delete data[session];
}
else{
data[session] = val;
}
}
}
// 没有Session时
else{
if (this.isNode || this.isJSBox){
// 删除数据
if (typeof val === 'undefined'){
delete data[key];
}
else{
data[key] = val;
}
}
else{
// 删除数据
if (typeof val === 'undefined'){
data = null;
}
else{
data = val;
}
}
}
// 数据回写
if (typeof data === 'object') data = JSON.stringify(data);
if (this.isSurge || this.isLoon) {
$persistentStore.write(data, key);
}
else if (this.isQuanX) {
$prefs.setValueForKey(data, key);
}
else if (this.isNode){
this.node.fs.writeFileSync('./magic.json', data)
}
else if (this.isJSBox){
$file.write({data: $data({string: data}), path: 'drive://MagicJS/magic.json'});
}
this.logDebug(`WRITE DATA [${key}]${!!session? `[${session}]`: ''}(${typeof val})\n${JSON.stringify(val)}`);
};
del(key, session=''){
this.logDebug(`DELETE KEY [${key}]${!!session ? `[${session}]`:''}`);
this.write(key, null, session);
}
/**
* iOS系统通知
* @param {*} title 通知标题
* @param {*} subTitle 通知副标题
* @param {*} body 通知内容
* @param {*} opts 通知选项目前支持传入超链接或Object
* Surge不支持通知选项Loon和QuantumultX支持打开URL和多媒体通知
* opts "applestore://" 打开Apple Store
* opts "https://www.apple.com.cn/" 打开Apple.com.cn
* opts {'open-url': 'https://www.apple.com.cn/'} 打开Apple.com.cn
* opts {'open-url': 'https://www.apple.com.cn/', 'media-url': 'https://raw.githubusercontent.com/Orz-3/mini/master/Apple.png'} 打开Apple.com.cn显示一个苹果Logo
*/
notify(title=this.scriptName, subTitle='', body='', opts=''){
this.logNotify(`title:${title}\nsubTitle:${subTitle}\nbody:${body}\noptions:${typeof opts === 'object'? JSON.stringify(opts) : opts}`);
let convertOptions = (_opts) =>{
let newOpts = {};
if (typeof _opts === 'string'){
if (this.isLoon) newOpts = {'openUrl': _opts};
else if (this.isQuanX) newOpts = {'open-url': _opts};
}
else if (typeof _opts === 'object'){
if (this.isLoon){
newOpts['openUrl'] = !!_opts['open-url']? _opts['open-url']: '';
newOpts['mediaUrl'] = !!_opts['media-url']? _opts['media-url']: '';
}
else if (this.isQuanX) newOpts = !!_opts['open-url'] || !!_opts['media-url'] ? _opts : {};
}
return newOpts;
}
opts = convertOptions(opts);
// 支持单个参数通知
if (arguments.length == 1){
title = this.scriptName;
subTitle = '',
body = arguments[0];
}
if (this.isSurge){
$notification.post(title, subTitle, body);
}
else if (this.isLoon){
if (!!opts) $notification.post(title, subTitle, body, opts);
else $notification.post(title, subTitle, body);
}
else if (this.isQuanX) {
$notify(title, subTitle, body, opts);
}
else if (this.isNode) {
if (!!this._barkUrl){
let content = encodeURI(`${title}/${subTitle}\n${body}`)
this.get(`${this._barkUrl}/${content}`, ()=>{});
}
}
else if (this.isJSBox){
let push = {
title: title,
body: !!subTitle ? `${subTitle}\n${body}` : body,
}
$push.schedule(push);
}
}
log(msg, level="INFO"){
if (!(this.logLevels[this._logLevel] < this.logLevels[level.toUpperCase()])) console.log(`[${level}] [${this.scriptName}]\n${msg}\n`);
}
logDebug(msg){
this.log(msg, "DEBUG");
}
logInfo(msg){
this.log(msg, "INFO");
}
logNotify(msg){
this.log(msg, "NOTIFY");
}
logWarning(msg){
this.log(msg, "WARNING");
}
logError(msg){
this.log(msg, "ERROR");
}
/**
* 对传入的Http Options根据不同环境进行适配
* @param {*} options
*/
adapterHttpOptions(options, method){
let _options = typeof options === 'object'? Object.assign({}, options): {'url': options, 'headers': {}};
if (_options.hasOwnProperty('header') && !_options.hasOwnProperty('headers')){
_options['headers'] = _options['header'];
delete _options['header'];
}
// 规范化的headers
const headersMap = {
'accept': 'Accept',
'accept-ch': 'Accept-CH',
'accept-charset': 'Accept-Charset',
'accept-features': 'Accept-Features',
'accept-encoding': 'Accept-Encoding',
'accept-language': 'Accept-Language',
'accept-ranges': 'Accept-Ranges',
'access-control-allow-credentials': 'Access-Control-Allow-Credentials',
'access-control-allow-origin': 'Access-Control-Allow-Origin',
'access-control-allow-methods': 'Access-Control-Allow-Methods',
'access-control-allow-headers': 'Access-Control-Allow-Headers',
'access-control-max-age': 'Access-Control-Max-Age',
'access-control-expose-headers': 'Access-Control-Expose-Headers',
'access-control-request-method': 'Access-Control-Request-Method',
'access-control-request-headers': 'Access-Control-Request-Headers',
'age': 'Age',
'allow': 'Allow',
'alternates': 'Alternates',
'authorization': 'Authorization',
'cache-control': 'Cache-Control',
'connection': 'Connection',
'content-encoding': 'Content-Encoding',
'content-language': 'Content-Language',
'content-length': 'Content-Length',
'content-location': 'Content-Location',
'content-md5': 'Content-MD5',
'content-range': 'Content-Range',
'content-security-policy': 'Content-Security-Policy',
'content-type': 'Content-Type',
'cookie': 'Cookie',
'dnt': 'DNT',
'date': 'Date',
'etag': 'ETag',
'expect': 'Expect',
'expires': 'Expires',
'from': 'From',
'host': 'Host',
'if-match': 'If-Match',
'if-modified-since': 'If-Modified-Since',
'if-none-match': 'If-None-Match',
'if-range': 'If-Range',
'if-unmodified-since': 'If-Unmodified-Since',
'last-event-id': 'Last-Event-ID',
'last-modified': 'Last-Modified',
'link': 'Link',
'location': 'Location',
'max-forwards': 'Max-Forwards',
'negotiate': 'Negotiate',
'origin': 'Origin',
'pragma': 'Pragma',
'proxy-authenticate': 'Proxy-Authenticate',
'proxy-authorization': 'Proxy-Authorization',
'range': 'Range',
'referer': 'Referer',
'retry-after': 'Retry-After',
'sec-websocket-extensions': 'Sec-Websocket-Extensions',
'sec-websocket-key': 'Sec-Websocket-Key',
'sec-websocket-origin': 'Sec-Websocket-Origin',
'sec-websocket-protocol': 'Sec-Websocket-Protocol',
'sec-websocket-version': 'Sec-Websocket-Version',
'server': 'Server',
'set-cookie': 'Set-Cookie',
'set-cookie2': 'Set-Cookie2',
'strict-transport-security': 'Strict-Transport-Security',
'tcn': 'TCN',
'te': 'TE',
'trailer': 'Trailer',
'transfer-encoding': 'Transfer-Encoding',
'upgrade': 'Upgrade',
'user-agent': 'User-Agent',
'variant-vary': 'Variant-Vary',
'vary': 'Vary',
'via': 'Via',
'warning': 'Warning',
'www-authenticate': 'WWW-Authenticate',
'x-content-duration': 'X-Content-Duration',
'x-content-security-policy': 'X-Content-Security-Policy',
'x-dnsprefetch-control': 'X-DNSPrefetch-Control',
'x-frame-options': 'X-Frame-Options',
'x-requested-with': 'X-Requested-With',
'x-surge-skip-scripting':'X-Surge-Skip-Scripting'
}
if (typeof _options.headers === 'object'){
for (let key in _options.headers){
if (headersMap[key]) {
_options.headers[headersMap[key]] = _options.headers[key];
delete _options.headers[key];
}
}
}
// 自动补完User-Agent减少请求特征
if (!!!_options.headers || typeof _options.headers !== 'object' || !!!_options.headers['User-Agent']){
if (!!!_options.headers || typeof _options.headers !== 'object') _options.headers = {};
if (this.isNode) _options.headers['User-Agent'] = this.pcUserAgent;
else _options.headers['User-Agent'] = this.iOSUserAgent
}
// 判断是否跳过脚本处理
let skipScripting = false;
if ((typeof _options['opts'] === 'object' && (_options['opts']['hints'] === true || _options['opts']['Skip-Scripting'] === true)) ||
(typeof _options['headers'] === 'object' && _options['headers']['X-Surge-Skip-Scripting'] === true)){
skipScripting = true;
}
if (!skipScripting){
if (this.isSurge) _options.headers['X-Surge-Skip-Scripting'] = false;
else if (this.isLoon) _options.headers['X-Requested-With'] = 'XMLHttpRequest';
else if (this.isQuanX){
if (typeof _options['opts'] !== 'object') _options.opts = {};
_options.opts['hints'] = false;
}
}
// 对请求数据做清理
if (!this.isSurge || skipScripting) delete _options.headers['X-Surge-Skip-Scripting'];
if (!this.isQuanX && _options.hasOwnProperty('opts')) delete _options['opts'];
if (this.isQuanX && _options.hasOwnProperty('opts')) delete _options['opts']['Skip-Scripting'];
// GET请求将body转换成QueryString(beta)
if (method === 'GET' && !this.isNode && !!_options.body){
let qs = Object.keys(_options.body).map(key=>{
if (typeof _options.body === 'undefined') return ''
return `${encodeURIComponent(key)}=${encodeURIComponent(_options.body[key])}`
}).join('&');
if (_options.url.indexOf('?') < 0) _options.url += '?'
if (_options.url.lastIndexOf('&')+1 != _options.url.length && _options.url.lastIndexOf('?')+1 != _options.url.length) _options.url += '&'
_options.url += qs;
delete _options.body;
}
// 适配多环境
if (this.isQuanX){
if (_options.hasOwnProperty('body') && typeof _options['body'] !== 'string') _options['body'] = JSON.stringify(_options['body']);
_options['method'] = method;
}
else if (this.isNode){
delete _options.headers['Accept-Encoding'];
if (typeof _options.body === 'object'){
if (method === 'GET'){
_options.qs = _options.body;
delete _options.body
}
else if (method === 'POST'){
_options['json'] = true;
_options.body = _options.body;
}
}
}
else if (this.isJSBox){
_options['header'] = _options['headers'];
delete _options['headers']
}
return _options;
}
/**
* Http客户端发起GET请求
* @param {*} options
* @param {*} callback
* options可配置参数headers和opts用于判断由脚本发起的http请求是否跳过脚本处理。
* 支持Surge和Quantumult X两种配置方式。
* 以下几种配置会跳过脚本处理options没有opts或opts的值不匹配则不跳过脚本处理
* {opts:{"hints": true}}
* {opts:{"Skip-Scripting": true}}
* {headers: {"X-Surge-Skip-Scripting": true}}
*/
get(options, callback){
let _options = this.adapterHttpOptions(options, 'GET');
this.logDebug(`HTTP GET: ${JSON.stringify(_options)}`);
if (this.isSurge || this.isLoon) {
$httpClient.get(_options, callback);
}
else if (this.isQuanX) {
$task.fetch(_options).then(
resp => {
resp['status'] = resp.statusCode
callback(null, resp, resp.body)
},
reason => callback(reason.error, null, null),
)
}
else if(this.isNode){
return this.node.request.get(_options, callback);
}
else if(this.isJSBox){
_options['handler'] = (resp)=>{
let err = resp.error? JSON.stringify(resp.error) : undefined;
let data = typeof resp.data === 'object' ? JSON.stringify(resp.data) : resp.data;
callback(err, resp.response, data);
}
$http.get(_options);
}
}
/**
* Http客户端发起POST请求
* @param {*} options
* @param {*} callback
* options可配置参数headers和opts用于判断由脚本发起的http请求是否跳过脚本处理。
* 支持Surge和Quantumult X两种配置方式。
* 以下几种配置会跳过脚本处理options没有opts或opts的值不匹配则不跳过脚本处理
* {opts:{"hints": true}}
* {opts:{"Skip-Scripting": true}}
* {headers: {"X-Surge-Skip-Scripting": true}}
*/
post(options, callback){
let _options = this.adapterHttpOptions(options, 'POST');
this.logDebug(`HTTP POST: ${JSON.stringify(_options)}`);
if (this.isSurge || this.isLoon) {
$httpClient.post(_options, callback);
}
else if (this.isQuanX) {
$task.fetch(_options).then(
resp => {
resp['status'] = resp.statusCode
callback(null, resp, resp.body)
},
reason => {callback(reason.error, null, null)}
)
}
else if(this.isNode){
return this.node.request.post(_options, callback);
}
else if(this.isJSBox){
_options['handler'] = (resp)=>{
let err = resp.error? JSON.stringify(resp.error) : undefined;
let data = typeof resp.data === 'object' ? JSON.stringify(resp.data) : resp.data;
callback(err, resp.response, data);
}
$http.post(_options);
}
}
done(value = {}){
if (typeof $done !== 'undefined'){
$done(value);
}
}
isToday(day){
if (day == null){
return false;
}
else{
let today = new Date();
if (typeof day == 'string'){
day = new Date(day);
}
if (today.getFullYear() == day.getFullYear() && today.getMonth() == day.getMonth() && today.getDay() == day.getDay()){
return true;
}
else{
return false;
}
}
}
isNumber(val) {
return parseFloat(val).toString() === "NaN"? false: true;
}
/**
* 对await执行中出现的异常进行捕获并返回避免写过多的try catch语句
* 示例let [err,val] = await magicJS.attempt(func(), 'defaultvalue');
* 或者let [err, [val1,val2]] = await magicJS.attempt(func(), ['defaultvalue1', 'defaultvalue2']);
* @param {*} promise Promise 对象
* @param {*} defaultValue 出现异常时返回的默认值
* @returns 返回两个值,第一个值为异常,第二个值为执行结果
*/
attempt(promise, defaultValue=null){ return promise.then((args)=>{return [null, args]}).catch(ex=>{this.logError(ex); return [ex, defaultValue]})};
/**
* 重试方法
* @param {*} fn 需要重试的函数
* @param {number} [retries=5] 重试次数
* @param {number} [interval=0] 每次重试间隔
* @param {function} [callback=null] 函数没有异常时的回调会将函数执行结果result传入callback根据result的值进行判断如果需要再次重试在callback中throw一个异常适用于函数本身没有异常但仍需重试的情况。
* @returns 返回一个Promise对象
*/
retry(fn, retries=5, interval=0, callback=null) {
return (...args)=>{
return new Promise((resolve, reject) =>{
function _retry(...args){
Promise.resolve().then(()=>fn.apply(this,args)).then(
result => {
if (typeof callback === 'function'){
Promise.resolve().then(()=>callback(result)).then(()=>{resolve(result)}).catch(ex=>{
this.logError(ex);
if (retries >= 1 && interval > 0){
setTimeout(() => _retry.apply(this, args), interval);
}
else if (retries >= 1) {
_retry.apply(this, args);
}
else{
reject(ex);
}
retries --;
});
}
else{
resolve(result);
}
}
).catch(ex=>{
this.logError(ex);
if (retries >= 1 && interval > 0){
setTimeout(() => _retry.apply(this, args), interval);
}
else if (retries >= 1) {
_retry.apply(this, args);
}
else{
reject(ex);
}
retries --;
})
}
_retry.apply(this, args);
});
};
}
formatTime(time, fmt="yyyy-MM-dd hh:mm:ss") {
var o = {
"M+": time.getMonth() + 1,
"d+": time.getDate(),
"h+": time.getHours(),
"m+": time.getMinutes(),
"s+": time.getSeconds(),
"q+": Math.floor((time.getMonth() + 3) / 3),
"S": time.getMilliseconds()
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (time.getFullYear() + "").substr(4 - RegExp.$1.length));
for (let k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
};
now(){
return this.formatTime(new Date(), "yyyy-MM-dd hh:mm:ss");
}
today(){
return this.formatTime(new Date(), "yyyy-MM-dd");
}
sleep(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
}(scriptName);
}

View File

@@ -0,0 +1,5 @@
#!name=MagicJS脚本测试
#!desc=测试MagicJS在不同平台的变量操作功能
[Script]
MagicJS_变量操作 = type=cron,cronexp=0 2 * * *,timeout=120,wake-system=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/magicjs/magic.js

View File

@@ -0,0 +1,91 @@
## 配置说明
### Surge
使用模块
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.sgmodule
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.quanx, tag=慢慢买_获取cookie, update-interval=86400, opt-parser=false, enabled=true
[task_local]
20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js, tag=慢慢买_每日签到, enabled=true
```
### Loon
配置文件
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.loon, tag=慢慢买_每日签到, enabled=true
```
## 获取Cookie
打开慢慢买App进入“我的” - “每日签到”弹出通知获取Cookie成功即可。
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# 慢慢买每日自动签到
http-request ^https?:\/\/apph5\.manmanbuy\.com\/taolijin\/(login.aspx|logserver.aspx) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js,tag=慢慢买_获取cookie
cron "15 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js,tag=慢慢买_每日签到
hostname = apph5.manmanbuy.com

View File

@@ -0,0 +1,7 @@
# 慢慢买每日自动签到
# [task_local]
# 5 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js, tag=慢慢买_每日签到, enabled=true
^https?:\/\/apph5\.manmanbuy\.com\/taolijin\/(login.aspx|logserver.aspx) url script-request-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js
hostname = apph5.manmanbuy.com

View File

@@ -0,0 +1,10 @@
#!name=慢慢买
#!desc=慢慢买每日自动签到
#!system=ios
[Script]
慢慢买_每日签到 = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js,type=cron,cronexp=10 0 * * *
慢慢买_获取cookie = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js,type=http-request,requires-body=true,pattern=^https?:\/\/apph5\.manmanbuy\.com\/taolijin\/(login.aspx|logserver.aspx)
[MITM]
hostname = %APPEND% apph5.manmanbuy.com

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

93
script/meituan/README.md Normal file
View File

@@ -0,0 +1,93 @@
# 美团买菜
美团买菜每日自动签到
## 配置说明
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.sgmodule
### Loon
使用远程脚本配置
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.lnscript, tag=美团买菜_每日签到, enabled=true
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.qxrewrite, tag=美团买菜_获取Cookie, enabled=true
[task_local]
30 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js, tag=美团买菜_每日签到, enabled=true
```
## 获取Cookie
打开美团App选择“美团买菜” - “我的” - “天天领钱”
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

BIN
script/meituan/maicai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# 美团买菜自动签到
http-request ^https?:\/\/mall\.meituan\.com\/api\/c\/mallcoin\/checkIn\/getWeekCheckInProgressBar\? requires-body=0,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js,tag=美团买菜_获取cookie
cron "30 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js,timeout=30,tag=美团买菜_每日签到
hostname = mall.meituan.com

View File

@@ -0,0 +1,5 @@
# 美团买菜每日自动签到
^https?:\/\/mall\.meituan\.com\/api\/c\/mallcoin\/checkIn\/getWeekCheckInProgressBar\? url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js
hostname = mall.meituan.com

View File

@@ -0,0 +1,10 @@
#!name=美团买菜
#!desc=美团买菜每日自动签到
#!system=ios
[Script]
美团买菜_每日签到 = type=cron,cronexp=30 0 * * *,timeout=30,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js
美团买菜_获取cookie = type=http-request,pattern=^https?:\/\/mall\.meituan\.com\/api\/c\/mallcoin\/checkIn\/getWeekCheckInProgressBar\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js
[MITM]
hostname = %APPEND% mall.meituan.com

211
script/smzdm/README.md Normal file
View File

@@ -0,0 +1,211 @@
# 什么值得买
## 特别说明
什么值得买执行任务时对每次任务的时间间隔有一定的要求过短的时间间隔可能会没有任何奖励。如果在短时间内并行发起大量请求的话严重的情况会导致账号异常需要修改密码。所以在每次执行任务时都加入了3秒的休眠时间这会导致脚本的执行时间需要非常长差不多1分钟左右。请把脚本超时时间设置到最长建议2分钟以上以免因为超时被强制中断。
2021年1月18日
实测会引起账号异常无法参与幸运屋抽奖其他功能暂未发现异常不在意抽奖的可以继续使用在意抽奖的请谨慎考虑。原因不明所以即日起下线生活频道抽奖及APP端签到。
## 最近更新
2020年12月22日
适配最新的个人中心返回Html格式。
去除威望显示,现在获取不到威望这个属性了。
去除完成点击“去购买”的任务的功能现在只能在APP端操作才有经验。现在每日经验约有60左右。什么值得买官方完全有办法封禁所有的Web端完成任务功能现在还能执行部分任务纯属官方放水且用且珍惜吧不保证哪一天就没办法通过脚本完成任务了。
## 签到与每日任务
什么值得买Web端和App端每日自动签到脚本并且完成每日点击去购买10次、点值5次、点赞5次、收藏5次的任务。
执行效果如下,会显示昵称、级别、经验值变动总数、经验值变动明细、任务完成情况。
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/images/01.png)
### 配置说明
#### Surge
##### **安装模块**
Surge推荐使用模块进行部署模块地址https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.sgmodule
### Loon
**远程脚本**
直接在配置里修改
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.lnscript, tag=什么值得买_每日签到, enabled=true
```
### Quantumult X
远程复写配置
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.qxrewrite, tag=什么值得买_获取Cookie, update-interval=86400, opt-parser=false, enabled=true
[task_local]
5 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js, tag=什么值得买每日签到
```
### 使用说明
#### **Web端获取Cookie**
使用手机浏览器访问 https://zhiyou.smzdm.com/ 进行一次登录通常会显示获取cookie成功。
可能因为重定向的问题登录成功后访问的不是https://zhiyou.smzdm.com/user/ 则重新在浏览器中访问一次https://zhiyou.smzdm.com/user/ 即可。
如果还是没有获取到Cookie请查阅Surge等第三方App的执行日志。
#### **App端获取账号密码**
打开什么值得买App点击“我的“-“设置”-“退出登录”,先退出登录。随后点击“我的”中顶部的“立即登录”,选择“账号密码登录”,注意是账号密码登录,不要使用手机快捷登录或其他第三方登录方式。
登录完成后提示获取账号密码成功就说明没有问题了。如果没有提示还是查阅一下第三方App的执行日志。在登录过程中无论账号密码正确与否都会进行获取和保存如果账号密码有错则重新登录一次即可脚本会自动更新所保存的账号密码。
以上在什么值得买的iPhone 9.5.17版本测试通过。
##### 隐私说明
因为手机端需要使用账号密码换取token再通过token签到所以需要获取一次账号密码。账号密码只会在本地存储用于发送给“什么值得买”服务端接口用于换取token不会发送给任何第三方。脚本完全开源如有疑虑请查阅脚本源码。
##### 存在的问题
###### 什么值得买iPhone 9.8.5及以上版本,抓取不到账户名密码
在最新版的什么值得买客户端iPhone 9.8.5(2020-07-13)中由于请求头声明异常会导致Quantumult X和Surge的商店版本无法抓取到账户名和密码Loon抓取正常。这个属于什么值得买客户端的请求不规范导致修复时间未知。
和Quantumlu X作者反馈作者迅速对这种请求头不规范的情况做了兼容目前在Qutumult X 1.0.13(348) TF版本中已经可以正常获取到数据。
现阶段的解决办法:
1. 如果有Quantumult X有TF版本更新至最新版即可
2. 如果使用Loon没影响
3. 如果使用Surge降级什么值得买App后抓取
4. clone 整个项目到本地,在本地脚本里填上预留的用户名密码
5. Surge手动写入数据
```javascript
手动执行脚本,写入账号密码数据
$persistentStore.write("你的账号", "smzdm_account");
$persistentStore.write("你的密码", "smzdm_password");
```
###### App端签到没有收益
目前App端的签到反复确认没有任何收益纯粹只是娱乐。Web端和App端同时签到可能会导致签到失败显示为主页君繁忙内置了签到时间间隔和多次重试一般不会再出现此问题。
## 去广告
去除什么值得买首页、好价、好文内的广告
### 配置说明
#### Surge
##### 配置文件
在配置文件中修改。
```ini
[MITM]
hostname = homepage-api.smzdm.com, haojia-api.smzdm.com, article-api.smzdm.com
[Script]
什么值得买_首页去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https:\/\/homepage-api.smzdm.com\/home,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
什么值得买_好价去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https:\/\/haojia-api.smzdm.com\/home\/list,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
什么值得买_好文去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https:\/\/article-api.smzdm.com\/article\/index_home_page,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
```
##### 模块安装
模块地址: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.sgmodule
### Loon
**远程脚本**
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.lnscript, tag=什么值得买_去广告, enabled=true
```
### Quantumult X
**远程复写脚本**
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.qxrewrite, tag=什么值得买_去广告, update-interval=86400, opt-parser=false, enabled=true
```
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# 什么值得买每日自动签到
http-request ^https?:\/\/zhiyou\.smzdm\.com\/user$ requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js,tag=什么值得买_获取cookie
http-request ^https?:\/\/user-api\.smzdm\.com\/user_login\/normal$ requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js,tag=什么值得买_获取账号密码
cron "5 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js,timeout=120,tag=什么值得买_每日签到
hostname = zhiyou.smzdm.com,user-api.smzdm.com

View File

@@ -0,0 +1,6 @@
# 什么值得买每日自动签到
^https?:\/\/zhiyou\.smzdm\.com\/user$ url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js
^https?:\/\/user-api\.smzdm\.com\/user_login\/normal$ url script-request-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js
hostname = zhiyou.smzdm.com,user-api.smzdm.com

View File

@@ -0,0 +1,11 @@
#!name=什么值得买
#!desc=什么值得买每日自动签到与完成任务
#!system=ios
[Script]
什么值得买_每日签到 = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js,timeout=120,type=cron,cronexp=5 0 * * *
什么值得买_获取cookie = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js,type=http-request,requires-body=true,pattern=^https?:\/\/zhiyou\.smzdm\.com\/user$
什么值得买_获取账号密码 = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_checkin.js,type=http-request,requires-body=true,pattern=^https?:\/\/user-api\.smzdm\.com\/user_login\/normal$
[MITM]
hostname = %APPEND% zhiyou.smzdm.com, user-api.smzdm.com

BIN
script/smzdm/images/01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
script/smzdm/smzdm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# 什么值得买每日自动任务
http-request ^https?:\/\/zhiyou\.smzdm\.com\/user$ requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js,tag=什么值得买_获取cookie
cron "20 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_mission.js,timeout=120,tag=什么值得买_每日任务
hostname = zhiyou.smzdm.com

View File

@@ -0,0 +1,6 @@
# 什么值得买每日自动签到
^https?:\/\/zhiyou\.smzdm\.com\/user$ url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js
^https?:\/\/user-api\.smzdm\.com\/user_login\/normal$ url script-request-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_mission.js
hostname = zhiyou.smzdm.com

View File

@@ -0,0 +1,10 @@
#!name=什么值得买
#!desc=什么值得买每日自动任务
#!system=ios
[Script]
什么值得买_每日任务 = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_mission.js,timeout=120,type=cron,cronexp=20 0 * * *
什么值得买_获取cookie = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js,type=http-request,requires-body=true,pattern=^https?:\/\/zhiyou\.smzdm\.com\/user$
[MITM]
hostname = %APPEND% zhiyou.smzdm.com

View File

@@ -0,0 +1,78 @@
let body = $response.body;
body=JSON.parse(body);
let homepage_regex = /^https?:\/\/homepage-api.smzdm.com\/home/;
let haojia_regex = /^https?:\/\/haojia-api.smzdm.com\/home\/list/;
let article_regex = /^https?:\/\/article-api.smzdm.com\/article\/index_home_page/;
let util_regex = /^https?:\/\/app-api\.smzdm\.com\/util\/update/;
let sou_regex = /^https?:\/\/s-api\.smzdm\.com\/sou\/list/;
// 去除首页推荐广告
if (homepage_regex.test($request.url)){
if (!!body){
if (body['data'].hasOwnProperty('banner')){
if (body['data']['banner'].hasOwnProperty('big_banner')){
delete body['data']['banner']['big_banner'];
}
if (body['data']['banner'].hasOwnProperty('tonglan_banner')){
delete body['data']['banner']['tonglan_banner'];
}
}
if (body.hasOwnProperty('data') && body['data'].hasOwnProperty('rows')){
let rows = body['data']['rows'].filter((item) =>{
return item['model_type'] != 'ads' && item['model_type'] != 'cluster';
})
body['data']['rows'] = rows;
}
delete body['data']['widget'];
}
}
// 好价去广告
else if(haojia_regex.test($request.url)){
if (body['data'].hasOwnProperty('banner')){
if (body['data']['banner'].hasOwnProperty('two_banner')){
delete body['data']['banner']['two_banner'];
}
if (body['data']['banner'].hasOwnProperty('big_banner')){
delete body['data']['banner']['big_banner'];
}
if (body['data']['banner'].hasOwnProperty('calendar_banner')){
delete body['data']['banner']['calendar_banner'];
}
if (body['data']['banner'].hasOwnProperty('hongbao_banner')){
delete body['data']['banner']['hongbao_banner'];
}
}
let rows = body['data']['rows'].filter((item) =>{
return item['tag'] != '广告';
})
body['data']['rows'] = rows;
}
// 社区好文去广告
else if(article_regex.test($request.url)){
if (body['data'].hasOwnProperty('big_banner')){
delete body['data']['big_banner'];
}
if (body['data'].hasOwnProperty('notice')){
delete body['data']['notice'];
}
}
// 去除浮动广告
else if (util_regex.test($request.url)){
delete body['data']['ad_filter'];
delete body['data']['operation_float_7_0'];
delete body['data']['operation_full'];
delete body['data']['operation_float_screen'];
delete body['data']['operation_float'];
}
// 去除搜索结果广告
else if (sou_regex.test($request.url)){
if (body.hasOwnProperty('data') && body['data'].hasOwnProperty('rows')){
let rows = body['data']['rows'].filter((item) =>{
return item['model_type'] != 'ads';
})
body['data']['rows'] = rows;
}
}
body=JSON.stringify(body);
$done({body});

View File

@@ -0,0 +1,16 @@
# 什么值得买去广告
[URL Rewrite]
^https?:\/\/haojia\.m\.smzdm\.com\/detail_modul\/banner - reject
^https?:\/\/api\.smzdm\.com\/v\d\/util\/(banner|loading) - reject
^https?:\/\/app-api\.smzdm\.com\/util\/loading - reject
[Script]
http-response ^https?:\/\/homepage-api\.smzdm\.com\/home script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js, requires-body=true, timeout=10, tag=什么值得买_首页去广告
http-response ^https?:\/\/haojia-api\.smzdm\.com\/home\/list script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js, requires-body=true, timeout=10, tag=什么值得买_好价去广告
http-response ^https?:\/\/app-api\.smzdm\.com\/util\/update script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js, requires-body=true, timeout=10, tag=什么值得买_去浮动广告
http-response ^https?:\/\/article-api\.smzdm\.com\/article\/index_home_page script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js, requires-body=true, timeout=10, tag=什么值得买_首页去广告
http-response ^https?:\/\/s-api\.smzdm\.com\/sou\/list script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js, requires-body=true, timeout=10, tag=什么值得买_搜索去广告
[MITM]
hostname = homepage-api.smzdm.com,haojia-api.smzdm.com,article-api.smzdm.com,haojia.m.smzdm.com,app-api.smzdm.com,s-api.smzdm.com

View File

@@ -0,0 +1,19 @@
# 什么值得买去广告
# 详情页去广告
^https?:\/\/haojia\.m\.smzdm\.com\/detail_modul\/banner url reject-dict
# 首页去广告
^https?:\/\/homepage-api\.smzdm\.com\/home url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
# 好价去广告
^https?:\/\/haojia-api\.smzdm\.com\/home\/list url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
# 去浮动广告
^https?:\/\/app-api\.smzdm\.com\/util\/update url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
# 好文去广告
^https?:\/\/article-api\.smzdm\.com\/article\/index_home_page url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
# 搜索去广告
^https?:\/\/s-api\.smzdm\.com\/sou\/list url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
# 其他
^https?:\/\/api\.smzdm\.com\/v\d\/util\/(banner|loading) url reject-dict
^https?:\/\/app-api\.smzdm\.com\/util\/loading url reject-dict
hostname = homepage-api.smzdm.com,haojia-api.smzdm.com,article-api.smzdm.com,haojia.m.smzdm.com,app-api.smzdm.com,s-api.smzdm.com

View File

@@ -0,0 +1,18 @@
#!name=什么值得买
#!desc=什么值得买APP去广告
[URL Rewrite]
^https?:\/\/haojia\.m\.smzdm\.com\/detail_modul\/banner - reject
^https?:\/\/api\.smzdm\.com\/v\d\/util\/(banner|loading) - reject
^https?:\/\/app-api\.smzdm\.com\/util\/loading - reject
[Script]
什么值得买_首页去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/homepage-api\.smzdm\.com\/home,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
什么值得买_去浮动广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/app-api\.smzdm\.com\/util\/update,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
什么值得买_好价去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/haojia-api\.smzdm\.com\/home\/list\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
什么值得买_好文去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/article-api\.smzdm\.com\/article\/index_home_page,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
什么值得买_搜索去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/s-api\.smzdm\.com\/sou\/list,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_remove_ads.js
[MITM]
hostname = %APPEND% homepage-api.smzdm.com,haojia-api.smzdm.com,article-api.smzdm.com,haojia.m.smzdm.com,app-api.smzdm.com,s-api.smzdm.com

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
# 什么值得买每日自动签到
http-request ^https?:\/\/zhiyou\.smzdm\.com\/user$ requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js,tag=什么值得买_获取cookie
cron "5 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js,timeout=120,tag=什么值得买_每日任务
hostname = zhiyou.smzdm.com

View File

@@ -0,0 +1,6 @@
# 什么值得买每日自动签到
^https?:\/\/zhiyou\.smzdm\.com\/user$ url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js
^https?:\/\/user-api\.smzdm\.com\/user_login\/normal$ url script-request-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js
hostname = zhiyou.smzdm.com

View File

@@ -0,0 +1,10 @@
#!name=什么值得买
#!desc=什么值得买每日自动签到
#!system=ios
[Script]
什么值得买_每日签到 = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js,timeout=120,type=cron,cronexp=5 0 * * *
什么值得买_获取cookie = script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js,type=http-request,requires-body=true,pattern=^https?:\/\/zhiyou\.smzdm\.com\/user$
[MITM]
hostname = %APPEND% zhiyou.smzdm.com

35
script/startup/README.md Normal file
View File

@@ -0,0 +1,35 @@
# 开屏去广告
使用脚本通过修改开屏广告图片大小、开屏广告持续时间、开屏广告生效时间等方法去除缓存到本地的APP开屏广告。
维护去广告项目耗费的精力要远高于维护签到项目所以当前仅能满足个人常用APP的开屏广告去除并且不保证去除效果。
实在是精力有限暂时无法帮忙去除其他APP开屏广告欢迎大佬贡献其他去除开屏广告的代码。
## 配置说明
大部分去广告的链接,都已经被整合型的去广告脚本拦截,脚本无法接管请求。如果出现拦截失败,请抓包检查相关请求是不是在脚本处理前就已经被拦截。
### Surge
使用模块
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.sgmodule
### Loon
使用远程脚本配置
```ini
[Plugin]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.lnplugin, tag=开屏去广告, enabled=true
```
### Quantumult X
配置文件
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.qxrewrite, tag=开屏去广告, enabled=true
```

108
script/startup/startup.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,13 @@
# 开屏去广告
[Script]
http-response ^https?:\/\/capis(-?\w*)?\.didapinche\.com\/ad\/cx\/startup\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=嘀嗒出行_开屏去广告
http-response ^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/start\/ad requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js,tag=Fa米家_开屏去广告
http-response ^https?:\/\/app\.bilibili\.com\/x\/v2\/splash\/list requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js,tag=BiliBili_开屏去广告
http-response ^https?:\/\/wmapi\.meituan\.com\/api\/v\d+\/loadInfo? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=美团外卖_开屏去广告
http-response ^https?:\/\/hd\.mina\.mi\.com\/splashscreen\/alert requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=小爱音箱_开屏去广告
http-response ^https?:\/\/hd\.mina\.mi\.com\/splashscreen\/alert requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=京东_开屏去广告
http-response ^https?:\/\/mi\.gdt\.qq\.com\/gdt_mview.fcg requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=联享家_开屏去广告
[MITM]
hostname = capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com

View File

@@ -0,0 +1,16 @@
# 嘀嗒出行
^https?:\/\/capis(-?\w*)?\.didapinche\.com\/ad\/cx\/startup\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
# Fa米家
^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/start\/ad url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js
# BiliBili
^https?:\/\/app\.bilibili\.com\/x\/v2\/splash\/list url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
# 美团外卖
^https?:\/\/wmapi\.meituan\.com\/api\/v\d+\/loadInfo? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
# 小爱音箱
^https?:\/\/hd\.mina\.mi\.com\/splashscreen\/alert url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
# 京东
^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=start url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
# 联享家
^https?:\/\/mi\.gdt\.qq\.com\/gdt_mview.fcg url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
hostname = capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com

View File

@@ -0,0 +1,15 @@
#!name=开屏去广告
#!desc=通过脚本去除部分APP的顽固开屏广告
#!system=ios
[Script]
嘀嗒出行_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/capis(-?\w*)?\.didapinche\.com\/ad\/cx\/startup\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
Fa米家_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/start\/ad,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js
BiliBili_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/app\.bilibili\.com\/x\/v2\/splash\/list,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_plus.js
美团外卖_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/wmapi\.meituan\.com\/api\/v\d+\/loadInfo?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
小爱音箱_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/hd\.mina\.mi\.com\/splashscreen\/alert,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
京东_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=start,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
联享家_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/mi\.gdt\.qq\.com\/gdt_mview.fcg,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
[MITM]
hostname = %APPEND% capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com

120
script/tieba/README.md Normal file
View File

@@ -0,0 +1,120 @@
# 百度贴吧签到
## 前言
参考 https://github.com/NobyDa/Script/tree/master/BDTieBa-DailyBonus 做了彻底的重写。
做如下改动:
1. 精简合并通知
只显示签到贴吧总数、成功数量、失败数量,签到明细只会显示失败的,因为我并不关心哪些贴吧签到成功。
2. 增加重试机制
针对签到失败的贴吧进行10次每次间隔2秒的重试可以极大提高签到成功率。
## 配置
### Surge
使用模块
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.sgmodule
```
### Quantumult X
```ini
[rewrite_remote]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.qxrewrite, tag=贴吧_获取Cookie, update-interval=86400, opt-parser=false, enabled=true
[task_local]
30 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js, tag=贴吧_每日签到, enabled=true
```
### Loon
配置文件
```ini
[Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.lnscript, tag=贴吧_每日签到, enabled=true
```
## 获取Cookie
关闭贴吧后台,重新进入一次贴吧即可。
![](https://github.com/blackmatrix7/ios_rule_script/blob/master/script/tieba/images/03.jpg?raw=true)
## 签到
带有重试机制解决need vcode失败问题凌晨高峰期签到也可以保证成功率。
全部签到成功时:
![](https://github.com/blackmatrix7/ios_rule_script/blob/master/script/tieba/images/01.jpg?raw=true)
部分贴吧签到失败时:
![](https://github.com/blackmatrix7/ios_rule_script/blob/master/script/tieba/images/02.jpg?raw=true)
## 统一推送
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上。
执行效果图,以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
### 开启统一推送
你需要安装Bark这个APP打开后可以得到类似这样的链接
```http
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```
在Surge、Loon、QuantumultX中执行以下代码将链接写入(如何执行代码请自己动手解决)。
**Surge、Loon**
```javascript
# 开启所有脚本统一推送
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 开启所有脚本统一推送
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
```
### 关闭统一推送
**Surge、Loon**
```javascript
# 关闭所有脚本统一推送
$persistentStore.write("", "magicjs_unified_push_url");
```
**Quantumult X**
```javascript
# 关闭所有脚本统一推送
$prefs.setValueForKey("", "magicjs_unified_push_url");
```
### 其他
1. 统一推送能力仅对支持的脚本有效。
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
3. 限于Bark的功能统一推送中的多媒体和链接不可用。
4. 统一推送需要使用Bark的服务器推送成功与否与Bark服务器的可用性有关。
5. 统一推送不会关闭APP的本地推送即两个iOS设备都会有推送。
6. 如有隐私考虑可以参考Bark的服务端文档自建服务端。

BIN
script/tieba/images/01.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Some files were not shown because too many files have changed in this diff Show More