mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 01:20:08 +08:00
[update] Version 0.8.0
This commit is contained in:
parent
1c6c35e67b
commit
9b92a5e9fe
30
CHANGELOG.md
30
CHANGELOG.md
@ -1,6 +1,36 @@
|
|||||||
# Release Notes
|
# Release Notes
|
||||||
# 本项目Log
|
# 本项目Log
|
||||||
|
|
||||||
|
## v0.8.0.210327 alpha (2021-03-27)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- 增加直播扭蛋抽奖活动(可自定义)
|
||||||
|
- 增加主站九宫格抽奖活动(可自定义)
|
||||||
|
- 增加多个推送消息通道
|
||||||
|
-
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- 更新过滤词独立
|
||||||
|
- 更新请求中心
|
||||||
|
- 更新日志打印
|
||||||
|
- 更新基础库
|
||||||
|
- 更新环境读取流程
|
||||||
|
- 更新部分配置
|
||||||
|
- 更新登录请求
|
||||||
|
- 更新实物抽奖&天选抽奖
|
||||||
|
- 支持PHP8.0+
|
||||||
|
- 更新弹幕抽奖
|
||||||
|
- 更新每日任务
|
||||||
|
- 更新部分任务架构
|
||||||
|
- 引入必要新包
|
||||||
|
-
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 修复小心心心跳错误
|
||||||
|
- 修复部分推送错误
|
||||||
|
- 修复银瓜子换银币日志错误
|
||||||
|
-
|
||||||
|
|
||||||
## v0.6.7.201117 alpha (2020-11-17)
|
## v0.6.7.201117 alpha (2020-11-17)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
60
DOC.md
60
DOC.md
@ -2,7 +2,7 @@
|
|||||||
<p align="center"><img width="300px" src="https://i.loli.net/2018/04/20/5ad97bd395912.jpeg"></p>
|
<p align="center"><img width="300px" src="https://i.loli.net/2018/04/20/5ad97bd395912.jpeg"></p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://img.shields.io/badge/version-0.7.0.210119 alpha-green.svg?longCache=true&style=for-the-badge">
|
<img src="https://img.shields.io/badge/version-0.8.0.210327 alpha-green.svg?longCache=true&style=for-the-badge">
|
||||||
<img src="https://img.shields.io/badge/license-mit-blue.svg?longCache=true&style=for-the-badge">
|
<img src="https://img.shields.io/badge/license-mit-blue.svg?longCache=true&style=for-the-badge">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -15,34 +15,36 @@ B 站直播实用脚本
|
|||||||
|
|
||||||
|plugin |version |description |
|
|plugin |version |description |
|
||||||
|--------------------|--------------------|--------------------|
|
|--------------------|--------------------|--------------------|
|
||||||
|Login |21.01.19 |账号登录 |
|
|Login |21.03.27 |账号登录 |
|
||||||
|Schedule |21.01.19 |休眠控制 |
|
|Schedule |21.03.27 |休眠控制 |
|
||||||
|MasterSite |21.01.19 |主站助手 |
|
|MasterSite |21.03.27 |主站助手 |
|
||||||
|Daily |21.01.19 |每日礼包 |
|
|Daily |21.03.27 |每日礼包 |
|
||||||
|Heart |21.01.19 |双端心跳 |
|
|Heart |21.03.27 |双端心跳 |
|
||||||
|Task |21.01.19 |每日任务 |
|
|DailyTask |21.03.27 |每日任务 |
|
||||||
|Silver |21.01.19 |银瓜子宝箱 |
|
|Silver |21.03.27 |银瓜子宝箱 |
|
||||||
|Barrage |21.01.19 |活跃弹幕 |
|
|Barrage |21.03.27 |活跃弹幕 |
|
||||||
|Silver2Coin |21.01.19 |银瓜子换硬币 |
|
|Silver2Coin |21.03.27 |银瓜子换硬币 |
|
||||||
|GiftSend |21.01.19 |礼物赠送 |
|
|GiftSend |21.03.27 |礼物赠送 |
|
||||||
|Judge |21.01.19 |风纪 |
|
|Judge |21.03.27 |风纪 |
|
||||||
|GroupSignIn |21.01.19 |友爱社签到 |
|
|GroupSignIn |21.03.27 |友爱社签到 |
|
||||||
|ManGa |21.01.19 |漫画签到分享 |
|
|ManGa |21.03.27 |漫画签到分享 |
|
||||||
|Match |21.01.19 |赛事签到分享 |
|
|GameMatch |21.03.27 |赛事签到分享 |
|
||||||
|GiftHeart |21.01.19 |心跳礼物 |
|
|GiftHeart |21.03.27 |心跳礼物 |
|
||||||
|MaterialObject |21.01.19 |实物抽奖 |
|
|MaterialObject |21.03.27 |实物抽奖 |
|
||||||
|AloneTcpClient |21.01.19 |独立监控 |
|
|AloneTcpClient |21.03.27 |独立监控 |
|
||||||
|ZoneTcpClient |21.01.19 |分区监控 |
|
|ZoneTcpClient |21.03.27 |分区监控 |
|
||||||
|StormRaffle |21.01.19 |节奏风暴 |
|
|StormRaffle |21.03.27 |节奏风暴 |
|
||||||
|GiftRaffle |21.01.19 |活动礼物 |
|
|GiftRaffle |21.03.27 |活动礼物 |
|
||||||
|PkRaffle |21.01.19 |大乱斗 |
|
|PkRaffle |21.03.27 |大乱斗 |
|
||||||
|GuardRaffle |21.01.19 |舰长总督 |
|
|GuardRaffle |21.03.27 |舰长总督 |
|
||||||
|AnchorRaffle |21.01.19 |天选时刻 |
|
|AnchorRaffle |21.03.27 |天选时刻 |
|
||||||
|AwardRecord |21.01.19 |获奖通知 |
|
|AwardRecord |21.03.27 |获奖通知 |
|
||||||
|Statistics |21.01.19 |数据统计 |
|
|Statistics |21.03.27 |数据统计 |
|
||||||
|Competition |21.01.19 |赛事竞猜 |
|
|Competition |21.03.27 |赛事竞猜 |
|
||||||
|SmallHeart |21.01.19 |小心心 |
|
|SmallHeart |21.03.27 |小心心 |
|
||||||
|ActivityLottery |21.01.19 |主站活动 |
|
|ActivityLottery |21.03.27 |主站活动 |
|
||||||
|
|CapsuleLottery |21.03.27 |直播扭蛋活动 |
|
||||||
|
|Forward |21.03.27 |动态抽奖转发 |
|
||||||
|
|
||||||
## 打赏赞助
|
## 打赏赞助
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2019 lkeme
|
Copyright (c) 2021 Lkeme
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Group: [55308141](https://jq.qq.com/?_wv=1027&k=5AIDaJg) | **仅用于BUG提交
|
|||||||
|
|
||||||
## 公告
|
## 公告
|
||||||
|
|
||||||
> Currently for Personal Edition **0.7.0.210119 alpha**
|
> Personal Edition **0.8.0.210327 alpha**
|
||||||
|
|
||||||
```notice
|
```notice
|
||||||
---- 免费的东西总是得不到人的珍惜。
|
---- 免费的东西总是得不到人的珍惜。
|
||||||
@ -15,6 +15,7 @@ Group: [55308141](https://jq.qq.com/?_wv=1027&k=5AIDaJg) | **仅用于BUG提交
|
|||||||
```
|
```
|
||||||
|
|
||||||
## 文档
|
## 文档
|
||||||
|
> 有疑问一定要先看看文档或Issue里是否存在相同的问题,再考虑其他渠道咨询。
|
||||||
|
|
||||||
* [使用文档 / DOC.md](./DOC.md)
|
* [使用文档 / DOC.md](./DOC.md)
|
||||||
* [更新日志 / CHANGELOG.md](./CHANGELOG.md)
|
* [更新日志 / CHANGELOG.md](./CHANGELOG.md)
|
||||||
|
|||||||
@ -10,13 +10,15 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-zlib": "*",
|
"ext-zlib": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"monolog/monolog": "^1.23",
|
"monolog/monolog": "^1.26.0",
|
||||||
"bramus/monolog-colored-line-formatter": "^2.0",
|
"bramus/monolog-colored-line-formatter": "^2.0.3",
|
||||||
"clue/socket-raw": "^1.4.1",
|
"clue/socket-raw": "^1.5.0",
|
||||||
"vlucas/phpdotenv": "^4.1",
|
"vlucas/phpdotenv": "^4.2.0",
|
||||||
"amphp/amp": "^2.4",
|
"amphp/amp": "^2.5.2",
|
||||||
"guzzlehttp/guzzle": "^6.5",
|
"guzzlehttp/guzzle": "^6.5.5",
|
||||||
"mathieuviossat/arraytotexttable": "^1.0"
|
"mathieuviossat/arraytotexttable": "^1.0.8",
|
||||||
|
"klkvsk/json-decode-stream": "^1.0",
|
||||||
|
"sven/file-config": "^3.1"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|||||||
384
composer.lock
generated
384
composer.lock
generated
@ -4,20 +4,20 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "773a1bbd829be3a7bb684f926002ac37",
|
"content-hash": "a9407272d4bb9ca1632a2aa728429bf0",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "amphp/amp",
|
"name": "amphp/amp",
|
||||||
"version": "v2.5.1",
|
"version": "v2.5.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/amphp/amp.git",
|
"url": "https://github.com/amphp/amp.git",
|
||||||
"reference": "ecdc3c476b3ccff02f8e5d5bcc04f7ccfd18751c"
|
"reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/amphp/amp/zipball/ecdc3c476b3ccff02f8e5d5bcc04f7ccfd18751c",
|
"url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9",
|
||||||
"reference": "ecdc3c476b3ccff02f8e5d5bcc04f7ccfd18751c",
|
"reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -91,7 +91,7 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"irc": "irc://irc.freenode.org/amphp",
|
"irc": "irc://irc.freenode.org/amphp",
|
||||||
"issues": "https://github.com/amphp/amp/issues",
|
"issues": "https://github.com/amphp/amp/issues",
|
||||||
"source": "https://github.com/amphp/amp/tree/v2.5.1"
|
"source": "https://github.com/amphp/amp/tree/v2.5.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -99,7 +99,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-11-03T16:23:45+00:00"
|
"time": "2021-01-10T17:06:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bramus/ansi-php",
|
"name": "bramus/ansi-php",
|
||||||
@ -205,16 +205,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "clue/socket-raw",
|
"name": "clue/socket-raw",
|
||||||
"version": "v1.4.1",
|
"version": "v1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/clue/php-socket-raw.git",
|
"url": "https://github.com/clue/php-socket-raw.git",
|
||||||
"reference": "00ab102d061f6cdb895e79dd4d69140c7bda31cc"
|
"reference": "089ffa05fa75bdc4e919aac44bbc435b3ef640ef"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/clue/php-socket-raw/zipball/00ab102d061f6cdb895e79dd4d69140c7bda31cc",
|
"url": "https://api.github.com/repos/clue/php-socket-raw/zipball/089ffa05fa75bdc4e919aac44bbc435b3ef640ef",
|
||||||
"reference": "00ab102d061f6cdb895e79dd4d69140c7bda31cc",
|
"reference": "089ffa05fa75bdc4e919aac44bbc435b3ef640ef",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -228,7 +228,7 @@
|
|||||||
"php": ">=5.3"
|
"php": ">=5.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^7.0 || ^6.0 || ^5.2 || ^4.8.35"
|
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -246,7 +246,7 @@
|
|||||||
"email": "christian@clue.engineering"
|
"email": "christian@clue.engineering"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets)",
|
"description": "Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets).",
|
||||||
"homepage": "https://github.com/clue/php-socket-raw",
|
"homepage": "https://github.com/clue/php-socket-raw",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Socket",
|
"Socket",
|
||||||
@ -264,9 +264,19 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/clue/php-socket-raw/issues",
|
"issues": "https://github.com/clue/php-socket-raw/issues",
|
||||||
"source": "https://github.com/clue/php-socket-raw/tree/v1.4.1"
|
"source": "https://github.com/clue/php-socket-raw/tree/v1.5.0"
|
||||||
},
|
},
|
||||||
"time": "2019-10-28T12:32:07+00:00"
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://clue.engineering/support",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/clue",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-11-27T13:16:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "container-interop/container-interop",
|
"name": "container-interop/container-interop",
|
||||||
@ -389,16 +399,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/promises",
|
"name": "guzzlehttp/promises",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/promises.git",
|
"url": "https://github.com/guzzle/promises.git",
|
||||||
"reference": "60d379c243457e073cff02bc323a2a86cb355631"
|
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
|
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||||
"reference": "60d379c243457e073cff02bc323a2a86cb355631",
|
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -444,22 +454,22 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/promises/issues",
|
"issues": "https://github.com/guzzle/promises/issues",
|
||||||
"source": "https://github.com/guzzle/promises/tree/1.4.0"
|
"source": "https://github.com/guzzle/promises/tree/1.4.1"
|
||||||
},
|
},
|
||||||
"time": "2020-09-30T07:37:28+00:00"
|
"time": "2021-03-07T09:25:29+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
"version": "1.7.0",
|
"version": "1.8.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
|
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1",
|
||||||
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
|
"reference": "35ea11d335fd638b5882ff1725228b3d35496ab1",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -525,22 +535,82 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/psr7/issues",
|
"issues": "https://github.com/guzzle/psr7/issues",
|
||||||
"source": "https://github.com/guzzle/psr7/tree/1.7.0"
|
"source": "https://github.com/guzzle/psr7/tree/1.8.1"
|
||||||
},
|
},
|
||||||
"time": "2020-09-30T07:37:11+00:00"
|
"time": "2021-03-21T16:25:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laminas/laminas-servicemanager",
|
"name": "klkvsk/json-decode-stream",
|
||||||
"version": "3.4.1",
|
"version": "v1.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laminas/laminas-servicemanager.git",
|
"url": "https://github.com/klkvsk/json-decode-stream.git",
|
||||||
"reference": "0d4c8628a71fae9f7bd0b1b74b76382e5e9a04b1"
|
"reference": "76cbcd9eb9f1860293b82b4f071e76826bc90c82"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/0d4c8628a71fae9f7bd0b1b74b76382e5e9a04b1",
|
"url": "https://api.github.com/repos/klkvsk/json-decode-stream/zipball/76cbcd9eb9f1860293b82b4f071e76826bc90c82",
|
||||||
"reference": "0d4c8628a71fae9f7bd0b1b74b76382e5e9a04b1",
|
"reference": "76cbcd9eb9f1860293b82b4f071e76826bc90c82",
|
||||||
|
"shasum": "",
|
||||||
|
"mirrors": [
|
||||||
|
{
|
||||||
|
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||||
|
"preferred": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"php": ">=7.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"nyholm/psr7": "^1.3",
|
||||||
|
"phpunit/phpunit": "*",
|
||||||
|
"psr/http-message": "^1.0",
|
||||||
|
"vimeo/psalm": "*"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"JsonDecodeStream\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Mikhail Kulakovskiy",
|
||||||
|
"email": "m@klkvsk.ru"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "JSON streaming reader",
|
||||||
|
"homepage": "https://github.com/klkvsk/json-decode-stream",
|
||||||
|
"keywords": [
|
||||||
|
"decode",
|
||||||
|
"json",
|
||||||
|
"parse",
|
||||||
|
"stream"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/klkvsk/json-decode-stream/issues",
|
||||||
|
"source": "https://github.com/klkvsk/json-decode-stream/tree/v1.0.2"
|
||||||
|
},
|
||||||
|
"time": "2021-03-23T14:26:50+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "laminas/laminas-servicemanager",
|
||||||
|
"version": "3.6.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/laminas/laminas-servicemanager.git",
|
||||||
|
"reference": "b1445e1a7077c21b0fad0974a1b7a11b9dbe0828"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/b1445e1a7077c21b0fad0974a1b7a11b9dbe0828",
|
||||||
|
"reference": "b1445e1a7077c21b0fad0974a1b7a11b9dbe0828",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -553,9 +623,13 @@
|
|||||||
"container-interop/container-interop": "^1.2",
|
"container-interop/container-interop": "^1.2",
|
||||||
"laminas/laminas-stdlib": "^3.2.1",
|
"laminas/laminas-stdlib": "^3.2.1",
|
||||||
"laminas/laminas-zendframework-bridge": "^1.0",
|
"laminas/laminas-zendframework-bridge": "^1.0",
|
||||||
"php": "^5.6 || ^7.0",
|
"php": "^7.3 || ~8.0.0",
|
||||||
"psr/container": "^1.0"
|
"psr/container": "^1.0"
|
||||||
},
|
},
|
||||||
|
"conflict": {
|
||||||
|
"laminas/laminas-code": "<3.3.1",
|
||||||
|
"zendframework/zend-code": "<3.3.1"
|
||||||
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"container-interop/container-interop-implementation": "^1.2",
|
"container-interop/container-interop-implementation": "^1.2",
|
||||||
"psr/container-implementation": "^1.0"
|
"psr/container-implementation": "^1.0"
|
||||||
@ -564,27 +638,24 @@
|
|||||||
"zendframework/zend-servicemanager": "^3.4.0"
|
"zendframework/zend-servicemanager": "^3.4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"composer/package-versions-deprecated": "^1.0",
|
||||||
"laminas/laminas-coding-standard": "~1.0.0",
|
"laminas/laminas-coding-standard": "~1.0.0",
|
||||||
"mikey179/vfsstream": "^1.6.5",
|
"laminas/laminas-container-config-test": "^0.3",
|
||||||
"ocramius/proxy-manager": "^1.0 || ^2.0",
|
"laminas/laminas-dependency-plugin": "^2.1",
|
||||||
"phpbench/phpbench": "^0.13.0",
|
"mikey179/vfsstream": "^1.6.8",
|
||||||
"phpunit/phpunit": "^5.7.25 || ^6.4.4"
|
"ocramius/proxy-manager": "^2.2.3",
|
||||||
|
"phpbench/phpbench": "^1.0.0-alpha3",
|
||||||
|
"phpspec/prophecy-phpunit": "^2.0",
|
||||||
|
"phpunit/phpunit": "^9.4"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"laminas/laminas-stdlib": "laminas-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances",
|
"ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services"
|
||||||
"ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services"
|
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
"bin/generate-deps-for-config-factory",
|
"bin/generate-deps-for-config-factory",
|
||||||
"bin/generate-factory-for-class"
|
"bin/generate-factory-for-class"
|
||||||
],
|
],
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "3.3-dev",
|
|
||||||
"dev-develop": "4.0-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Laminas\\ServiceManager\\": "src/"
|
"Laminas\\ServiceManager\\": "src/"
|
||||||
@ -619,20 +690,20 @@
|
|||||||
"type": "community_bridge"
|
"type": "community_bridge"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-11T14:43:22+00:00"
|
"time": "2021-02-03T08:44:41+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laminas/laminas-stdlib",
|
"name": "laminas/laminas-stdlib",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laminas/laminas-stdlib.git",
|
"url": "https://github.com/laminas/laminas-stdlib.git",
|
||||||
"reference": "b9d84eaa39fde733356ea948cdef36c631f202b6"
|
"reference": "d81c7ffe602ed0e6ecb18691019111c0f4bf1efe"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/b9d84eaa39fde733356ea948cdef36c631f202b6",
|
"url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/d81c7ffe602ed0e6ecb18691019111c0f4bf1efe",
|
||||||
"reference": "b9d84eaa39fde733356ea948cdef36c631f202b6",
|
"reference": "d81c7ffe602ed0e6ecb18691019111c0f4bf1efe",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -651,15 +722,9 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"laminas/laminas-coding-standard": "~1.0.0",
|
"laminas/laminas-coding-standard": "~1.0.0",
|
||||||
"phpbench/phpbench": "^0.17.1",
|
"phpbench/phpbench": "^0.17.1",
|
||||||
"phpunit/phpunit": "^9.3.7"
|
"phpunit/phpunit": "~9.3.7"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "3.3.x-dev",
|
|
||||||
"dev-develop": "3.4.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Laminas\\Stdlib\\": "src/"
|
"Laminas\\Stdlib\\": "src/"
|
||||||
@ -689,20 +754,20 @@
|
|||||||
"type": "community_bridge"
|
"type": "community_bridge"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-08-25T09:08:16+00:00"
|
"time": "2020-11-19T20:18:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laminas/laminas-text",
|
"name": "laminas/laminas-text",
|
||||||
"version": "2.8.0",
|
"version": "2.8.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laminas/laminas-text.git",
|
"url": "https://github.com/laminas/laminas-text.git",
|
||||||
"reference": "76fccc8f79a6fb61689e96ab300566c0065deaaa"
|
"reference": "d696fa1fb3880b9b8f02c08be58685013b421608"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laminas/laminas-text/zipball/76fccc8f79a6fb61689e96ab300566c0065deaaa",
|
"url": "https://api.github.com/repos/laminas/laminas-text/zipball/d696fa1fb3880b9b8f02c08be58685013b421608",
|
||||||
"reference": "76fccc8f79a6fb61689e96ab300566c0065deaaa",
|
"reference": "d696fa1fb3880b9b8f02c08be58685013b421608",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -755,20 +820,20 @@
|
|||||||
"type": "community_bridge"
|
"type": "community_bridge"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-31T13:21:17+00:00"
|
"time": "2021-02-17T21:24:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laminas/laminas-zendframework-bridge",
|
"name": "laminas/laminas-zendframework-bridge",
|
||||||
"version": "1.1.1",
|
"version": "1.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
|
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
|
||||||
"reference": "6ede70583e101030bcace4dcddd648f760ddf642"
|
"reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642",
|
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32",
|
||||||
"reference": "6ede70583e101030bcace4dcddd648f760ddf642",
|
"reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -778,11 +843,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.6 || ^7.0 || ^8.0"
|
"php": "^7.3 || ^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3",
|
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3",
|
||||||
"squizlabs/php_codesniffer": "^3.5"
|
"psalm/plugin-phpunit": "^0.15.1",
|
||||||
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
|
"vimeo/psalm": "^4.6"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@ -821,7 +888,7 @@
|
|||||||
"type": "community_bridge"
|
"type": "community_bridge"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-09-14T14:23:00+00:00"
|
"time": "2021-02-25T21:54:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mathieuviossat/arraytotexttable",
|
"name": "mathieuviossat/arraytotexttable",
|
||||||
@ -882,16 +949,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "1.25.5",
|
"version": "1.26.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Seldaek/monolog.git",
|
"url": "https://github.com/Seldaek/monolog.git",
|
||||||
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0"
|
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/1817faadd1846cd08be9a49e905dc68823bc38c0",
|
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
|
||||||
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0",
|
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -913,7 +980,7 @@
|
|||||||
"graylog2/gelf-php": "~1.0",
|
"graylog2/gelf-php": "~1.0",
|
||||||
"php-amqplib/php-amqplib": "~2.4",
|
"php-amqplib/php-amqplib": "~2.4",
|
||||||
"php-console/php-console": "^3.1.3",
|
"php-console/php-console": "^3.1.3",
|
||||||
"php-parallel-lint/php-parallel-lint": "^1.0",
|
"phpstan/phpstan": "^0.12.59",
|
||||||
"phpunit/phpunit": "~4.5",
|
"phpunit/phpunit": "~4.5",
|
||||||
"ruflin/elastica": ">=0.90 <3.0",
|
"ruflin/elastica": ">=0.90 <3.0",
|
||||||
"sentry/sentry": "^0.13",
|
"sentry/sentry": "^0.13",
|
||||||
@ -933,11 +1000,6 @@
|
|||||||
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Monolog\\": "src/Monolog"
|
"Monolog\\": "src/Monolog"
|
||||||
@ -963,7 +1025,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/Seldaek/monolog/issues",
|
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||||
"source": "https://github.com/Seldaek/monolog/tree/1.25.5"
|
"source": "https://github.com/Seldaek/monolog/tree/1.26.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -975,7 +1037,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-23T08:35:51+00:00"
|
"time": "2020-12-14T12:56:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpoption/phpoption",
|
"name": "phpoption/phpoption",
|
||||||
@ -1054,16 +1116,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/container",
|
"name": "psr/container",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/container.git",
|
"url": "https://github.com/php-fig/container.git",
|
||||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
|
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -1073,14 +1135,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0"
|
"php": ">=7.2.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Container\\": "src/"
|
"Psr\\Container\\": "src/"
|
||||||
@ -1093,7 +1150,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "PHP-FIG",
|
"name": "PHP-FIG",
|
||||||
"homepage": "http://www.php-fig.org/"
|
"homepage": "https://www.php-fig.org/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||||
@ -1107,9 +1164,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/php-fig/container/issues",
|
"issues": "https://github.com/php-fig/container/issues",
|
||||||
"source": "https://github.com/php-fig/container/tree/master"
|
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||||
},
|
},
|
||||||
"time": "2017-02-14T16:28:37+00:00"
|
"time": "2021-03-05T17:36:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-message",
|
"name": "psr/http-message",
|
||||||
@ -1277,17 +1334,78 @@
|
|||||||
"time": "2019-03-08T08:55:37+00:00"
|
"time": "2019-03-08T08:55:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "sven/file-config",
|
||||||
"version": "v1.20.0",
|
"version": "v3.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/svenluijten/file-config.git",
|
||||||
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
|
"reference": "6151381cf8b4d18beecf6605f2db64226abe58d0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
|
"url": "https://api.github.com/repos/svenluijten/file-config/zipball/6151381cf8b4d18beecf6605f2db64226abe58d0",
|
||||||
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
|
"reference": "6151381cf8b4d18beecf6605f2db64226abe58d0",
|
||||||
|
"shasum": "",
|
||||||
|
"mirrors": [
|
||||||
|
{
|
||||||
|
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||||
|
"preferred": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"php": "^7.1 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"league/flysystem": "^2.0",
|
||||||
|
"phpunit/phpunit": "^7.5 || ^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Sven\\FileConfig\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Sven Luijten",
|
||||||
|
"email": "contact@svenluijten.com",
|
||||||
|
"homepage": "https://svenluijten.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Store and read configuration values using files on disk",
|
||||||
|
"keywords": [
|
||||||
|
"config",
|
||||||
|
"configuration",
|
||||||
|
"env",
|
||||||
|
"file",
|
||||||
|
"flat",
|
||||||
|
"flatfile",
|
||||||
|
"json"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/svenluijten/file-config/issues",
|
||||||
|
"source": "https://github.com/svenluijten/file-config/tree/v3.1.0"
|
||||||
|
},
|
||||||
|
"time": "2021-01-19T12:14:40+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-ctype",
|
||||||
|
"version": "v1.22.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
|
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
|
||||||
|
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -1305,7 +1423,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.20-dev"
|
"dev-main": "1.22-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1343,7 +1461,7 @@
|
|||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.20.0"
|
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1359,20 +1477,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-23T14:02:19+00:00"
|
"time": "2021-01-07T16:49:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-intl-idn",
|
"name": "symfony/polyfill-intl-idn",
|
||||||
"version": "v1.20.0",
|
"version": "v1.22.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||||
"reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117"
|
"reference": "2d63434d922daf7da8dd863e7907e67ee3031483"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483",
|
||||||
"reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117",
|
"reference": "2d63434d922daf7da8dd863e7907e67ee3031483",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -1392,7 +1510,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.20-dev"
|
"dev-main": "1.22-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1436,7 +1554,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.20.0"
|
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1452,20 +1570,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-23T14:02:19+00:00"
|
"time": "2021-01-22T09:19:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-intl-normalizer",
|
"name": "symfony/polyfill-intl-normalizer",
|
||||||
"version": "v1.20.0",
|
"version": "v1.22.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||||
"reference": "727d1096295d807c309fb01a851577302394c897"
|
"reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248",
|
||||||
"reference": "727d1096295d807c309fb01a851577302394c897",
|
"reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -1483,7 +1601,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.20-dev"
|
"dev-main": "1.22-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1526,7 +1644,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.20.0"
|
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1542,20 +1660,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-23T14:02:19+00:00"
|
"time": "2021-01-22T09:19:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php72",
|
"name": "symfony/polyfill-php72",
|
||||||
"version": "v1.20.0",
|
"version": "v1.22.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||||
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
|
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930",
|
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
|
||||||
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
|
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -1570,7 +1688,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.20-dev"
|
"dev-main": "1.22-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1608,7 +1726,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.20.0"
|
"source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1624,20 +1742,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-23T14:02:19+00:00"
|
"time": "2021-01-07T16:49:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/phpdotenv",
|
"name": "vlucas/phpdotenv",
|
||||||
"version": "v4.1.8",
|
"version": "v4.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vlucas/phpdotenv.git",
|
"url": "https://github.com/vlucas/phpdotenv.git",
|
||||||
"reference": "572af79d913627a9d70374d27a6f5d689a35de32"
|
"reference": "da64796370fc4eb03cc277088f6fede9fde88482"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/572af79d913627a9d70374d27a6f5d689a35de32",
|
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/da64796370fc4eb03cc277088f6fede9fde88482",
|
||||||
"reference": "572af79d913627a9d70374d27a6f5d689a35de32",
|
"reference": "da64796370fc4eb03cc277088f6fede9fde88482",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -1655,7 +1773,7 @@
|
|||||||
"bamarni/composer-bin-plugin": "^1.4.1",
|
"bamarni/composer-bin-plugin": "^1.4.1",
|
||||||
"ext-filter": "*",
|
"ext-filter": "*",
|
||||||
"ext-pcre": "*",
|
"ext-pcre": "*",
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0"
|
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-filter": "Required to use the boolean validator.",
|
"ext-filter": "Required to use the boolean validator.",
|
||||||
@ -1696,7 +1814,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/vlucas/phpdotenv/issues",
|
"issues": "https://github.com/vlucas/phpdotenv/issues",
|
||||||
"source": "https://github.com/vlucas/phpdotenv/tree/4.1"
|
"source": "https://github.com/vlucas/phpdotenv/tree/v4.2.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1708,7 +1826,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-14T19:22:52+00:00"
|
"time": "2021-01-20T15:11:48+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|||||||
@ -18,35 +18,59 @@ COOKIE=
|
|||||||
# 功能设置 #
|
# 功能设置 #
|
||||||
#######################
|
#######################
|
||||||
|
|
||||||
# 主站助手
|
# 主站每日任务(每日登录、观看、投币、分享)
|
||||||
USE_MASTER_SITE=true
|
USE_MAIN_SITE=true
|
||||||
|
|
||||||
# 统一活动
|
# 直播大乱斗
|
||||||
USE_ACTIVE=true
|
|
||||||
|
|
||||||
# 舰长总督
|
|
||||||
USE_GUARD=true
|
|
||||||
|
|
||||||
# 大乱斗
|
|
||||||
USE_PK=true
|
USE_PK=true
|
||||||
|
|
||||||
|
# 直播箱子实物抽奖
|
||||||
|
USE_LIVE_BOX=true
|
||||||
|
|
||||||
|
# 每日24个小心心|依赖加密心跳服务器
|
||||||
|
USE_HEARTBEAT=true
|
||||||
|
|
||||||
|
# 直播扭蛋活动抽奖|依赖加密心跳服务器
|
||||||
|
USE_CAPSULE=true
|
||||||
|
|
||||||
|
# 主站九宫格抽奖活动助手
|
||||||
|
USE_ACTIVITY=true
|
||||||
|
|
||||||
|
# 银瓜子兑换硬币
|
||||||
|
USE_SILVER2COIN=true
|
||||||
|
|
||||||
|
# 风纪委员
|
||||||
|
USE_JUDGE=false
|
||||||
|
|
||||||
|
# 直播统一活动
|
||||||
|
USE_ACTIVE=false
|
||||||
|
|
||||||
|
# 直播舰长总督
|
||||||
|
USE_GUARD=false
|
||||||
|
|
||||||
|
# 漫画助手
|
||||||
|
USE_MANGA=false
|
||||||
|
|
||||||
|
# 赛事助手
|
||||||
|
USE_MATCH=false
|
||||||
|
|
||||||
|
# 节奏风暴|丢弃率(0-100)|尝试数(范围值)
|
||||||
|
USE_STORM=true
|
||||||
|
STORM_DROPRATE=0
|
||||||
|
STORM_ATTEMPT=10,20
|
||||||
|
|
||||||
|
# 破产机|每日竞猜次数|每次竞猜硬币(1-10)|下注(1.压大,2.压小,3.随机)
|
||||||
|
USE_COMPETITION=false
|
||||||
|
COMPET_MAX_NUM=20
|
||||||
|
COMPET_MAX_COIN=10
|
||||||
|
COMPET_STAKE=1
|
||||||
|
|
||||||
# 天选时刻|抽取类型(0: 无限制; 1: 关注主播; 2: 粉丝勋章; 3大航海; 4用户等级;5主站等级)|自动取关(测试功能)|过滤关键词|逗号分隔
|
# 天选时刻|抽取类型(0: 无限制; 1: 关注主播; 2: 粉丝勋章; 3大航海; 4用户等级;5主站等级)|自动取关(测试功能)|过滤关键词|逗号分隔
|
||||||
USE_ANCHOR=false
|
USE_ANCHOR=false
|
||||||
ANCHOR_UNFOLLOW=false
|
ANCHOR_UNFOLLOW=false
|
||||||
ANCHOR_TYPE=0,1
|
ANCHOR_TYPE=0,1
|
||||||
ANCHOR_FILTER_WORDS=
|
ANCHOR_FILTER_WORDS=
|
||||||
|
|
||||||
# 实物抽奖
|
|
||||||
USE_MO=true
|
|
||||||
|
|
||||||
# 银瓜子兑换硬币
|
|
||||||
USE_SILVER2COIN=true
|
|
||||||
|
|
||||||
# 节奏风暴|丢弃率(0-100)|尝试数(范围值)
|
|
||||||
USE_STORM=true
|
|
||||||
STORM_DROPRATE=0
|
|
||||||
STORM_ATTEMPT=30,50
|
|
||||||
|
|
||||||
# 活跃弹幕|弹幕房间(为空则随机)|弹幕内容(为空则随机)
|
# 活跃弹幕|弹幕房间(为空则随机)|弹幕内容(为空则随机)
|
||||||
USE_DANMU=true
|
USE_DANMU=true
|
||||||
DANMU_ROOMID=9522051
|
DANMU_ROOMID=9522051
|
||||||
@ -57,34 +81,37 @@ USE_ADD_COIN=false
|
|||||||
ADD_COIN_MODE=random
|
ADD_COIN_MODE=random
|
||||||
ADD_COIN_NUM=5
|
ADD_COIN_NUM=5
|
||||||
|
|
||||||
# 休眠时间|时间区间(0-23)|逗号分隔
|
|
||||||
USE_SLEEP=true
|
|
||||||
SLEEP_SECTION=2,3,4,5,6
|
|
||||||
|
|
||||||
# 漫画助手
|
|
||||||
USE_MANGA=false
|
|
||||||
|
|
||||||
# 赛事助手
|
|
||||||
USE_MATCH=false
|
|
||||||
|
|
||||||
# 活动助手
|
|
||||||
USE_ACTIVITY=false
|
|
||||||
|
|
||||||
# 破产机|每日竞猜次数|每次竞猜硬币(1-10)|下注(1.压大,2.压小,3.随机)
|
|
||||||
USE_COMPETITION=false
|
|
||||||
COMPET_MAX_NUM=20
|
|
||||||
COMPET_MAX_COIN=10
|
|
||||||
COMPET_STAKE=1
|
|
||||||
|
|
||||||
# 风纪委员
|
|
||||||
USE_JUDGE=false
|
|
||||||
|
|
||||||
# 自动转发抽奖动态
|
# 自动转发抽奖动态
|
||||||
AUTO_DYNAMIC = false
|
AUTO_DYNAMIC = false
|
||||||
# 自动取关未中奖动态
|
# 自动取关未中奖动态
|
||||||
CLEAR_DYNAMIC = false
|
CLEAR_DYNAMIC = false
|
||||||
# 强制清除抽奖组关注
|
# 强制清除抽奖组关注
|
||||||
CLEAR_GROUP_FOLLOW = false
|
CLEAR_GROUP_FOLLOW = false
|
||||||
|
# 更改自动回复语言
|
||||||
|
AUTO_REPLY_TEXT = 从未中奖,从未放弃[doge]
|
||||||
|
|
||||||
|
# 休眠时间|时间区间(0-23)|逗号分隔
|
||||||
|
USE_SLEEP=true
|
||||||
|
SLEEP_SECTION=2,3,4,5,6
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# 通知设置 #
|
||||||
|
#######################
|
||||||
|
|
||||||
|
# 消息推送|消息推送过滤词|逗号分割|优先级从上到下
|
||||||
|
USE_NOTIFY=false
|
||||||
|
NOTIFY_FILTER_WORDS=
|
||||||
|
## Dingtalk机器人|token|依赖USE_NOTIFY
|
||||||
|
NOTIFY_DINGTALK_TOKEN=
|
||||||
|
## Tele机器人|token|chatid|依赖USE_NOTIFY
|
||||||
|
NOTIFY_TELE_BOTTOKEN=
|
||||||
|
NOTIFY_TELE_CHATID=
|
||||||
|
## Pushplus酱|token|依赖USE_NOTIFY
|
||||||
|
NOTIFY_PUSHPLUS_TOKEN=
|
||||||
|
## Sever酱(原版)|令牌Key|依赖USE_NOTIFY
|
||||||
|
NOTIFY_SCKEY=
|
||||||
|
## Server酱(Turbo版)|令牌Key|依赖USE_NOTIFY
|
||||||
|
NOTIFY_SCTKEY=
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# 基础设置 #
|
# 基础设置 #
|
||||||
@ -99,14 +126,8 @@ ALONE_SERVER_KEY=
|
|||||||
USE_ZONE_SERVER=true
|
USE_ZONE_SERVER=true
|
||||||
ZONE_SERVER_ADDR=tcp://broadcastlv.chat.bilibili.com:2243/sub
|
ZONE_SERVER_ADDR=tcp://broadcastlv.chat.bilibili.com:2243/sub
|
||||||
|
|
||||||
# SERVER酱|令牌KEY|过滤关键词|逗号分隔
|
# 加密心跳服务器(开源)|如失效自行搭建
|
||||||
USE_SC=false
|
ENC_SERVER=http://heartbeat-1.mudew.com:3000/enc
|
||||||
SC_KEY=
|
|
||||||
SC_FILTER_WORDS=
|
|
||||||
|
|
||||||
# 小心心|加密服务器(开源)|
|
|
||||||
USE_HEARTBEAT=true
|
|
||||||
ENC_SERVER=http://116.85.43.27:3000/enc
|
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# 房间设置 #
|
# 房间设置 #
|
||||||
@ -140,10 +161,10 @@ NETWORK_PROXY=http://127.0.0.1:8888
|
|||||||
#######################
|
#######################
|
||||||
|
|
||||||
# 写入日志
|
# 写入日志
|
||||||
APP_WRITELOG=false
|
APP_WRITE_LOG=false
|
||||||
|
|
||||||
# 日志路径
|
# 日志路径
|
||||||
APP_WRITELOGPATH=log
|
APP_LOG_PATH=log
|
||||||
|
|
||||||
# 调试模式
|
# 调试模式
|
||||||
APP_DEBUG=false
|
APP_DEBUG=false
|
||||||
|
|||||||
81
data/activity_infos.json
Normal file
81
data/activity_infos.json
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"remarks": "有需要可以自己添加,或者提pr",
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"_url": "注释: 活动地址",
|
||||||
|
"url": "https://www.bilibili.com/blackboard/activity-S9PC.html",
|
||||||
|
"_title": "注释: 活动标题",
|
||||||
|
"title": "vivo S9系列照亮我的美",
|
||||||
|
"_description": "注释: 活动描述",
|
||||||
|
"description": "vivo S9系列照亮我的美",
|
||||||
|
"_sid": "注释: 活动SID",
|
||||||
|
"sid": "f3ae9322-817d-11eb-8597-246e966235d8",
|
||||||
|
"_login": "注释: 登录+1次机会",
|
||||||
|
"login": "true",
|
||||||
|
"_follow": "注释: 关注+1次机会",
|
||||||
|
"follow": "false",
|
||||||
|
"_share": "注释: 分享+1次机会",
|
||||||
|
"share": "true",
|
||||||
|
"_draw_times": "抽奖次数",
|
||||||
|
"draw_times": 2,
|
||||||
|
"_expire_at": "注释: 到期时间",
|
||||||
|
"expire_at": "2021-03-30 23:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.bilibili.com/blackboard/BDF2021.html",
|
||||||
|
"title": "哔哩哔哩舞蹈嘉年华2021",
|
||||||
|
"description": "BDF2021等你来玩!活动期间每天分享页面,新增一次机会。",
|
||||||
|
"sid": "12a6d7e9-7813-11eb-8597-246e966235d8",
|
||||||
|
"login": "true",
|
||||||
|
"follow": "false",
|
||||||
|
"share": "true",
|
||||||
|
"draw_times": 1,
|
||||||
|
"expire_at": "2021-07-15 11:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.bilibili.com/blackboard/activity-nA2uYrmpfA.html",
|
||||||
|
"title": "哥斯拉金刚你站谁",
|
||||||
|
"description": "活动期间每天分享页面,新增一次机会。",
|
||||||
|
"sid": "f851e27a-858e-11eb-8597-246e966235d8",
|
||||||
|
"login": "true",
|
||||||
|
"follow": "false",
|
||||||
|
"share": "true",
|
||||||
|
"draw_times": 2,
|
||||||
|
"expire_at": "2021-04-15 11:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.bilibili.com/blackboard/activity-QEya2bouhQ.html",
|
||||||
|
"title": "春日嗑糖大作战",
|
||||||
|
"description": "活动期间每天分享页面,新增一次机会。",
|
||||||
|
"sid": "20b0dfaf-8bcd-11eb-8597-246e966235d8",
|
||||||
|
"login": "true",
|
||||||
|
"follow": "false",
|
||||||
|
"share": "true",
|
||||||
|
"draw_times": 2,
|
||||||
|
"expire_at": "2021-05-05 23:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.bilibili.com/blackboard/activity-YxhUEb7UwQ.html",
|
||||||
|
"title": "种草大作战特别篇",
|
||||||
|
"description": "活动期间每天分享页面,新增一次机会。",
|
||||||
|
"sid": "0cc8ffd7-8d56-11eb-8597-246e966235d8",
|
||||||
|
"login": "true",
|
||||||
|
"follow": "false",
|
||||||
|
"share": "true",
|
||||||
|
"draw_times": 2,
|
||||||
|
"expire_at": "2021-01-01 11:11:11",
|
||||||
|
"remarks": "2021年4月02日开始,先指定为过期。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.bilibili.com/blackboard/activity-M22oqFLY1w.html",
|
||||||
|
"title": "最强搞事王",
|
||||||
|
"description": "活动期间每天分享页面,新增一次机会。",
|
||||||
|
"sid": "e168f825-8be6-11eb-8597-246e966235d8",
|
||||||
|
"login": "true",
|
||||||
|
"follow": "false",
|
||||||
|
"share": "true",
|
||||||
|
"draw_times": 1,
|
||||||
|
"expire_at": "2021-04-23 23:59:59"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
77
data/capsule_infos.json
Normal file
77
data/capsule_infos.json
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"pool": "https://api.live.bilibili.com/xlive/web-ucenter/v1/capsule/get_pool_detail?pool_id=131&_=1616829671726",
|
||||||
|
"v3": "https://api.live.bilibili.com/xlive/web-ucenter/v1/capsule/get_capsule_info_v3?id=79&from=web&_=1608110093802",
|
||||||
|
"remarks": "有需要可以自己添加,或者提pr",
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"_url": "注释: 活动地址",
|
||||||
|
"url": "https://www.bilibili.com/blackboard/activity-c_fu2inm-.html",
|
||||||
|
"_title": "注释: 活动标题",
|
||||||
|
"title": "原神1.4版本「风花的邀约」激励计划",
|
||||||
|
"_description": "注释: 活动描述",
|
||||||
|
"description": "每日在原神分区任意直播间观看,20分钟1张、1小时2张、2小时3张,每日最高6张。",
|
||||||
|
"_room_id": "注释: 活动直播间,如果为0,则取分区随机一个",
|
||||||
|
"room_id": 0,
|
||||||
|
"_area_id": "注释: 子分区id",
|
||||||
|
"area_id": 321,
|
||||||
|
"_parent_area_id": "注释: 主分区id",
|
||||||
|
"parent_area_id": 3,
|
||||||
|
"_coin_id": "注释: 抽奖id",
|
||||||
|
"coin_id": 112,
|
||||||
|
"_watch_time": "注释: 观看时长 单位秒",
|
||||||
|
"watch_time": 7320,
|
||||||
|
"_draw_times": "注释: 抽奖次数",
|
||||||
|
"draw_times": 1,
|
||||||
|
"_expire_at": "注释: 活动有效时间",
|
||||||
|
"expire_at": "2021-04-27 23:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.bilibili.com/blackboard/activity-MHRISE.html",
|
||||||
|
"title": "《怪物猎人:崛起》直播挑战",
|
||||||
|
"description": "每日在怪物猎人分区任意直播间观看,10分钟1张、30分钟3张、60分钟5张",
|
||||||
|
"room_id": 0,
|
||||||
|
"area_id": 412,
|
||||||
|
"parent_area_id": 6,
|
||||||
|
"coin_id": 121,
|
||||||
|
"watch_time": 3720,
|
||||||
|
"draw_times": 9,
|
||||||
|
"expire_at": "2021-04-26 23:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://live.bilibili.com/11218604",
|
||||||
|
"title": "PGI全球邀请赛",
|
||||||
|
"description": "每日在PGI直播间观看,10分钟1张",
|
||||||
|
"room_id": 11218604,
|
||||||
|
"area_id": 0,
|
||||||
|
"parent_area_id": 2,
|
||||||
|
"coin_id": 91,
|
||||||
|
"watch_time": 3720,
|
||||||
|
"draw_times": 6,
|
||||||
|
"expire_at": "2021-03-28 23:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://live.bilibili.com/blackboard/2021-lpl-main.html",
|
||||||
|
"title": "2021LPL春季赛",
|
||||||
|
"description": "每日在LOL直播间观看,5分钟1张,15分钟1张",
|
||||||
|
"room_id": 7734200,
|
||||||
|
"area_id": 86,
|
||||||
|
"parent_area_id": 2,
|
||||||
|
"coin_id": 76,
|
||||||
|
"watch_time": 3720,
|
||||||
|
"draw_times": 3,
|
||||||
|
"expire_at": "2021-03-28 23:59:59"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://live.bilibili.com/23",
|
||||||
|
"title": "PEL和平精英职业联赛",
|
||||||
|
"description": "每日在PEL直播间观看,5分钟1张",
|
||||||
|
"room_id": 13242892,
|
||||||
|
"area_id": 0,
|
||||||
|
"parent_area_id": 2,
|
||||||
|
"coin_id": 109,
|
||||||
|
"watch_time": 3720,
|
||||||
|
"draw_times": 6,
|
||||||
|
"expire_at": "2021-04-11 23:59:59"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
225
data/filter_words.json
Normal file
225
data/filter_words.json
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
{
|
||||||
|
"MaterialObject": {
|
||||||
|
"sensitive": [
|
||||||
|
"测试",
|
||||||
|
"加密",
|
||||||
|
"test",
|
||||||
|
"TEST",
|
||||||
|
"钓鱼",
|
||||||
|
"炸鱼",
|
||||||
|
"调试",
|
||||||
|
"123",
|
||||||
|
"1111",
|
||||||
|
"测试",
|
||||||
|
"測試",
|
||||||
|
"Test",
|
||||||
|
"测一测",
|
||||||
|
"ce-shi",
|
||||||
|
"test",
|
||||||
|
"T-E-S-T",
|
||||||
|
"lala",
|
||||||
|
"我是抽奖标题",
|
||||||
|
"压测",
|
||||||
|
"測一測",
|
||||||
|
"t-e-s-t"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Anchor": {
|
||||||
|
"default": [
|
||||||
|
"拉黑",
|
||||||
|
"黑名单",
|
||||||
|
"脸皮厚",
|
||||||
|
"没有奖品",
|
||||||
|
"无奖",
|
||||||
|
"脸皮厚",
|
||||||
|
"ceshi",
|
||||||
|
"测试",
|
||||||
|
"测试",
|
||||||
|
"测试",
|
||||||
|
"脚本",
|
||||||
|
"抽奖号",
|
||||||
|
"星段位",
|
||||||
|
"星段位",
|
||||||
|
"圣晶石",
|
||||||
|
"圣晶石",
|
||||||
|
"水晶",
|
||||||
|
"水晶",
|
||||||
|
"万兴神剪手",
|
||||||
|
"万兴神剪手",
|
||||||
|
"自付邮费",
|
||||||
|
"自付邮费",
|
||||||
|
"test",
|
||||||
|
"Test",
|
||||||
|
"TEST",
|
||||||
|
"加密",
|
||||||
|
"QQ",
|
||||||
|
"测试",
|
||||||
|
"測試",
|
||||||
|
"VX",
|
||||||
|
"vx",
|
||||||
|
"ce",
|
||||||
|
"shi",
|
||||||
|
"这是一个",
|
||||||
|
"lalall",
|
||||||
|
"第一波",
|
||||||
|
"第二波",
|
||||||
|
"第三波",
|
||||||
|
"测试用",
|
||||||
|
"抽奖标题",
|
||||||
|
"策是",
|
||||||
|
"房间抽奖",
|
||||||
|
"CESHI",
|
||||||
|
"ceshi",
|
||||||
|
"奖品A",
|
||||||
|
"奖品B",
|
||||||
|
"奖品C",
|
||||||
|
"硬币",
|
||||||
|
"无奖品",
|
||||||
|
"白名单",
|
||||||
|
"我是抽奖",
|
||||||
|
"0.1",
|
||||||
|
"五毛二",
|
||||||
|
"一分",
|
||||||
|
"一毛",
|
||||||
|
"0.52",
|
||||||
|
"0.66",
|
||||||
|
"0.01",
|
||||||
|
"0.77",
|
||||||
|
"0.16",
|
||||||
|
"照片",
|
||||||
|
"穷",
|
||||||
|
"0.5",
|
||||||
|
"0.88",
|
||||||
|
"双排",
|
||||||
|
"1毛",
|
||||||
|
"1分",
|
||||||
|
"1角",
|
||||||
|
"P口罩",
|
||||||
|
"素颜",
|
||||||
|
"写真",
|
||||||
|
"图包",
|
||||||
|
"五毛",
|
||||||
|
"一角",
|
||||||
|
"冥币",
|
||||||
|
"自拍",
|
||||||
|
"日历",
|
||||||
|
"0.22",
|
||||||
|
"加速器",
|
||||||
|
"越南盾",
|
||||||
|
"毛",
|
||||||
|
"分",
|
||||||
|
"限",
|
||||||
|
"0.",
|
||||||
|
"角",
|
||||||
|
"〇点",
|
||||||
|
"①元",
|
||||||
|
"一起玩",
|
||||||
|
"不包邮",
|
||||||
|
"邮费",
|
||||||
|
"续期卡",
|
||||||
|
"儿时",
|
||||||
|
"闪宠",
|
||||||
|
"大师球",
|
||||||
|
"一元",
|
||||||
|
"两元",
|
||||||
|
"两块",
|
||||||
|
"赛车",
|
||||||
|
"代币",
|
||||||
|
"一块",
|
||||||
|
"一局",
|
||||||
|
"好友位",
|
||||||
|
"通话",
|
||||||
|
"首胜",
|
||||||
|
"代金券",
|
||||||
|
"辣条",
|
||||||
|
"补贴",
|
||||||
|
"抵用券",
|
||||||
|
"主播素颜照",
|
||||||
|
"武器箱棺材板",
|
||||||
|
"游戏道具",
|
||||||
|
"优惠券",
|
||||||
|
"日元",
|
||||||
|
"发音课",
|
||||||
|
"壹元",
|
||||||
|
"零点",
|
||||||
|
"舰长五折券",
|
||||||
|
"上车",
|
||||||
|
"没有钱",
|
||||||
|
"女装",
|
||||||
|
"肥宅快乐水",
|
||||||
|
"哥斯拉",
|
||||||
|
"公主连结",
|
||||||
|
"pokemmo",
|
||||||
|
"宝可>梦",
|
||||||
|
"明日方舟",
|
||||||
|
"雪碧",
|
||||||
|
"公主连接",
|
||||||
|
"专属头衔",
|
||||||
|
"FF14",
|
||||||
|
"韩元",
|
||||||
|
"空洞骑士",
|
||||||
|
"老婆饼",
|
||||||
|
"稀世时装",
|
||||||
|
"洛克衣服",
|
||||||
|
"帮过图",
|
||||||
|
"证件照",
|
||||||
|
"自抽号",
|
||||||
|
"晶耀之星",
|
||||||
|
"伊洛纳",
|
||||||
|
"〇.",
|
||||||
|
"②元",
|
||||||
|
"③元",
|
||||||
|
"0·",
|
||||||
|
"繁华美化",
|
||||||
|
"喵喵喵",
|
||||||
|
"闪伊布",
|
||||||
|
"①圆",
|
||||||
|
"o点",
|
||||||
|
"金达摩",
|
||||||
|
"嗷呜",
|
||||||
|
"游戏位",
|
||||||
|
"S-追光者",
|
||||||
|
"OWL",
|
||||||
|
"勾玉",
|
||||||
|
"跟yo宝游戏",
|
||||||
|
"三元",
|
||||||
|
"怡宝",
|
||||||
|
"蛋闪迷>你冰",
|
||||||
|
"哥伦比亚比索",
|
||||||
|
"油条",
|
||||||
|
"代金卷",
|
||||||
|
"小堂包",
|
||||||
|
"返现券",
|
||||||
|
"上舰",
|
||||||
|
"舰长",
|
||||||
|
"开舰",
|
||||||
|
"帅照",
|
||||||
|
"靓照",
|
||||||
|
"1元红包",
|
||||||
|
"红包3.3元",
|
||||||
|
"5.2元红包",
|
||||||
|
"2.33元红包"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CapsuleLottery": {
|
||||||
|
"default": [
|
||||||
|
"谢谢参与",
|
||||||
|
"未中奖",
|
||||||
|
"辣条"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ActivityLottery": {
|
||||||
|
"default": [
|
||||||
|
"谢谢参与",
|
||||||
|
"未中奖",
|
||||||
|
"辣条"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Notice": {
|
||||||
|
"default": [
|
||||||
|
"谢谢参与",
|
||||||
|
"未中奖",
|
||||||
|
"辣条"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -14,6 +14,6 @@ require 'vendor/autoload.php';
|
|||||||
|
|
||||||
$filename = isset($argv[1]) ? $argv[1] : 'user.conf';
|
$filename = isset($argv[1]) ? $argv[1] : 'user.conf';
|
||||||
|
|
||||||
$app = new BiliHelper\Core\App();
|
$app = new BiliHelper\Core\App(__DIR__);
|
||||||
$app->load(__DIR__, $filename);
|
$app->load($filename);
|
||||||
$app->start();
|
$app->start();
|
||||||
|
|||||||
@ -19,21 +19,23 @@ class App
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* App constructor.
|
* App constructor.
|
||||||
|
* @param string $app_path
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct(string $app_path)
|
||||||
{
|
{
|
||||||
|
define('APP_CONF_PATH', $app_path . "/conf/");
|
||||||
|
define('APP_DATA_PATH', $app_path . "/data/");
|
||||||
|
define('APP_LOG_PATH', $app_path . "/log/");
|
||||||
(new Env())->inspect_configure()->inspect_extension();
|
(new Env())->inspect_configure()->inspect_extension();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @use 加载配置
|
* @use 加载配置
|
||||||
* @param $app_path
|
|
||||||
* @param string $load_file
|
* @param string $load_file
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function load($app_path, $load_file = 'user.conf')
|
public function load($load_file = 'user.conf')
|
||||||
{
|
{
|
||||||
define('APP_PATH', $app_path);
|
|
||||||
Config::load($load_file);
|
Config::load($load_file);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -69,12 +71,11 @@ class App
|
|||||||
'MasterSite',
|
'MasterSite',
|
||||||
'Daily',
|
'Daily',
|
||||||
'ManGa',
|
'ManGa',
|
||||||
'Match',
|
'GameMatch',
|
||||||
'ActivityLottery',
|
'ActivityLottery',
|
||||||
'Competition',
|
'Competition',
|
||||||
'Heart',
|
'Heart',
|
||||||
'Task',
|
'DailyTask',
|
||||||
// 'Silver',
|
|
||||||
'Barrage',
|
'Barrage',
|
||||||
'Silver2Coin',
|
'Silver2Coin',
|
||||||
'Judge',
|
'Judge',
|
||||||
@ -92,7 +93,10 @@ class App
|
|||||||
'AnchorRaffle',
|
'AnchorRaffle',
|
||||||
'AwardRecord',
|
'AwardRecord',
|
||||||
'Statistics',
|
'Statistics',
|
||||||
'Forward'
|
'Forward',
|
||||||
|
'CapsuleLottery',
|
||||||
|
// 'Silver',
|
||||||
|
|
||||||
];
|
];
|
||||||
foreach ($plugins as $plugin) {
|
foreach ($plugins as $plugin) {
|
||||||
$this->newTask($plugin);
|
$this->newTask($plugin);
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class Config
|
|||||||
*/
|
*/
|
||||||
private static function _load($load_file)
|
private static function _load($load_file)
|
||||||
{
|
{
|
||||||
$config_path = str_replace("\\", "/", APP_PATH . "/conf/{$load_file}");
|
$config_path = str_replace("\\", "/", APP_CONF_PATH . $load_file);
|
||||||
if (!is_file($config_path)) {
|
if (!is_file($config_path)) {
|
||||||
die("配置文件 {$load_file} 加载错误,请参照文档添加配置文件!");
|
die("配置文件 {$load_file} 加载错误,请参照文档添加配置文件!");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ class Curl
|
|||||||
'timeout' => $timeout,
|
'timeout' => $timeout,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$result = @file_get_contents($url, false, stream_context_create($options));
|
$result = $url ? @file_get_contents($url, false, stream_context_create($options)) : null;
|
||||||
Log::debug($result);
|
Log::debug($result);
|
||||||
return $result ? $result : null;
|
return $result ? $result : null;
|
||||||
}
|
}
|
||||||
@ -243,7 +243,7 @@ class Curl
|
|||||||
'Connection' => 'keep-alive',
|
'Connection' => 'keep-alive',
|
||||||
// 'Content-Type' => 'application/x-www-form-urlencoded',
|
// 'Content-Type' => 'application/x-www-form-urlencoded',
|
||||||
// 'User-Agent' => 'Mozilla/5.0 BiliDroid/5.51.1 (bbcallen@gmail.com)',
|
// 'User-Agent' => 'Mozilla/5.0 BiliDroid/5.51.1 (bbcallen@gmail.com)',
|
||||||
'User-Agent' => 'Mozilla/5.0 BiliDroid/6.17.1 (bbcallen@gmail.com) os/android model/MuMu mobi_app/android build/6171000 channel/bili innerVer/6171000 osVer/6.0.1 network/2',
|
'User-Agent' => 'Mozilla/5.0 BiliDroid/6.20.5 (bbcallen@gmail.com) os/android model/MuMu mobi_app/android build/6205500 channel/bili innerVer/6205500 osVer/6.0.1 network/2',
|
||||||
// 'Referer' => 'https://live.bilibili.com/',
|
// 'Referer' => 'https://live.bilibili.com/',
|
||||||
];
|
];
|
||||||
$pc_headers = [
|
$pc_headers = [
|
||||||
@ -251,11 +251,11 @@ class Curl
|
|||||||
'Accept-Encoding' => 'gzip, deflate',
|
'Accept-Encoding' => 'gzip, deflate',
|
||||||
'Accept-Language' => "zh-CN,zh;q=0.9",
|
'Accept-Language' => "zh-CN,zh;q=0.9",
|
||||||
// 'Content-Type' => 'application/x-www-form-urlencoded',
|
// 'Content-Type' => 'application/x-www-form-urlencoded',
|
||||||
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4056.0 Safari/537.36 Edg/82.0.431.0',
|
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.30 Safari/537.36 Edg/90.0.818.8',
|
||||||
// 'Referer' => 'https://live.bilibili.com/',
|
// 'Referer' => 'https://live.bilibili.com/',
|
||||||
];
|
];
|
||||||
$other_headers = [
|
$other_headers = [
|
||||||
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36',
|
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4450.0 Safari/537.36',
|
||||||
];
|
];
|
||||||
$default_headers = isset(${$os . "_headers"}) ? ${$os . "_headers"} : $other_headers;
|
$default_headers = isset(${$os . "_headers"}) ? ${$os . "_headers"} : $other_headers;
|
||||||
if (in_array($os, ['app', 'pc']) && getenv('COOKIE') != "") {
|
if (in_array($os, ['app', 'pc']) && getenv('COOKIE') != "") {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ namespace BiliHelper\Core;
|
|||||||
class Env
|
class Env
|
||||||
{
|
{
|
||||||
private $app_name = 'BiliHelper Personal';
|
private $app_name = 'BiliHelper Personal';
|
||||||
private $app_version = '0.7.0.*';
|
private $app_version = '0.8.0.*';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Env constructor.
|
* Env constructor.
|
||||||
@ -58,9 +58,9 @@ class Env
|
|||||||
if (version_compare(PHP_VERSION, '7.0.0', '<')) {
|
if (version_compare(PHP_VERSION, '7.0.0', '<')) {
|
||||||
die("Please upgrade PHP version > 7.0.0 .");
|
die("Please upgrade PHP version > 7.0.0 .");
|
||||||
}
|
}
|
||||||
if (version_compare(PHP_VERSION, '8.0.0', '>')) {
|
// if (version_compare(PHP_VERSION, '8.0.0', '>')) {
|
||||||
die("Please upgrade PHP version < 8.0.0 .");
|
// die("Please upgrade PHP version < 8.0.0 .");
|
||||||
}
|
// }
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,6 @@ namespace BiliHelper\Core;
|
|||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Monolog\Handler\StreamHandler;
|
use Monolog\Handler\StreamHandler;
|
||||||
use Bramus\Monolog\Formatter\ColoredLineFormatter;
|
use Bramus\Monolog\Formatter\ColoredLineFormatter;
|
||||||
use function GuzzleHttp\Psr7\str;
|
|
||||||
|
|
||||||
class Log
|
class Log
|
||||||
{
|
{
|
||||||
@ -27,7 +26,7 @@ class Log
|
|||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function configureInstance()
|
private static function configureInstance()
|
||||||
{
|
{
|
||||||
$logger = new Logger('BH');
|
$logger = new Logger('BH');
|
||||||
$handler = new StreamHandler('php://stdout', getenv('APP_DEBUG') == 'true' ? Logger::DEBUG : Logger::INFO);
|
$handler = new StreamHandler('php://stdout', getenv('APP_DEBUG') == 'true' ? Logger::DEBUG : Logger::INFO);
|
||||||
@ -46,8 +45,8 @@ class Log
|
|||||||
|
|
||||||
private static function writeLog($type, $message)
|
private static function writeLog($type, $message)
|
||||||
{
|
{
|
||||||
if (getenv('APP_WRITELOG') == 'true') {
|
if (getenv('APP_WRITE_LOG') == 'true') {
|
||||||
$path = './' . getenv("APP_WRITELOGPATH") . '/';
|
$path = './' . getenv("APP_LOG_PATH") . '/';
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
mkdir($path);
|
mkdir($path);
|
||||||
chmod($path, 0777);
|
chmod($path, 0777);
|
||||||
@ -57,7 +56,12 @@ class Log
|
|||||||
$data = $date . ' Log.' . $type . ' ' . $message . PHP_EOL;
|
$data = $date . ' Log.' . $type . ' ' . $message . PHP_EOL;
|
||||||
file_put_contents($filename, $data, FILE_APPEND);
|
file_put_contents($filename, $data, FILE_APPEND);
|
||||||
}
|
}
|
||||||
return;
|
}
|
||||||
|
|
||||||
|
private static function backtrace(): string
|
||||||
|
{
|
||||||
|
$backtraces = debug_backtrace();
|
||||||
|
return "(". pathinfo(basename($backtraces[1]['file']))['filename'] . ") => ";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function debug($message, array $context = [])
|
public static function debug($message, array $context = [])
|
||||||
@ -68,7 +72,7 @@ class Log
|
|||||||
|
|
||||||
public static function info($message, array $context = [])
|
public static function info($message, array $context = [])
|
||||||
{
|
{
|
||||||
$message = self::prefix() . $message;
|
$message = self::prefix() .self::backtrace() . $message;
|
||||||
self::writeLog('INFO', $message);
|
self::writeLog('INFO', $message);
|
||||||
self::getLogger()->addInfo($message, $context);
|
self::getLogger()->addInfo($message, $context);
|
||||||
self::callback(Logger::INFO, 'INFO', $message);
|
self::callback(Logger::INFO, 'INFO', $message);
|
||||||
@ -76,7 +80,7 @@ class Log
|
|||||||
|
|
||||||
public static function notice($message, array $context = [])
|
public static function notice($message, array $context = [])
|
||||||
{
|
{
|
||||||
$message = self::prefix() . $message;
|
$message = self::prefix() .self::backtrace() . $message;
|
||||||
self::writeLog('NOTICE', $message);
|
self::writeLog('NOTICE', $message);
|
||||||
self::getLogger()->addNotice($message, $context);
|
self::getLogger()->addNotice($message, $context);
|
||||||
self::callback(Logger::NOTICE, 'NOTICE', $message);
|
self::callback(Logger::NOTICE, 'NOTICE', $message);
|
||||||
@ -84,7 +88,7 @@ class Log
|
|||||||
|
|
||||||
public static function warning($message, array $context = [])
|
public static function warning($message, array $context = [])
|
||||||
{
|
{
|
||||||
$message = self::prefix() . $message;
|
$message = self::prefix() .self::backtrace() . $message;
|
||||||
self::writeLog('WARNING', $message);
|
self::writeLog('WARNING', $message);
|
||||||
self::getLogger()->addWarning($message, $context);
|
self::getLogger()->addWarning($message, $context);
|
||||||
self::callback(Logger::WARNING, 'WARNING', $message);
|
self::callback(Logger::WARNING, 'WARNING', $message);
|
||||||
@ -92,7 +96,7 @@ class Log
|
|||||||
|
|
||||||
public static function error($message, array $context = [])
|
public static function error($message, array $context = [])
|
||||||
{
|
{
|
||||||
$message = self::prefix() . $message;
|
$message = self::prefix() .self::backtrace() . $message;
|
||||||
self::writeLog('ERROR', $message);
|
self::writeLog('ERROR', $message);
|
||||||
self::getLogger()->addError($message, $context);
|
self::getLogger()->addError($message, $context);
|
||||||
self::callback(Logger::ERROR, 'ERROR', $message);
|
self::callback(Logger::ERROR, 'ERROR', $message);
|
||||||
|
|||||||
@ -12,54 +12,111 @@ namespace BiliHelper\Plugin;
|
|||||||
|
|
||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
|
use BiliHelper\Util\AllotTasks;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
|
||||||
class ActivityLottery
|
class ActivityLottery
|
||||||
{
|
{
|
||||||
use TimeLock;
|
use TimeLock;
|
||||||
|
use AllotTasks;
|
||||||
|
|
||||||
private static $activity_infos = [
|
private static $repository = APP_DATA_PATH . 'activity_infos.json';
|
||||||
'2020SummerMusic' => [
|
|
||||||
'sid' => 'dd83a687-c800-11ea-8597-246e966235d8',
|
|
||||||
'action_types' => [3, 4], // 4 关注 3 分享
|
|
||||||
'referer' => 'https://www.bilibili.com/blackboard/2020SummerMusic.html',
|
|
||||||
'expired_time' => 1599318000, // 2020-09-05 23:00:00
|
|
||||||
'draw_times' => 3,
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
public static function run()
|
public static function run()
|
||||||
{
|
{
|
||||||
if (self::getLock() > time() || getenv('USE_ACTIVITY') == 'false') {
|
if (self::getLock() > time() || getenv('USE_ACTIVITY') == 'false') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self::workTask();
|
self::allotTasks();
|
||||||
self::setLock(self::timing(5) + mt_rand(1, 180));
|
if (self::workTask()) {
|
||||||
|
self::setLock(5 * 60);
|
||||||
|
} else {
|
||||||
|
self::setLock(self::timing(5) + mt_rand(1, 180));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @use 运行任务
|
* @use 分配任务
|
||||||
|
* @return bool
|
||||||
|
* @throws \JsonDecodeStream\Exception\CollectorException
|
||||||
|
* @throws \JsonDecodeStream\Exception\ParserException
|
||||||
|
* @throws \JsonDecodeStream\Exception\SelectorException
|
||||||
|
* @throws \JsonDecodeStream\Exception\TokenizerException
|
||||||
|
*/
|
||||||
|
private static function allotTasks(): bool
|
||||||
|
{
|
||||||
|
if (self::$work_status['work_updated'] == date("Y/m/d")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$parser = self::loadJsonData();
|
||||||
|
foreach ($parser->items('data[]') as $act) {
|
||||||
|
// 活动无效
|
||||||
|
if (is_null($act->sid)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 活动实效过期
|
||||||
|
if (strtotime($act->expire_at) < time()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// init
|
||||||
|
if ($act->login == 'true') {
|
||||||
|
self::pushTask('login', $act);
|
||||||
|
}
|
||||||
|
// follow
|
||||||
|
if ($act->follow == 'true') {
|
||||||
|
self::pushTask('follow', $act);
|
||||||
|
}
|
||||||
|
// share
|
||||||
|
if ($act->share == 'true') {
|
||||||
|
self::pushTask('share', $act);
|
||||||
|
}
|
||||||
|
// draw_times
|
||||||
|
$arr = range(1, $act->draw_times);
|
||||||
|
foreach ($arr as $_) {
|
||||||
|
self::pushTask('draw', $act);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self::$work_status['work_updated'] = date("Y/m/d");
|
||||||
|
Log::info('活动抽奖任务分配完成 ' . count(self::$tasks) . ' 个任务待执行');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 执行任务
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private static function workTask()
|
private static function workTask()
|
||||||
{
|
{
|
||||||
foreach (self::$activity_infos as $title => $activity) {
|
if (self::$work_status['work_completed'] == date("Y/m/d")) {
|
||||||
// 过期
|
return false;
|
||||||
if ($activity['expired_time'] < time()) {
|
|
||||||
Log::info('跳过');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
Log::info("启动 {$title} 抽奖任务");
|
|
||||||
self::initTimes($activity['sid'], $activity['referer']);
|
|
||||||
foreach ($activity['action_types'] as $action_type) {
|
|
||||||
sleep(1);
|
|
||||||
self::addTimes($activity['sid'], $activity['referer'], $action_type);
|
|
||||||
}
|
|
||||||
foreach (range(1, $activity['draw_times']) as $num) {
|
|
||||||
sleep(5);
|
|
||||||
self::doLottery($activity['sid'], $activity['referer'], $num);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
$task = self::pullTask();
|
||||||
|
// 所有任务完成 标记
|
||||||
|
if (!$task) {
|
||||||
|
self::$work_status['work_completed'] = date("Y/m/d");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Log::info("执行 {$task['act']->title} #{$task['operation']} 任务");
|
||||||
|
// 执行任务
|
||||||
|
switch ($task['operation']) {
|
||||||
|
case 'login':
|
||||||
|
self::initTimes($task['act']->sid, $task['act']->url);
|
||||||
|
break;
|
||||||
|
case 'follow':
|
||||||
|
self::addTimes($task['act']->sid, $task['act']->url, 4);
|
||||||
|
break;
|
||||||
|
case 'share':
|
||||||
|
self::addTimes($task['act']->sid, $task['act']->url, 3);
|
||||||
|
break;
|
||||||
|
case 'draw':
|
||||||
|
self::doLottery($task['act']->sid, $task['act']->url, 0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Log::info("当前 {$task['act']->title} #{$task['operation']} 任务不存在哦");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -81,11 +138,12 @@ class ActivityLottery
|
|||||||
];
|
];
|
||||||
$raw = Curl::get('pc', $url, $payload, $headers);
|
$raw = Curl::get('pc', $url, $payload, $headers);
|
||||||
$de_raw = json_decode($raw, true);
|
$de_raw = json_decode($raw, true);
|
||||||
Log::info("获取抽奖机会 {$raw}");
|
|
||||||
// {"code":0,"message":"0","ttl":1,"data":{"times":2}}
|
// {"code":0,"message":"0","ttl":1,"data":{"times":2}}
|
||||||
if ($de_raw['code'] == 0) {
|
if ($de_raw['code'] == 0) {
|
||||||
|
Log::info("获取抽奖机会成功 {$raw}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Log::warning("获取抽奖机会失败 {$raw}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +162,7 @@ class ActivityLottery
|
|||||||
'referer' => $referer
|
'referer' => $referer
|
||||||
];
|
];
|
||||||
$user_info = User::parseCookies();
|
$user_info = User::parseCookies();
|
||||||
|
// $action_type 4 关注 3 分享
|
||||||
$payload = [
|
$payload = [
|
||||||
'sid' => $sid,
|
'sid' => $sid,
|
||||||
'action_type' => $action_type,
|
'action_type' => $action_type,
|
||||||
@ -143,7 +202,10 @@ class ActivityLottery
|
|||||||
$de_raw = json_decode($raw, true);
|
$de_raw = json_decode($raw, true);
|
||||||
Log::notice("开始抽奖#{$num} {$raw}");
|
Log::notice("开始抽奖#{$num} {$raw}");
|
||||||
// {"code":0,"message":"0","ttl":1,"data":[{"id":0,"mid":4133274,"num":1,"gift_id":1152,"gift_name":"硬币x6","gift_type":0,"img_url":"https://i0.hdslb.com/bfs/activity-plat/static/b6e956937ee4aefd1e19c01283145fc0/JQ9Y9-KCm_w96_h102.png","type":5,"ctime":1596255796,"cid":0}]}
|
// {"code":0,"message":"0","ttl":1,"data":[{"id":0,"mid":4133274,"num":1,"gift_id":1152,"gift_name":"硬币x6","gift_type":0,"img_url":"https://i0.hdslb.com/bfs/activity-plat/static/b6e956937ee4aefd1e19c01283145fc0/JQ9Y9-KCm_w96_h102.png","type":5,"ctime":1596255796,"cid":0}]}
|
||||||
|
// {"code":0,"message":"0","ttl":1,"data":[{"id":0,"mid":4133274,"ip":0,"num":1,"gift_id":0,"gift_name":"未中奖0","gift_type":0,"img_url":"","type":1,"ctime":1616825625,"cid":0,"extra":{}}]}
|
||||||
if ($de_raw['code'] == 0) {
|
if ($de_raw['code'] == 0) {
|
||||||
|
$result = "活动->{$referer} 获得->{$de_raw[0]['gift_name']}";
|
||||||
|
Notice::push('activity_lottery', $result);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -13,6 +13,7 @@ namespace BiliHelper\Plugin;
|
|||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Util\BaseRaffle;
|
||||||
|
|
||||||
class AnchorRaffle extends BaseRaffle
|
class AnchorRaffle extends BaseRaffle
|
||||||
{
|
{
|
||||||
@ -129,24 +130,7 @@ class AnchorRaffle extends BaseRaffle
|
|||||||
*/
|
*/
|
||||||
protected static function filterPrizeWords(string $prize_name): bool
|
protected static function filterPrizeWords(string $prize_name): bool
|
||||||
{
|
{
|
||||||
$default_words = [
|
$default_words = self::$store->get("Anchor.default");
|
||||||
'拉黑', '黑名单', '脸皮厚', '没有奖品', '无奖', '脸皮厚', 'ceshi', '测试', '测试', '测试', '脚本',
|
|
||||||
'抽奖号', '星段位', '星段位', '圣晶石', '圣晶石', '水晶', '水晶', '万兴神剪手', '万兴神剪手',
|
|
||||||
'自付邮费', '自付邮费', 'test', 'Test', 'TEST', '加密', 'QQ', '测试', '測試', 'VX', 'vx',
|
|
||||||
'ce', 'shi', '这是一个', 'lalall', '第一波', '第二波', '第三波', '测试用', '抽奖标题', '策是',
|
|
||||||
'房间抽奖', 'CESHI', 'ceshi', '奖品A', '奖品B', '奖品C', '硬币', '无奖品', '白名单', '我是抽奖',
|
|
||||||
'0.1', '五毛二', '一分', '一毛', '0.52', '0.66', '0.01', '0.77', '0.16', '照片', '穷', '0.5',
|
|
||||||
'0.88', '双排', '1毛', '1分', '1角', 'P口罩', '素颜', '写真', '图包', '五毛', '一角', '冥币',
|
|
||||||
'自拍', '日历', '0.22', '加速器', '越南盾', '毛', '分', '限', '0.', '角', '〇点', '①元',
|
|
||||||
'一起玩', '不包邮', '邮费', '续期卡', '儿时', '闪宠', '大师球', '一元', '两元', '两块', '赛车',
|
|
||||||
'代币', '一块', '一局', '好友位', '通话', '首胜', '代金券', '辣条', '补贴', '抵用券', '主播素颜照',
|
|
||||||
'武器箱棺材板', '游戏道具', '优惠券', '日元', '发音课', '壹元', '零点', '舰长五折券', '上车',
|
|
||||||
'没有钱', '女装', '肥宅快乐水', '哥斯拉', '公主连结', 'pokemmo', '宝可>梦', '明日方舟', '雪碧', '公主连接',
|
|
||||||
'专属头衔', 'FF14', '韩元', '空洞骑士', '老婆饼', '稀世时装', '洛克衣服', '帮过图', '证件照', '自抽号',
|
|
||||||
'晶耀之星', '伊洛纳', '〇.', '②元', '③元', '0·', '繁华美化', '喵喵喵', '闪伊布', '①圆', 'o点', '金达摩', '嗷呜',
|
|
||||||
'游戏位', 'S-追光者', 'OWL', '勾玉', '跟yo宝游戏', '三元', '怡宝', '蛋闪迷>你冰', '哥伦比亚比索', '油条', '代金卷',
|
|
||||||
'小堂包', '返现券', '上舰', '舰长', '开舰', '帅照', '靓照', '1元红包', '红包3.3元', '5.2元红包', '2.33元红包',
|
|
||||||
];
|
|
||||||
$custom_words = empty(getenv('ANCHOR_FILTER_WORDS')) ? [] : explode(',', getenv('ANCHOR_FILTER_WORDS'));
|
$custom_words = empty(getenv('ANCHOR_FILTER_WORDS')) ? [] : explode(',', getenv('ANCHOR_FILTER_WORDS'));
|
||||||
$total_words = array_merge($default_words, $custom_words);
|
$total_words = array_merge($default_words, $custom_words);
|
||||||
foreach ($total_words as $word) {
|
foreach ($total_words as $word) {
|
||||||
|
|||||||
363
src/plugin/CapsuleLottery.php
Normal file
363
src/plugin/CapsuleLottery.php
Normal file
@ -0,0 +1,363 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Website: https://mudew.com/
|
||||||
|
* Author: Lkeme
|
||||||
|
* License: The MIT License
|
||||||
|
* Email: Useri@live.cn
|
||||||
|
* Updated: 2021 ~ 2022
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BiliHelper\Plugin;
|
||||||
|
|
||||||
|
|
||||||
|
use BiliHelper\Core\Log;
|
||||||
|
use BiliHelper\Core\Curl;
|
||||||
|
use BiliHelper\Util\AllotTasks;
|
||||||
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Tool\Generator;
|
||||||
|
|
||||||
|
class CapsuleLottery
|
||||||
|
{
|
||||||
|
use TimeLock;
|
||||||
|
use AllotTasks;
|
||||||
|
|
||||||
|
private static $repository = APP_DATA_PATH . 'capsule_infos.json';
|
||||||
|
|
||||||
|
private static $work_room_id = null;
|
||||||
|
private static $enc_server = null; // 加密服务器 配置文件
|
||||||
|
private static $hb_payload = []; // 心跳请求数据
|
||||||
|
private static $hb_headers = []; // 心跳请求头
|
||||||
|
private static $hb_count_total = 0;
|
||||||
|
private static $hb_count = 0; // 心跳次数 max 24
|
||||||
|
private static $hb_room_info = []; // 心跳带勋章房间信息
|
||||||
|
private static $heartbeat_interval = 60; // 每次跳动时间
|
||||||
|
|
||||||
|
|
||||||
|
public static function run()
|
||||||
|
{
|
||||||
|
if (self::getLock() > time() || !self::init()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self::allotTasks();
|
||||||
|
if (self::workTask()) {
|
||||||
|
self::setLock(self::$heartbeat_interval);
|
||||||
|
} else {
|
||||||
|
self::setLock(self::timing(5) + mt_rand(1, 180));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use init
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private static function init(): bool
|
||||||
|
{
|
||||||
|
if (getenv('USE_CAPSULE') == 'false' || getenv('ENC_SERVER') == '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (is_null(self::$enc_server)) {
|
||||||
|
self::$enc_server = getenv('ENC_SERVER');
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 分配任务
|
||||||
|
* @return bool
|
||||||
|
* @throws \JsonDecodeStream\Exception\CollectorException
|
||||||
|
* @throws \JsonDecodeStream\Exception\ParserException
|
||||||
|
* @throws \JsonDecodeStream\Exception\SelectorException
|
||||||
|
* @throws \JsonDecodeStream\Exception\TokenizerException
|
||||||
|
*/
|
||||||
|
private static function allotTasks(): bool
|
||||||
|
{
|
||||||
|
if (self::$work_status['work_updated'] == date("Y/m/d")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$parser = self::loadJsonData();
|
||||||
|
foreach ($parser->items('data[]') as $act) {
|
||||||
|
// 活动无效
|
||||||
|
if (is_null($act->coin_id)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 活动实效过期
|
||||||
|
if (strtotime($act->expire_at) < time()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($act->room_id == 0) {
|
||||||
|
$room_ids = Live::getAreaRoomList($act->parent_area_id, $act->area_id);
|
||||||
|
$act->room_id = array_shift($room_ids);
|
||||||
|
}
|
||||||
|
// 观看时间
|
||||||
|
self::pushTask('watch', $act, true);
|
||||||
|
// 抽奖次数
|
||||||
|
$arr = range(1, $act->draw_times);
|
||||||
|
foreach ($arr as $_) {
|
||||||
|
self::pushTask('draw', $act);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self::$work_status['work_updated'] = date("Y/m/d");
|
||||||
|
Log::info('扭蛋抽奖任务分配完成 ' . count(self::$tasks) . ' 个任务待执行');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 执行任务
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private static function workTask()
|
||||||
|
{
|
||||||
|
if (self::$work_status['work_completed'] == date("Y/m/d")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$task = self::pullTask();
|
||||||
|
// 所有任务完成 标记
|
||||||
|
if (!$task) {
|
||||||
|
self::$work_status['work_completed'] = date("Y/m/d");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ($task['time'] && is_null(self::$work_status['estimated_time'])) {
|
||||||
|
self::$work_status['estimated_time'] = time() + $task['act']->watch_time;
|
||||||
|
}
|
||||||
|
Log::info("执行 {$task['act']->title} #{$task['operation']} 任务");
|
||||||
|
// 执行任务
|
||||||
|
switch ($task['operation']) {
|
||||||
|
case 'watch':
|
||||||
|
self::heartBeat($task['act']->room_id);
|
||||||
|
break;
|
||||||
|
case 'draw':
|
||||||
|
self::doLottery($task['act']->coin_id, $task['act']->url, 0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Log::info("当前 {$task['act']->title} #{$task['operation']} 任务不存在哦");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 重置变量
|
||||||
|
* @param false $reset_num
|
||||||
|
*/
|
||||||
|
private static function resetVar($reset_num = false)
|
||||||
|
{
|
||||||
|
self::$hb_payload = []; // 心跳请求数据
|
||||||
|
self::$hb_headers = []; // 心跳请求头
|
||||||
|
if ($reset_num) {
|
||||||
|
self::$hb_count_total = 0;
|
||||||
|
}
|
||||||
|
self::$hb_room_info = []; // 心跳带勋章房间信息
|
||||||
|
self::$hb_count = 0; // 心跳次数 max 24
|
||||||
|
self::$heartbeat_interval = 60; // 跳变时间
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 心跳处理
|
||||||
|
* @param int $room_id
|
||||||
|
*/
|
||||||
|
private static function heartBeat(int $room_id)
|
||||||
|
{
|
||||||
|
if (self::$work_room_id != $room_id) {
|
||||||
|
self::resetVar();
|
||||||
|
self::$work_room_id = $room_id;
|
||||||
|
}
|
||||||
|
if (empty(self::$hb_room_info)) {
|
||||||
|
self::$hb_room_info = Live::webGetRoomInfo($room_id);
|
||||||
|
}
|
||||||
|
if (!self::$hb_count) {
|
||||||
|
$e_data = self::eHeartBeat(self::$hb_room_info['data']['room_info']);
|
||||||
|
if (!$e_data['status']) {
|
||||||
|
// 错误级别
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self::$hb_count += 1;
|
||||||
|
self::$hb_count_total += 1;
|
||||||
|
self::$hb_payload = $e_data['payload'];
|
||||||
|
self::$hb_headers = $e_data['headers'];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$x_data = self::xHeartBeat(self::$hb_count);
|
||||||
|
if (!$x_data['status']) {
|
||||||
|
// 错误级别
|
||||||
|
self::resetVar();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self::$hb_count_total += 1;
|
||||||
|
self::$hb_count += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use E心跳
|
||||||
|
* @param array $room_info
|
||||||
|
* @param int $index
|
||||||
|
* @return array|bool[]
|
||||||
|
*/
|
||||||
|
private static function eHeartBeat(array $room_info, $index = 0): array
|
||||||
|
{
|
||||||
|
$url = 'https://live-trace.bilibili.com/xlive/data-interface/v1/x25Kn/E';
|
||||||
|
$headers = [
|
||||||
|
'Content-Type' => 'application/x-www-form-urlencoded',
|
||||||
|
'Origin' => 'https://live.bilibili.com',
|
||||||
|
'Referer' => 'https://live.bilibili.com/' . $room_info['room_id'],
|
||||||
|
];
|
||||||
|
$user_info = User::parseCookies();
|
||||||
|
$payload = [
|
||||||
|
'id' => json_encode([$room_info['parent_area_id'], $room_info['area_id'], $index, $room_info['room_id']], true),
|
||||||
|
'device' => json_encode([
|
||||||
|
Generator::hash(), Generator::uuid4()
|
||||||
|
], true),
|
||||||
|
'ts' => time() * 1000,
|
||||||
|
'is_patch' => 0,
|
||||||
|
'heart_beat' => [],
|
||||||
|
'ua' => 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0',
|
||||||
|
'csrf_token' => $user_info['token'],
|
||||||
|
'csrf' => $user_info['token'],
|
||||||
|
'visit_id' => ''
|
||||||
|
];
|
||||||
|
$raw = Curl::post('pc', $url, $payload, $headers);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
// {"code":0,"message":"0","ttl":1,"data":{"timestamp":1595342828,"heartbeat_interval":300,"secret_key":"seacasdgyijfhofiuxoannn","secret_rule":[2,5,1,4],"patch_status":2}}
|
||||||
|
if ($de_raw['code'] != 0) {
|
||||||
|
Log::warning("小心心礼物E-{$index}心跳失败");
|
||||||
|
return ['status' => false];
|
||||||
|
}
|
||||||
|
Log::info("小心心礼物E-{$index}心跳成功");
|
||||||
|
// Log::info($raw);
|
||||||
|
$payload['ets'] = $de_raw['data']['timestamp'];
|
||||||
|
$payload['secret_key'] = $de_raw['data']['secret_key'];
|
||||||
|
$payload['heartbeat_interval'] = $de_raw['data']['heartbeat_interval'];
|
||||||
|
$payload['secret_rule'] = $de_raw['data']['secret_rule'];
|
||||||
|
// 自动跳变时间
|
||||||
|
self::$heartbeat_interval = $de_raw['data']['heartbeat_interval'];
|
||||||
|
return [
|
||||||
|
'status' => true,
|
||||||
|
'payload' => $payload,
|
||||||
|
'headers' => $headers,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use X心跳
|
||||||
|
* @param int $index
|
||||||
|
* @return array|bool[]
|
||||||
|
*/
|
||||||
|
private static function xHeartBeat(int $index = 1): array
|
||||||
|
{
|
||||||
|
$s_data = self::encParamS($index);
|
||||||
|
$s = $s_data['s'];
|
||||||
|
$t = $s_data['payload'];
|
||||||
|
|
||||||
|
$url = 'https://live-trace.bilibili.com/xlive/data-interface/v1/x25Kn/X';
|
||||||
|
$user_info = User::parseCookies();
|
||||||
|
$payload = [
|
||||||
|
's' => $s,
|
||||||
|
'id' => $t['id'],
|
||||||
|
'device' => $t['device'],
|
||||||
|
'ets' => $t['ets'],
|
||||||
|
'benchmark' => $t['benchmark'],
|
||||||
|
'time' => $t['time'],
|
||||||
|
'ts' => $t['ts'],
|
||||||
|
'ua' => $t['ua'],
|
||||||
|
'csrf_token' => $user_info['token'],
|
||||||
|
'csrf' => $user_info['token'],
|
||||||
|
'visit_id' => ''
|
||||||
|
];
|
||||||
|
// print_r($payload);
|
||||||
|
$raw = Curl::post('pc', $url, $payload, self::$hb_headers);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
# {"code":0,"message":"0","ttl":1,"data":{"heartbeat_interval":300,"timestamp":1595346846,"secret_rule":[2,5,1,4],"secret_key":"seacasdgyijfhofiuxoannn"}}
|
||||||
|
if ($de_raw['code'] != 0) {
|
||||||
|
Log::warning("小心心礼物X-{$index}心跳失败");
|
||||||
|
return ['status' => false];
|
||||||
|
}
|
||||||
|
self::$hb_payload['ets'] = $de_raw['data']['timestamp'];
|
||||||
|
self::$hb_payload['secret_key'] = $de_raw['data']['secret_key'];
|
||||||
|
self::$hb_payload['heartbeat_interval'] = $de_raw['data']['heartbeat_interval'];
|
||||||
|
// 自动跳变时间
|
||||||
|
self::$heartbeat_interval = $de_raw['data']['heartbeat_interval'];
|
||||||
|
Log::info("小心心礼物X-{$index}心跳成功");
|
||||||
|
return ['status' => true];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 加密参数S
|
||||||
|
* @param int $index
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private static function encParamS(int $index): array
|
||||||
|
{
|
||||||
|
// 转换index
|
||||||
|
$temp = json_decode(self::$hb_payload['id'], true);
|
||||||
|
$temp[2] += 1;
|
||||||
|
self::$hb_payload['id'] = json_encode($temp, true);
|
||||||
|
// 加密部分
|
||||||
|
$payload = [
|
||||||
|
't' => [
|
||||||
|
'id' => self::$hb_payload['id'],
|
||||||
|
'device' => self::$hb_payload['device'],
|
||||||
|
'ets' => self::$hb_payload['ets'],
|
||||||
|
'benchmark' => self::$hb_payload['secret_key'],
|
||||||
|
'time' => self::$hb_payload['heartbeat_interval'],
|
||||||
|
'ts' => time() * 1000,
|
||||||
|
'ua' => self::$hb_payload['ua']
|
||||||
|
],
|
||||||
|
'r' => self::$hb_payload['secret_rule']
|
||||||
|
];
|
||||||
|
$headers = [
|
||||||
|
'Content-Type' => 'application/json',
|
||||||
|
];
|
||||||
|
$data = Curl::put('other', self::$enc_server, $payload, $headers);
|
||||||
|
$de_raw = json_decode($data, true);
|
||||||
|
Log::info("S参数加密 {$de_raw['s']}");
|
||||||
|
|
||||||
|
return [
|
||||||
|
's' => $de_raw['s'],
|
||||||
|
'payload' => $payload['t']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 开始抽奖
|
||||||
|
* @param int $coin_id
|
||||||
|
* @param string $referer
|
||||||
|
* @param int $num
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private static function doLottery(int $coin_id, string $referer, int $num)
|
||||||
|
{
|
||||||
|
$url = 'https://api.live.bilibili.com/xlive/web-ucenter/v1/capsule/open_capsule_by_id';
|
||||||
|
$headers = [
|
||||||
|
'origin' => 'https://live.bilibili.com',
|
||||||
|
'referer' => $referer
|
||||||
|
];
|
||||||
|
$user_info = User::parseCookies();
|
||||||
|
$payload = [
|
||||||
|
'id' => $coin_id,
|
||||||
|
'count' => 1,
|
||||||
|
'type' => 1,
|
||||||
|
'platform' => 'web',
|
||||||
|
'_' => time() * 1000,
|
||||||
|
'csrf' => $user_info['token'],
|
||||||
|
'csrf_token' => $user_info['token'],
|
||||||
|
'visit_id' => ''
|
||||||
|
];
|
||||||
|
$raw = Curl::post('pc', $url, $payload, $headers);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
Log::notice("开始抽奖#{$num} {$raw}");
|
||||||
|
// {"code":0,"message":"0","ttl":1,"data":{"status":false,"isEntity":false,"info":{"coin":1},"awards":[{"name":"谢谢参与","num":1,"text":"谢谢参与 X 1","web_url":"https://i0.hdslb.com/bfs/live/b0fccfb3bac2daae35d7e514a8f6d31530b9add2.png","mobile_url":"https://i0.hdslb.com/bfs/live/b0fccfb3bac2daae35d7e514a8f6d31530b9add2.png","usage":{"text":"很遗憾您未能中奖","url":""},"type":32,"expire":"当天","gift_type":"7290bc172e5ab9e151eb141749adb9dd","gift_value":""}],"text":["谢谢参与 X 1"],"isExCode":false}}
|
||||||
|
if ($de_raw['code'] == 0) {
|
||||||
|
$result = "活动->{$referer} 获得->{$de_raw['text'][0]}";
|
||||||
|
Notice::push('capsule_lottery', $result);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -14,7 +14,7 @@ use BiliHelper\Core\Log;
|
|||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
|
||||||
class Task
|
class DailyTask
|
||||||
{
|
{
|
||||||
use TimeLock;
|
use TimeLock;
|
||||||
|
|
||||||
@ -71,9 +71,9 @@ class Task
|
|||||||
$data = json_decode($data, true);
|
$data = json_decode($data, true);
|
||||||
|
|
||||||
if (isset($data['code']) && $data['code']) {
|
if (isset($data['code']) && $data['code']) {
|
||||||
Log::warning('签到失败', ['msg' => $data['message']]);
|
Log::warning("签到失败: {$data['message']}");
|
||||||
} else {
|
} else {
|
||||||
Log::info('签到成功');
|
Log::info("签到成功: {$data['text']}");
|
||||||
// 推送签到信息
|
// 推送签到信息
|
||||||
Notice::push('todaySign', $data['message']);
|
Notice::push('todaySign', $data['message']);
|
||||||
}
|
}
|
||||||
@ -1,10 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Website: https://mudew.com/
|
||||||
|
* Author: Lkeme
|
||||||
|
* License: The MIT License
|
||||||
|
* Email: Useri@live.cn
|
||||||
|
* Updated: 2021 ~ 2022
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Blog http://blog.jianxiaodai.com
|
* @Blog http://blog.jianxiaodai.com
|
||||||
* @author 菜如狗怎么了
|
* @author 菜如狗怎么了
|
||||||
* @date 2020-12
|
* @date 2020-12
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2021-3-14 FEAT:增加自动回复语言更改
|
||||||
|
* @author:zymooll
|
||||||
|
*/
|
||||||
|
|
||||||
namespace BiliHelper\Plugin;
|
namespace BiliHelper\Plugin;
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +42,8 @@ class Forward
|
|||||||
|
|
||||||
private static $msg = '从未中奖,从未放弃[doge]';
|
private static $msg = '从未中奖,从未放弃[doge]';
|
||||||
|
|
||||||
|
private static $draw_follow = [];
|
||||||
|
|
||||||
|
|
||||||
public static function run()
|
public static function run()
|
||||||
{
|
{
|
||||||
@ -46,7 +62,10 @@ class Forward
|
|||||||
|
|
||||||
public static function start()
|
public static function start()
|
||||||
{
|
{
|
||||||
|
//更改自动回复
|
||||||
|
if (getenv('AUTO_REPLY_TEXT') != self::$msg) {
|
||||||
|
self::changeReply();
|
||||||
|
}
|
||||||
// 取关未中奖
|
// 取关未中奖
|
||||||
if (getenv('CLEAR_DYNAMIC') == 'true') {
|
if (getenv('CLEAR_DYNAMIC') == 'true') {
|
||||||
self::clearDynamic();
|
self::clearDynamic();
|
||||||
@ -63,6 +82,15 @@ class Forward
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*更改自动回复
|
||||||
|
*/
|
||||||
|
public static function changeReply()
|
||||||
|
{
|
||||||
|
self::$msg = getenv('AUTO_REPLY_TEXT');
|
||||||
|
$msg = self::$msg;
|
||||||
|
Log::info("已将自动回复改为\"{$msg}\"");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动转发抽奖
|
* 自动转发抽奖
|
||||||
@ -162,8 +190,11 @@ class Forward
|
|||||||
}
|
}
|
||||||
// 取关
|
// 取关
|
||||||
foreach (self::$un_follows as $uid) {
|
foreach (self::$un_follows as $uid) {
|
||||||
Log::info("[动态抽奖]-未中奖-取关 {$uid}");
|
// 非转发抽奖动态关注的up 不取关
|
||||||
User::setUserFollow($uid, true);
|
if (isset(self::$draw_follow[$uid])) {
|
||||||
|
Log::info("[动态抽奖]-未中奖-取关 {$uid}");
|
||||||
|
User::setUserFollow($uid, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,6 +248,7 @@ class Forward
|
|||||||
if (!in_array($need_follow_uid, $default_follows)) {
|
if (!in_array($need_follow_uid, $default_follows)) {
|
||||||
User::setUserFollow($need_follow_uid); // 关注
|
User::setUserFollow($need_follow_uid); // 关注
|
||||||
User::tagAddUsers($need_follow_uid, self::$group_id); // 转到分组中
|
User::tagAddUsers($need_follow_uid, self::$group_id); // 转到分组中
|
||||||
|
self::$draw_follow[$need_follow_uid] = 1; // 记录转发抽奖关注的up
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,4 +268,4 @@ class Forward
|
|||||||
}
|
}
|
||||||
return self::$default_follows;
|
return self::$default_follows;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ use BiliHelper\Core\Log;
|
|||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
|
||||||
class Match
|
class GameMatch
|
||||||
{
|
{
|
||||||
use TimeLock;
|
use TimeLock;
|
||||||
|
|
||||||
@ -13,6 +13,7 @@ namespace BiliHelper\Plugin;
|
|||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Util\BaseRaffle;
|
||||||
|
|
||||||
class GiftRaffle extends BaseRaffle
|
class GiftRaffle extends BaseRaffle
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,6 +13,7 @@ namespace BiliHelper\Plugin;
|
|||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Util\BaseRaffle;
|
||||||
|
|
||||||
class GuardRaffle extends BaseRaffle
|
class GuardRaffle extends BaseRaffle
|
||||||
{
|
{
|
||||||
|
|||||||
@ -330,7 +330,7 @@ class Live
|
|||||||
foreach ($bag_list as $vo) {
|
foreach ($bag_list as $vo) {
|
||||||
// 去除永久礼物
|
// 去除永久礼物
|
||||||
if ($vo['corner_mark'] == '永久') continue;
|
if ($vo['corner_mark'] == '永久') continue;
|
||||||
if ($vo['gift_id'] == $gift_id && $vo['gift_name'] == $gift_name){
|
if ($vo['gift_id'] == $gift_id && $vo['gift_name'] == $gift_name) {
|
||||||
array_push($new_bag_list, $vo);
|
array_push($new_bag_list, $vo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -374,4 +374,34 @@ class Live
|
|||||||
Log::notice("成功向 {$payload['biz_id']} 投喂了 {$num} 个{$gift['gift_name']}");
|
Log::notice("成功向 {$payload['biz_id']} 投喂了 {$num} 个{$gift['gift_name']}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 获取分区直播间
|
||||||
|
* @param int $parent_area_id
|
||||||
|
* @param int $area_id
|
||||||
|
* @param int $page
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function getAreaRoomList(int $parent_area_id, int $area_id, int $page=1): array
|
||||||
|
{
|
||||||
|
$url = 'https://api.live.bilibili.com/xlive/web-interface/v1/second/getList';
|
||||||
|
$payload = [
|
||||||
|
'platform' => 'web',
|
||||||
|
'parent_area_id' => $parent_area_id,
|
||||||
|
'area_id' => $area_id,
|
||||||
|
'sort_type' => 'sort_type_282',
|
||||||
|
'page' => $page
|
||||||
|
];
|
||||||
|
$raw = Curl::get('other', $url, $payload);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
$room_ids = [];
|
||||||
|
|
||||||
|
if ($de_raw['code'] == 0) {
|
||||||
|
foreach ($de_raw['data']['list'] as $room) {
|
||||||
|
array_push($room_ids, $room['roomid']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $room_ids;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ use BiliHelper\Core\Log;
|
|||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Core\Config;
|
use BiliHelper\Core\Config;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Tool\Common;
|
||||||
|
|
||||||
|
|
||||||
class Login
|
class Login
|
||||||
@ -199,9 +200,10 @@ class Login
|
|||||||
private static function publicKeyEnc($plaintext): string
|
private static function publicKeyEnc($plaintext): string
|
||||||
{
|
{
|
||||||
Log::info('正在载入公钥');
|
Log::info('正在载入公钥');
|
||||||
$url = 'https://passport.bilibili.com/api/oauth2/getKey';
|
// $url = 'https://passport.bilibili.com/api/oauth2/getKey';
|
||||||
|
$url = 'https://passport.bilibili.com/x/passport-login/web/key';
|
||||||
$payload = [];
|
$payload = [];
|
||||||
$data = Curl::post('app', $url, Sign::login($payload));
|
$data = Curl::get('app', $url, Sign::login($payload));
|
||||||
$data = json_decode($data, true);
|
$data = json_decode($data, true);
|
||||||
if (isset($data['code']) && $data['code']) {
|
if (isset($data['code']) && $data['code']) {
|
||||||
Log::error('公钥载入失败', ['msg' => $data['message']]);
|
Log::error('公钥载入失败', ['msg' => $data['message']]);
|
||||||
@ -209,6 +211,7 @@ class Login
|
|||||||
} else {
|
} else {
|
||||||
Log::info('公钥载入完毕');
|
Log::info('公钥载入完毕');
|
||||||
}
|
}
|
||||||
|
print_r($data);
|
||||||
$public_key = $data['data']['key'];
|
$public_key = $data['data']['key'];
|
||||||
$hash = $data['data']['hash'];
|
$hash = $data['data']['hash'];
|
||||||
openssl_public_encrypt($hash . $plaintext, $crypt, $public_key);
|
openssl_public_encrypt($hash . $plaintext, $crypt, $public_key);
|
||||||
@ -314,7 +317,7 @@ class Login
|
|||||||
switch ($de_raw['code']) {
|
switch ($de_raw['code']) {
|
||||||
case 0:
|
case 0:
|
||||||
// 二次判断
|
// 二次判断
|
||||||
switch ($de_raw['data']['status']){
|
switch ($de_raw['data']['status']) {
|
||||||
case 0:
|
case 0:
|
||||||
// 正常登录
|
// 正常登录
|
||||||
Log::info("{$mode}登录成功");
|
Log::info("{$mode}登录成功");
|
||||||
@ -472,7 +475,7 @@ class Login
|
|||||||
private static function saveConfig(string $key, string $value, $hide = true)
|
private static function saveConfig(string $key, string $value, $hide = true)
|
||||||
{
|
{
|
||||||
Config::put($key, $value);
|
Config::put($key, $value);
|
||||||
Log::info(" > {$key}: " . ($hide ? substr_replace($value, '********', mb_strlen($value) / 2, 8) : $value));
|
Log::info(" > {$key}: " . ($hide ? Common::replaceStar($value,4,4) : $value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -13,10 +13,13 @@ namespace BiliHelper\Plugin;
|
|||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Util\FilterWords;
|
||||||
|
|
||||||
|
|
||||||
class MaterialObject
|
class MaterialObject
|
||||||
{
|
{
|
||||||
use TimeLock;
|
use TimeLock;
|
||||||
|
use FilterWords;
|
||||||
|
|
||||||
private static $invalid_aids = [];
|
private static $invalid_aids = [];
|
||||||
private static $start_aid = 0;
|
private static $start_aid = 0;
|
||||||
@ -24,21 +27,19 @@ class MaterialObject
|
|||||||
|
|
||||||
public static function run()
|
public static function run()
|
||||||
{
|
{
|
||||||
if (getenv('USE_MO') == 'false') {
|
if (getenv('USE_LIVE_BOX') == 'false') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self::setPauseStatus();
|
self::setPauseStatus();
|
||||||
if (self::getLock() > time()) {
|
if (self::getLock() > time()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO 优化计算AID算法
|
self::calcAid(700, 900);
|
||||||
self::calcAid(650, 850);
|
|
||||||
$lottery_list = self::fetchLottery();
|
$lottery_list = self::fetchLottery();
|
||||||
self::drawLottery($lottery_list);
|
self::drawLottery($lottery_list);
|
||||||
self::setLock(mt_rand(6, 10) * 60);
|
self::setLock(mt_rand(6, 10) * 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @use 过滤抽奖Title
|
* @use 过滤抽奖Title
|
||||||
* @param string $title
|
* @param string $title
|
||||||
@ -46,10 +47,8 @@ class MaterialObject
|
|||||||
*/
|
*/
|
||||||
private static function filterTitleWords(string $title): bool
|
private static function filterTitleWords(string $title): bool
|
||||||
{
|
{
|
||||||
$sensitive_words = [
|
self::loadJsonData();
|
||||||
'测试', '加密', 'test', 'TEST', '钓鱼', '炸鱼', '调试', "123", "1111", "测试", "測試", "Test",
|
$sensitive_words = self::$store->get("MaterialObject.sensitive");
|
||||||
"测一测", "ce-shi", "test", "T-E-S-T", "lala", "我是抽奖标题", "压测", "測一測", "t-e-s-t"
|
|
||||||
];
|
|
||||||
foreach ($sensitive_words as $word) {
|
foreach ($sensitive_words as $word) {
|
||||||
if (strpos($title, $word) !== false) {
|
if (strpos($title, $word) !== false) {
|
||||||
return true;
|
return true;
|
||||||
@ -204,6 +203,7 @@ class MaterialObject
|
|||||||
*/
|
*/
|
||||||
private static function calcAid($min, $max): bool
|
private static function calcAid($min, $max): bool
|
||||||
{
|
{
|
||||||
|
// TODO 优化计算AID算法
|
||||||
if (self::$end_aid != 0 && self::$start_aid != 0) {
|
if (self::$end_aid != 0 && self::$start_aid != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,15 +12,11 @@ namespace BiliHelper\Plugin;
|
|||||||
|
|
||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\FilterWords;
|
||||||
|
|
||||||
class Notice
|
class Notice
|
||||||
{
|
{
|
||||||
protected static $type = '';
|
use FilterWords;
|
||||||
protected static $result = '';
|
|
||||||
protected static $uname = '';
|
|
||||||
protected static $sckey = '';
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @use 推送消息
|
* @use 推送消息
|
||||||
@ -29,17 +25,14 @@ class Notice
|
|||||||
*/
|
*/
|
||||||
public static function push(string $type, string $result = '')
|
public static function push(string $type, string $result = '')
|
||||||
{
|
{
|
||||||
if (getenv('USE_SC') == 'false' || getenv('SC_KEY') == "") {
|
if (getenv('USE_NOTIFY') == 'false') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self::$type = $type;
|
|
||||||
self::$result = $result;
|
|
||||||
self::$sckey = getenv('SC_KEY');
|
|
||||||
self::$uname = User::userInfo() ? getenv('APP_UNAME') : getenv('APP_USER');
|
|
||||||
if (self::filterResultWords($result)) {
|
if (self::filterResultWords($result)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self::sendInfoHandle();
|
$uname = User::userInfo() ? getenv('APP_UNAME') : getenv('APP_USER');
|
||||||
|
self::sendInfoHandle($type, $uname, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,8 +42,9 @@ class Notice
|
|||||||
*/
|
*/
|
||||||
private static function filterResultWords(string $result): bool
|
private static function filterResultWords(string $result): bool
|
||||||
{
|
{
|
||||||
$default_words = [];
|
self::loadJsonData();
|
||||||
$custom_words = empty(getenv('SC_FILTER_WORDS')) ? [] : explode(',', getenv('SC_FILTER_WORDS'));
|
$default_words = self::$store->get("Notice.default");;
|
||||||
|
$custom_words = empty(getenv('NOTIFY_FILTER_WORDS')) ? [] : explode(',', getenv('NOTIFY_FILTER_WORDS'));
|
||||||
$total_words = array_merge($default_words, $custom_words);
|
$total_words = array_merge($default_words, $custom_words);
|
||||||
foreach ($total_words as $word) {
|
foreach ($total_words as $word) {
|
||||||
if (strpos($result, $word) !== false) {
|
if (strpos($result, $word) !== false) {
|
||||||
@ -60,97 +54,252 @@ class Notice
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @use 处理信息
|
* @use 处理信息
|
||||||
|
* @param string $type
|
||||||
|
* @param string $uname
|
||||||
|
* @param string $result
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private static function sendInfoHandle(): bool
|
private static function sendInfoHandle(string $type, string $uname, string $result): bool
|
||||||
{
|
{
|
||||||
$now_time = date('Y-m-d H:i:s');
|
$now_time = date('Y-m-d H:i:s');
|
||||||
switch (self::$type) {
|
switch ($type) {
|
||||||
case 'update':
|
case 'update':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '程序更新通知',
|
'title' => '程序更新通知',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 程序更新通知' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 程序更新通知: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'anchor':
|
case 'anchor':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '天选时刻获奖记录',
|
'title' => '天选时刻获奖记录',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 在天选时刻中获得: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 在天选时刻中获得: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'raffle':
|
case 'raffle':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '实物奖励获奖纪录',
|
'title' => '实物奖励获奖纪录',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 在实物奖励中获得: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 在实物奖励中获得: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'gift':
|
case 'gift':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '活动礼物获奖纪录',
|
'title' => '活动礼物获奖纪录',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 在活动礼物中获得: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 在活动礼物中获得: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'storm':
|
case 'storm':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '节奏风暴获奖纪录',
|
'title' => '节奏风暴获奖纪录',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 在节奏风暴中获得: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 在节奏风暴中获得: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'cookieRefresh':
|
case 'cookieRefresh':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => 'Cookie刷新',
|
'title' => 'Cookie刷新',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 刷新Cookie: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 刷新Cookie: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'todaySign':
|
case 'todaySign':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '每日签到',
|
'title' => '每日签到',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 签到: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 签到: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'banned':
|
case 'banned':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '任务小黑屋',
|
'title' => '任务小黑屋',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 小黑屋: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 小黑屋: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'error':
|
case 'error':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '程序错误',
|
'title' => '程序运行错误',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 程序运行错误: ' . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 错误详情: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 'key_expired':
|
case 'key_expired':
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '监控KEY异常',
|
'title' => '监控KEY异常',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 监控KEY到期或者错误,请及时查错或续期后重试哦~',
|
'content' => "[{$now_time}] 用户: {$uname} 监控KEY到期或者错误,请及时查错或续期后重试哦~"
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 'capsule_lottery':
|
||||||
|
$info = [
|
||||||
|
'title' => '直播扭蛋抽奖活动',
|
||||||
|
'content' => "[{$now_time}] 用户: {$uname} 详情: {$result}"
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 'activity_lottery':
|
||||||
|
$info = [
|
||||||
|
'title' => '主站九宫格抽奖活动',
|
||||||
|
'content' => "[{$now_time}] 用户: {$uname} 详情: {$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$info = [
|
$info = [
|
||||||
'title' => '推送消息异常记录',
|
'title' => '推送消息异常记录',
|
||||||
'content' => '[' . $now_time . ']' . ' 用户: ' . self::$uname . ' 推送消息key错误' . self::$type . self::$result,
|
'content' => "[{$now_time}] 用户: {$uname} 推送消息key错误: {$type}->{$result}"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
self::scSend($info);
|
|
||||||
|
|
||||||
|
self::sendLog($info);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 推送消息
|
||||||
|
* @param array $info
|
||||||
|
*/
|
||||||
|
private static function sendLog(array $info)
|
||||||
|
{
|
||||||
|
if (getenv('NOTIFY_SCTKEY')) {
|
||||||
|
self::sctSend($info);
|
||||||
|
}
|
||||||
|
if (getenv('NOTIFY_SCKEY')) {
|
||||||
|
self::scSend($info);
|
||||||
|
}
|
||||||
|
if (getenv('NOTIFY_TELE_BOTTOKEN') && getenv('NOTIFY_TELE_CHATID')) {
|
||||||
|
self::teleSend($info);
|
||||||
|
}
|
||||||
|
if (getenv('NOTIFY_DINGTALK_TOKEN')) {
|
||||||
|
self::dingTalkSend($info);
|
||||||
|
}
|
||||||
|
if (getenv('NOTIFY_PUSHPLUS_TOKEN')) {
|
||||||
|
self::pushPlusSend($info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @use ServerChan发送信息
|
* @use 钉钉bot推送
|
||||||
|
* @doc https://developers.dingtalk.com/document/app/document-upgrade-notice#/serverapi2/qf2nxq
|
||||||
|
* @param array $info
|
||||||
|
*/
|
||||||
|
private static function dingTalkSend(array $info)
|
||||||
|
{
|
||||||
|
Log::info('使用DingTalk机器人推送消息');
|
||||||
|
$url = 'https://oapi.dingtalk.com/robot/send?access_token=' . getenv('NOTIFY_DINGTALK_TOKEN');
|
||||||
|
$payload = [
|
||||||
|
'msgtype' => 'markdown',
|
||||||
|
'markdown' => [
|
||||||
|
'title' => $info['title'],
|
||||||
|
'content' => $info['content'],
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$headers = [
|
||||||
|
'Content-Type' => 'application/json;charset=utf-8'
|
||||||
|
];
|
||||||
|
$raw = Curl::put('other', $url, $payload, $headers);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
if ($de_raw['errcode'] == 0) {
|
||||||
|
Log::info("推送消息成功: {$de_raw['errmsg']}");
|
||||||
|
} else {
|
||||||
|
Log::warning("推送消息失败: {$raw}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use TeleBot推送
|
||||||
|
* @doc https://core.telegram.org/bots/api#sendmessage
|
||||||
|
* @param array $info
|
||||||
|
*/
|
||||||
|
private static function teleSend(array $info)
|
||||||
|
{
|
||||||
|
Log::info('使用Tele机器人推送消息');
|
||||||
|
$url = 'https://api.telegram.org/bot' . getenv('NOTIFY_TELE_BOTTOKEN');
|
||||||
|
$payload = [
|
||||||
|
'method' => 'sendMessage',
|
||||||
|
'chat_id' => getenv('NOTIFY_TELE_CHATID'),
|
||||||
|
'text' => $info['content']
|
||||||
|
];
|
||||||
|
$raw = Curl::post('other', $url, $payload);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
if (array_key_exists('message_id', $de_raw)) {
|
||||||
|
Log::info("推送消息成功: {$de_raw['message_id']}");
|
||||||
|
} else {
|
||||||
|
Log::info("推送消息失败: {$raw}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use ServerChan推送
|
||||||
|
* @use https://sc.ftqq.com/
|
||||||
* @param array $info
|
* @param array $info
|
||||||
*/
|
*/
|
||||||
private static function scSend(array $info)
|
private static function scSend(array $info)
|
||||||
{
|
{
|
||||||
$url = "https://sc.ftqq.com/" . self::$sckey . ".send?text=" . urlencode($info['title']) . "&desp=" . urlencode($info['content']);
|
Log::info('使用ServerChan推送消息');
|
||||||
$data = Curl::request('get', $url);
|
$url = 'https://sc.ftqq.com/' . getenv('NOTIFY_SCKEY') . '.send';
|
||||||
if (is_null($data)) {
|
$payload = [
|
||||||
Log::warning('Server酱推送信息失败,请检查!');
|
'text' => $info['title'],
|
||||||
};
|
'desp' => $info['content'],
|
||||||
|
];
|
||||||
|
$raw = Curl::post('other', $url, $payload);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
|
||||||
|
if ($de_raw['errno'] == 0) {
|
||||||
|
Log::info("推送消息成功: {$de_raw['errmsg']}");
|
||||||
|
} else {
|
||||||
|
Log::warning("推送消息失败: {$raw}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use ServerChan(Turbo)推送
|
||||||
|
* @doc https://sct.ftqq.com/
|
||||||
|
* @param array $info
|
||||||
|
*/
|
||||||
|
private static function sctSend(array $info)
|
||||||
|
{
|
||||||
|
Log::info('使用ServerChan(Turbo)推送消息');
|
||||||
|
$url = 'https://sctapi.ftqq.com/' . getenv('NOTIFY_SCTKEY') . '.send';
|
||||||
|
$payload = [
|
||||||
|
'text' => $info['title'],
|
||||||
|
'desp' => $info['content'],
|
||||||
|
];
|
||||||
|
$raw = Curl::post('other', $url, $payload);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
// {'message': '[AUTH]用户不存在或者权限不足', 'code': 40001, 'info': '用户不存在或者权限不足', 'args': [None]}
|
||||||
|
// {'code': 0, 'message': '', 'data': {'pushid': 'xxxx', 'readkey': 'xxxxx', 'error': 'SUCCESS', 'errno': 0}}
|
||||||
|
if ($de_raw['code'] == 0) {
|
||||||
|
Log::info("推送消息成功: {$de_raw['data']['pushid']}");
|
||||||
|
} else {
|
||||||
|
Log::warning("推送消息失败: {$raw}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use PushPlus酱推送
|
||||||
|
* @doc http://pushplus.hxtrip.com/doc/
|
||||||
|
* @param array $info
|
||||||
|
*/
|
||||||
|
private static function pushPlusSend(array $info)
|
||||||
|
{
|
||||||
|
Log::info('使用PushPlus酱推送消息');
|
||||||
|
$url = 'http://pushplus.hxtrip.com/send';
|
||||||
|
$payload = [
|
||||||
|
'token' => getenv('NOTIFY_PUSHPLUS_TOKEN'),
|
||||||
|
'title' => $info['title'],
|
||||||
|
'content' => $info['content']
|
||||||
|
];
|
||||||
|
$headers = [
|
||||||
|
'Content-Type' => 'application/json'
|
||||||
|
];
|
||||||
|
$raw = Curl::put('other', $url, $payload, $headers);
|
||||||
|
$de_raw = json_decode($raw, true);
|
||||||
|
if ($de_raw['code'] == 200) {
|
||||||
|
Log::info("推送消息成功: {$de_raw['data']}");
|
||||||
|
} else {
|
||||||
|
Log::warning("推送消息失败: {$raw}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -13,6 +13,7 @@ namespace BiliHelper\Plugin;
|
|||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Util\BaseRaffle;
|
||||||
|
|
||||||
|
|
||||||
class PkRaffle extends BaseRaffle
|
class PkRaffle extends BaseRaffle
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class Schedule
|
|||||||
private static $unlock_timers = [];
|
private static $unlock_timers = [];
|
||||||
private static $sleep_section = [];
|
private static $sleep_section = [];
|
||||||
// 日常类
|
// 日常类
|
||||||
private static $fillable = ['Login', 'Schedule', 'Daily', 'Judge', 'MasterSite', 'GiftSend', 'Task', 'Silver2Coin', 'ManGa', 'Match', 'GroupSignIn', 'AwardRecord', 'Statistics'];
|
private static $fillable = ['Login', 'Schedule', 'Daily', 'Judge', 'MasterSite', 'GiftSend', 'DailyTask', 'Silver2Coin', 'ManGa', 'GameMatch', 'GroupSignIn', 'AwardRecord', 'Statistics'];
|
||||||
// 任务类
|
// 任务类
|
||||||
private static $guarded_first = ['Barrage', 'GiftHeart', 'Silver', 'MaterialObject'];
|
private static $guarded_first = ['Barrage', 'GiftHeart', 'Silver', 'MaterialObject'];
|
||||||
// 监控类
|
// 监控类
|
||||||
@ -32,6 +32,8 @@ class Schedule
|
|||||||
private static $guarded_third = ['StormRaffle', 'GuardRaffle', 'PkRaffle', 'GiftRaffle', 'AnchorRaffle'];
|
private static $guarded_third = ['StormRaffle', 'GuardRaffle', 'PkRaffle', 'GiftRaffle', 'AnchorRaffle'];
|
||||||
// 特殊 老爷处理
|
// 特殊 老爷处理
|
||||||
private static $guarded_fourth = ['Heart'];
|
private static $guarded_fourth = ['Heart'];
|
||||||
|
// 暂定不做处理,后期看情况再定
|
||||||
|
private static $release = ['ActivityLottery', 'SmallHeart', 'Competition', 'SmallHeart', 'Forward', 'CapsuleLottery'];
|
||||||
|
|
||||||
public static function run()
|
public static function run()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -55,8 +55,8 @@ class Sign
|
|||||||
'access_key' => getenv('ACCESS_TOKEN'),
|
'access_key' => getenv('ACCESS_TOKEN'),
|
||||||
'actionKey' => 'appkey',
|
'actionKey' => 'appkey',
|
||||||
'appkey' => $appkey,
|
'appkey' => $appkey,
|
||||||
'build' => 6030600,
|
'build' => 6205500,
|
||||||
'channel'=>'bili',
|
'channel' => 'bili',
|
||||||
'device' => 'phone',
|
'device' => 'phone',
|
||||||
'mobi_app' => 'android',
|
'mobi_app' => 'android',
|
||||||
'platform' => 'android',
|
'platform' => 'android',
|
||||||
@ -84,7 +84,7 @@ class Sign
|
|||||||
'access_key' => getenv('ACCESS_TOKEN'),
|
'access_key' => getenv('ACCESS_TOKEN'),
|
||||||
'actionKey' => 'appkey',
|
'actionKey' => 'appkey',
|
||||||
'appkey' => $appkey,
|
'appkey' => $appkey,
|
||||||
'build' => 5511400,
|
'build' => 6205500,
|
||||||
'device' => 'android',
|
'device' => 'android',
|
||||||
'mobi_app' => 'android',
|
'mobi_app' => 'android',
|
||||||
'platform' => 'android',
|
'platform' => 'android',
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class Silver2Coin
|
|||||||
if (!$de_raw['code'] && $de_raw['msg'] == '兑换成功') {
|
if (!$de_raw['code'] && $de_raw['msg'] == '兑换成功') {
|
||||||
Log::info('[APP]银瓜子兑换硬币: ' . $de_raw['msg']);
|
Log::info('[APP]银瓜子兑换硬币: ' . $de_raw['msg']);
|
||||||
} elseif ($de_raw['code'] == 403) {
|
} elseif ($de_raw['code'] == 403) {
|
||||||
Log::info('[APP]银瓜子兑换硬币: ' . $de_raw['msg']);
|
Log::warning('[APP]银瓜子兑换硬币: ' . $de_raw['msg']);
|
||||||
} else {
|
} else {
|
||||||
Log::warning('[APP]银瓜子兑换硬币: ' . $de_raw['msg']);
|
Log::warning('[APP]银瓜子兑换硬币: ' . $de_raw['msg']);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -13,7 +13,6 @@ namespace BiliHelper\Plugin;
|
|||||||
|
|
||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Tool\Faker;
|
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
use BiliHelper\Tool\Generator;
|
use BiliHelper\Tool\Generator;
|
||||||
|
|
||||||
@ -131,10 +130,10 @@ class SmallHeart
|
|||||||
}
|
}
|
||||||
if (empty(self::$hb_room_info)) {
|
if (empty(self::$hb_room_info)) {
|
||||||
$metal = self::$fans_medals[array_rand(self::$fans_medals)];
|
$metal = self::$fans_medals[array_rand(self::$fans_medals)];
|
||||||
$room_info = Live::webGetRoomInfo($metal['roomid']);
|
self::$hb_room_info = Live::webGetRoomInfo($metal['roomid']);
|
||||||
}
|
}
|
||||||
if (self::$hb_count == 0) {
|
if (self::$hb_count == 0) {
|
||||||
$e_data = self::eHeartBeat($room_info['data']['room_info']);
|
$e_data = self::eHeartBeat(self::$hb_room_info['data']['room_info']);
|
||||||
if (!$e_data['status']) {
|
if (!$e_data['status']) {
|
||||||
// 错误级别
|
// 错误级别
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -13,6 +13,7 @@ namespace BiliHelper\Plugin;
|
|||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
use BiliHelper\Util\TimeLock;
|
use BiliHelper\Util\TimeLock;
|
||||||
|
use BiliHelper\Util\BaseRaffle;
|
||||||
|
|
||||||
class StormRaffle extends BaseRaffle
|
class StormRaffle extends BaseRaffle
|
||||||
{
|
{
|
||||||
|
|||||||
@ -495,15 +495,17 @@ class ZoneTcpClient
|
|||||||
throw new Exception("Socket error: [{$ret}] [{$length}]");
|
throw new Exception("Socket error: [{$ret}] [{$length}]");
|
||||||
}
|
}
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
$r = array($socket);
|
|
||||||
$w = NULL;
|
$w = NULL;
|
||||||
$e = NULL;
|
$e = NULL;
|
||||||
while ($cnt++ < 60) {
|
while ($cnt++ < 60) {
|
||||||
|
// reset read fdset when timeout
|
||||||
|
$r = array($socket);
|
||||||
$ret = socket_select($r, $w, $e, 1);
|
$ret = socket_select($r, $w, $e, 1);
|
||||||
if ($ret === false)
|
if ($ret === false)
|
||||||
throw new Exception("Socket error: ret == false");
|
throw new Exception("Socket error: ret == false");
|
||||||
if ($ret)
|
if ($ret)
|
||||||
break;
|
break;
|
||||||
|
Log::debug("Socket debug: select timeout" . PHP_EOL);
|
||||||
}
|
}
|
||||||
// TODO unable to read from socket[104]: Connection reset by peer
|
// TODO unable to read from socket[104]: Connection reset by peer
|
||||||
$ret = socket_recv($socket, $buffer, $length, 0);
|
$ret = socket_recv($socket, $buffer, $length, 0);
|
||||||
|
|||||||
52
src/tool/Common.php
Normal file
52
src/tool/Common.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Website: https://mudew.com/
|
||||||
|
* Author: Lkeme
|
||||||
|
* License: The MIT License
|
||||||
|
* Email: Useri@live.cn
|
||||||
|
* Updated: 2021 ~ 2022
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BiliHelper\Tool;
|
||||||
|
|
||||||
|
class Common
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @use 替换字符串
|
||||||
|
* @param $str
|
||||||
|
* @param $start
|
||||||
|
* @param int $end
|
||||||
|
* @param string $dot
|
||||||
|
* @param string $charset
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function replaceStar($str, $start, $end = 0, $dot = "*", $charset = "UTF-8")
|
||||||
|
{
|
||||||
|
$len = mb_strlen($str, $charset);
|
||||||
|
if ($start == 0 || $start > $len) {
|
||||||
|
$start = 1;
|
||||||
|
}
|
||||||
|
if ($end != 0 && $end > $len) {
|
||||||
|
$end = $len - 2;
|
||||||
|
}
|
||||||
|
$endStart = $len - $end;
|
||||||
|
$top = mb_substr($str, 0, $start, $charset);
|
||||||
|
$bottom = "";
|
||||||
|
if ($endStart > 0) {
|
||||||
|
$bottom = mb_substr($str, $endStart, $end, $charset);
|
||||||
|
}
|
||||||
|
$len = $len - mb_strlen($top, $charset);
|
||||||
|
$len = $len - mb_strlen($bottom, $charset);
|
||||||
|
$newStr = $top;
|
||||||
|
for ($i = 0; $i < $len; $i++) {
|
||||||
|
$newStr .= $dot;
|
||||||
|
}
|
||||||
|
$newStr .= $bottom;
|
||||||
|
return $newStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
274
src/tool/File.php
Normal file
274
src/tool/File.php
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Website: https://mudew.com/
|
||||||
|
* Author: Lkeme
|
||||||
|
* License: The MIT License
|
||||||
|
* Email: Useri@live.cn
|
||||||
|
* Updated: 2021 ~ 2022
|
||||||
|
* Source: https://github.com/anhao/bv2av/
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BiliHelper\Tool;
|
||||||
|
|
||||||
|
|
||||||
|
class File
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 创建文件
|
||||||
|
* @param string $filename
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function create(string $filename): bool
|
||||||
|
{
|
||||||
|
if (file_exists($filename)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 判断文件类型是否为目录, 如果不存在则创建
|
||||||
|
if (!file_exists(dirname($filename))) {
|
||||||
|
mkdir(dirname($filename), 0777, true);
|
||||||
|
}
|
||||||
|
if (touch($filename)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 删除文件
|
||||||
|
* @param string $filename
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function del(string $filename): bool
|
||||||
|
{
|
||||||
|
// 如果文件不存在或者权限不够, 则返回false
|
||||||
|
if (!file_exists($filename) || !is_writeable($filename)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (unlink($filename)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 拷贝文件
|
||||||
|
* @param string $filename
|
||||||
|
* @param string $dest
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function copy(string $filename, string $dest): bool
|
||||||
|
{
|
||||||
|
if (!is_dir($dest)) {
|
||||||
|
mkdir($dest, 0777, true);
|
||||||
|
}
|
||||||
|
// DIRECTORY_SEPARATOR '/'分割符
|
||||||
|
$destName = $dest . DIRECTORY_SEPARATOR . basename($filename);
|
||||||
|
if (copy($filename, $destName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 文件重命名
|
||||||
|
* @param string $oldname
|
||||||
|
* @param string $newname
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function rename(string $oldname, string $newname): bool
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!is_file($oldname)) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$path = dirname($oldname);
|
||||||
|
|
||||||
|
$destName = $path . DIRECTORY_SEPARATOR . $newname;
|
||||||
|
|
||||||
|
if (!is_file($destName)) {
|
||||||
|
|
||||||
|
return rename($oldname, $newname);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 剪切文件
|
||||||
|
* @param $filename
|
||||||
|
* @param $dest
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function cut($filename, $dest): bool
|
||||||
|
{
|
||||||
|
if (!file_exists($filename)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 检测文件目录是否存在, 如果不存在则创建
|
||||||
|
if (!is_dir($dest)) {
|
||||||
|
mkdir($dest, 0777, true);
|
||||||
|
}
|
||||||
|
// 检测文件夹是否包含同名文件
|
||||||
|
$destName = $dest . DIRECTORY_SEPARATOR . basename($filename);
|
||||||
|
// 如果是一个文档则returnfalse 如果不是文档则剪切文档
|
||||||
|
if (!is_file($destName)) {
|
||||||
|
return rename($filename, $destName);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 获取文件详细信息
|
||||||
|
* @param string $filename
|
||||||
|
* @return array|false
|
||||||
|
*/
|
||||||
|
public static function getInfo(string $filename): bool
|
||||||
|
{
|
||||||
|
// 如果不是文件 或者 不可读返回false
|
||||||
|
if (!is_file($filename) || !is_readable($filename)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 否则直接返回文件信息, 定义一个关联数组
|
||||||
|
return [
|
||||||
|
"文件名称" => basename($filename),
|
||||||
|
"文件类型" => filetype($filename),
|
||||||
|
"文件大小" => trans_byte(filesize($filename)),
|
||||||
|
"创建时间" => date('Y-m-d H:i:s', filectime($filename)),
|
||||||
|
"修改时间" => date('Y-m-d H:i:s', filemtime($filename)),
|
||||||
|
"上一次访问时间" => date('Y-m-d H:i:s', fileatime($filename)),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 转换字节大小
|
||||||
|
* @param int $byte 字节大小
|
||||||
|
* @param int $precision 小数点保留位数
|
||||||
|
* @return string 转换后的单位
|
||||||
|
*/
|
||||||
|
public static function transByte(int $byte, $precision = 2): string
|
||||||
|
{
|
||||||
|
$kb = 1024;
|
||||||
|
$mb = 1024 * $kb;
|
||||||
|
$gb = 1024 * $mb;
|
||||||
|
$tb = 1024 * $gb;
|
||||||
|
|
||||||
|
if ($byte < $kb) {
|
||||||
|
return $byte . 'B';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($byte < $mb) {
|
||||||
|
// 默认四舍五入, 保留两位小数
|
||||||
|
return round($byte / $kb, $precision) . ' KB';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($byte < $gb) {
|
||||||
|
return round($byte / $mb, $precision) . ' MB';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($byte < $tb) {
|
||||||
|
return round($byte / $tb, $precision) . ' GB';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 以字符串形式读取内容
|
||||||
|
* @param string $filename
|
||||||
|
* @return false|string
|
||||||
|
*/
|
||||||
|
public static function readString(string $filename)
|
||||||
|
{
|
||||||
|
if (is_file($filename) && is_readable($filename)) {
|
||||||
|
return file_get_contents($filename);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 以数组形式读取内容
|
||||||
|
* @param string $filename
|
||||||
|
* @param bool $skip_empty_lines
|
||||||
|
* @return array|false
|
||||||
|
*/
|
||||||
|
public static function readArray(string $filename, bool $skip_empty_lines = false)
|
||||||
|
{
|
||||||
|
if (is_file($filename) && is_readable($filename)) {
|
||||||
|
if ($skip_empty_lines) {
|
||||||
|
// 忽略空行读取
|
||||||
|
return file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
|
} else {
|
||||||
|
// 以数组形式直接读取, 不忽略空行
|
||||||
|
return file($filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 增加文件内容升级版
|
||||||
|
* @param string $filename 路径名称
|
||||||
|
* @param mixed $data 需要写入的数据
|
||||||
|
* @param boolean $clear_content 是否清空原始内容再写入
|
||||||
|
* @return bool true|false
|
||||||
|
*/
|
||||||
|
public static function write(string $filename, $data, bool $clear_content = false)
|
||||||
|
{
|
||||||
|
$dirname = dirname($filename);
|
||||||
|
// 检测目标路径是否存在
|
||||||
|
if (!file_exists($dirname)) {
|
||||||
|
mkdir($dirname, 0777, true);
|
||||||
|
}
|
||||||
|
// 文件存在并且不清空原始文件
|
||||||
|
if (is_file($filename) && !$clear_content) {
|
||||||
|
$srcData = file_get_contents($filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检测数据是否为数组或者对象
|
||||||
|
if (is_array($data) || is_object($data)) {
|
||||||
|
// 序列化数据
|
||||||
|
$data = serialize($data);
|
||||||
|
}
|
||||||
|
// 拼装数据
|
||||||
|
$data = $srcData . $data;
|
||||||
|
// 写入数据
|
||||||
|
if (file_put_contents($filename, $data) !== false) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 截断文本
|
||||||
|
* @param string $filename 文件名称
|
||||||
|
* @param int $length 截断文本长度
|
||||||
|
* @return boolean true|false
|
||||||
|
*/
|
||||||
|
public static function truncate(string $filename, int $length): bool
|
||||||
|
{
|
||||||
|
// 判断文件是否存在并且是可写的
|
||||||
|
if (is_file($filename) && is_writeable($filename)) {
|
||||||
|
// 创建文件句柄, 以读写方式打开
|
||||||
|
$handler = fopen($filename, 'rb+');
|
||||||
|
$length = $length < 0 ? 0 : $length;
|
||||||
|
ftruncate($handler, $length);
|
||||||
|
fclose($handler);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
92
src/util/AllotTasks.php
Normal file
92
src/util/AllotTasks.php
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Website: https://mudew.com/
|
||||||
|
* Author: Lkeme
|
||||||
|
* License: The MIT License
|
||||||
|
* Email: Useri@live.cn
|
||||||
|
* Updated: 2021 ~ 2022
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BiliHelper\Util;
|
||||||
|
|
||||||
|
use JsonDecodeStream\Parser;
|
||||||
|
|
||||||
|
|
||||||
|
trait AllotTasks
|
||||||
|
{
|
||||||
|
|
||||||
|
// protected static $repository = '';
|
||||||
|
protected static $tasks = [];
|
||||||
|
protected static $work_status = [
|
||||||
|
'work_updated' => null,
|
||||||
|
'estimated_time' => null,
|
||||||
|
'work_completed' => null,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 加载json数据
|
||||||
|
* @return Parser
|
||||||
|
*/
|
||||||
|
protected static function loadJsonData()
|
||||||
|
{
|
||||||
|
return Parser::fromFile(static::$repository);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 提交任务
|
||||||
|
* @param string $operation
|
||||||
|
* @param \stdClass $act
|
||||||
|
* @param bool $time
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected static function pushTask(string $operation, \stdClass $act, bool $time = false): bool
|
||||||
|
{
|
||||||
|
$task = [
|
||||||
|
'operation' => $operation,
|
||||||
|
'act' => $act,
|
||||||
|
'time' => false
|
||||||
|
];
|
||||||
|
if ($time) {
|
||||||
|
$task['time'] = $time;
|
||||||
|
}
|
||||||
|
array_push(static::$tasks, $task);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 拉取任务
|
||||||
|
* @return false|mixed
|
||||||
|
*/
|
||||||
|
protected static function pullTask()
|
||||||
|
{
|
||||||
|
// 任务列表为空
|
||||||
|
if (empty(static::$tasks)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 先进先出 弹出一个任务
|
||||||
|
$task = array_shift(static::$tasks);
|
||||||
|
if ($task['time']) {
|
||||||
|
if (is_null(static::$work_status['estimated_time']) || time() < intval(static::$work_status['estimated_time'])) {
|
||||||
|
array_unshift(static::$tasks, $task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $task;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @use 执行任务
|
||||||
|
// * @return bool
|
||||||
|
// */
|
||||||
|
// abstract protected function workTask(): bool;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @use 分配任务
|
||||||
|
// * @return bool
|
||||||
|
// */
|
||||||
|
// abstract protected function allotTasks(): bool;
|
||||||
|
}
|
||||||
@ -9,13 +9,14 @@
|
|||||||
* Updated: 2021 ~ 2022
|
* Updated: 2021 ~ 2022
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace BiliHelper\Plugin;
|
namespace BiliHelper\Util;
|
||||||
|
|
||||||
use BiliHelper\Core\Log;
|
use BiliHelper\Core\Log;
|
||||||
use BiliHelper\Core\Curl;
|
use BiliHelper\Core\Curl;
|
||||||
|
|
||||||
abstract class BaseRaffle
|
abstract class BaseRaffle
|
||||||
{
|
{
|
||||||
|
use FilterWords;
|
||||||
const ACTIVE_TITLE = '';
|
const ACTIVE_TITLE = '';
|
||||||
const ACTIVE_SWITCH = '';
|
const ACTIVE_SWITCH = '';
|
||||||
|
|
||||||
@ -33,6 +34,7 @@ abstract class BaseRaffle
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
static::setPauseStatus();
|
static::setPauseStatus();
|
||||||
|
static::loadJsonData();
|
||||||
static::startLottery();
|
static::startLottery();
|
||||||
}
|
}
|
||||||
|
|
||||||
39
src/util/FilterWords.php
Normal file
39
src/util/FilterWords.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Website: https://mudew.com/
|
||||||
|
* Author: Lkeme
|
||||||
|
* License: The MIT License
|
||||||
|
* Email: Useri@live.cn
|
||||||
|
* Updated: 2021 ~ 2022
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BiliHelper\Util;
|
||||||
|
|
||||||
|
use Sven\FileConfig\File;
|
||||||
|
use Sven\FileConfig\Store;
|
||||||
|
use Sven\FileConfig\Drivers\Json;
|
||||||
|
|
||||||
|
trait FilterWords
|
||||||
|
{
|
||||||
|
protected static $store;
|
||||||
|
protected static $store_status;
|
||||||
|
protected static $repository = APP_DATA_PATH . 'filter_words.json';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @use 加载配置信息
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected static function loadJsonData(): bool
|
||||||
|
{
|
||||||
|
if (static::$store_status == date("Y/m/d")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$file = new File(static::$repository);
|
||||||
|
static::$store = new Store($file, new Json());
|
||||||
|
|
||||||
|
static::$store_status = date("Y/m/d");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user