Compare commits

...

3 Commits
v2.1 ... v2.1.1

Author SHA1 Message Date
DLmaster
286ee9e51e 添加修改管理密钥功能 2024-02-15 20:15:05 +08:00
DLmaster
9a2a88384b Create LICENSE 2024-02-15 15:08:30 +08:00
DLmaster
68068b29e1 适配v2.1的内容更新 2024-02-11 20:38:56 +08:00
7 changed files with 154 additions and 81 deletions

Binary file not shown.

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 DLmaster
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

146
README.md
View File

@@ -1,10 +1,12 @@
# AUTO_MAA
MAA多账号管理与自动化软件
!["软件图标"](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/AUTO_MAA.png "软件图标")
----------------------------------------------------------------------------------------------
## 免责声明
本软件是一个外部工具旨在优化MAA多账号功能体验。该软件包可以存储多账号数据并通过修改MAA配置文件、读取MAA日志等行为自动完成多账号代理。
本软件是一个外部工具旨在优化MAA多账号功能体验。该软件包可以存储明日方舟多账号数据并通过修改MAA配置文件、读取MAA日志等行为自动完成多账号代理。
This software is open source, free of charge and for learning and exchange purposes only. The developer team has the final right to interpret this project. All problems arising from the use of this software are not related to this project and the developer team. If you encounter a merchant using this software to practice on your behalf and charging for it, it may be the cost of equipment and time, etc. The problems and consequences arising from this software have nothing to do with it.
@@ -14,13 +16,13 @@ This software is open source, free of charge and for learning and exchange purpo
本软件是MAA的外部工具需要安装配置MAA后才能使用。
#### MAA安装
### MAA安装
什么是MAA [官网](https://maa.plus/)/[GitHub](https://github.com/CHNZYX/Auto_Simulated_Universe/archive/refs/heads/main.zip)
MAA下载地址 [GitHub下载](https://github.com/MaaAssistantArknights/MaaAssistantArknights/releases)
#### MAA配置
### MAA配置
1.完成MAA的adb配置等基本配置
@@ -46,177 +48,185 @@ GitHub下载地址 [GitHub下载](https://github.com/DLmaster361/AUTO_MAA/rel
## 配置用户信息与相关参数
注意:当前所有的密码输入部分都存在一点“小问题”请在输入密码时避免输入Delete、F12、Tab等功能键。
**注意:** 当前所有的密码输入部分都存在一点“小问题”请在输入密码时避免输入Delete、F12、Tab等功能键。
-------------------------------------------------
#### 第一次启动
### 第一次启动
双击启动`manage.exe`输入MAA所在文件夹路径并回车注意使用斜杠的种类不要使用反斜杠然后设置管理密钥。
双击启动`manage.exe`输入MAA所在文件夹路径并回车注意使用斜杠的种类不要使用反斜杠然后设置管理密钥(密钥可以包含字母大小写与特殊字符)
![信息配置1](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置1.png "MAA配置1")
![信息配置1](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置1.png "信息配置1")
管理密钥是解密用户密码的唯一凭证,与数据库绑定。密钥丢失或`data/key/`目录下任一文件损坏都将导致解密无法正常进行。
本项目采用自主组建的混合加密模式,项目组也无法找回您的管理密钥或修复`data/key/`目录下的文件。如果不幸的事发生,建议您删除`data/data.db`重新录入信息。
本项目采用自主开发的混合加密模式,项目组也无法找回您的管理密钥或修复`data/key/`目录下的文件。如果不幸的事发生,建议您删除`data/data.db`重新录入信息。
当前暂不支持修改管理密钥,请等待后续更新。
#### 添加用户
### 添加用户
输入“+”以开始添加用户。依次输入:
用户名:管理用户的惟一凭证
**用户名:** 管理用户的惟一凭证
手机号码:允许隐去中间四位以“****”代替
**手机号码:** 允许隐去中间四位以“****”代替
代理天数:这个还要我解释吗?
**代理天数:** 这个还要我解释吗?
密码:警告!密码功能暂未开发,输入的信息会以明文存储,有泄露风险,请勿使用。可以用无意义的字符串代替。由于忽略警告导致的信息泄露,本项目组概不负责
![信息配置2](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置2.png "信息配置2")
![信息配置2](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置2.png "MAA配置2")
#### 删除用户
### 删除用户
输入用户名+“-”以删除用户。格式:
```plaintext
```
用户名 -
```
![信息配置3](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置3.png "MAA配置3")
![信息配置3](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置3.png "信息配置3")
#### 配置用户状态
### 配置用户状态
启用代理:输入用户名+“y”以启用该用户的代理。格式
**启用代理:** 输入用户名+“y”以启用该用户的代理。格式
```plaintext
```
用户名 y
```
![信息配置4](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置4.png "MAA配置4")
![信息配置4](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置4.png "信息配置4")
禁用代理:输入用户名+“n”以禁用该用户的代理。格式
**禁用代理:** 输入用户名+“n”以禁用该用户的代理。格式
```plaintext
```
用户名 n
```
![信息配置5](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置5.png "MAA配置5")
![信息配置5](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置5.png "信息配置5")
#### 续期
### 续期
输入用户名+续期天数+“+”以延长该用户的代理天数。格式:
```plaintext
```
用户名 续期天数 +
```
![信息配置6](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置6.png "MAA配置6")
![信息配置6](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置6.png "信息配置6")
#### 修改刷取关卡
### 修改刷取关卡
输入用户名+关卡号+“~”以更改该用户的代理关卡。格式:
```plaintext
```
用户名 关卡号 ~
```
![信息配置7](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置7.png "MAA配置7")
![信息配置7](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置7.png "信息配置7")
特别的:
**特别的:**
你可以自定义关卡号替换方案。程序会读取`gameid.txt`中的数据,依据此进行关卡号的替换,便于常用关卡的使用。`gameid.txt`在初始已经存储了一些常用资源本的替代方案。
![gameid](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/gameid.png "gameid")
#### 设置MAA路径
### 设置MAA路径
输入“/”+新的MAA文件夹路径以修改MAA安装位置的配置。格式
```plaintext
```
/新的MAA文件夹路径
```
注意:/’与路径间没有空格,路径同样不能使用反斜杠
**注意:** /’与路径间没有空格,路径同样不能使用反斜杠
![信息配置8](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置8.png "MAA配置8")
![信息配置8](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置8.png "信息配置8")
#### 设置启动时间
### 设置启动时间
添加启动时间:输入“:+”+时间以添加定时启动时间。格式:
**添加启动时间:** 输入“:+”+时间以添加定时启动时间。格式:
```plaintext
```
:+小时:分钟
```
注意:所有输入间没有空格
**注意:** 所有输入间没有空格
![信息配置9](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置9.png "MAA配置9")
![信息配置9](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置9.png "信息配置9")
删除启动时间:输入“:-”+时间以删除定时启动时间。格式:
**删除启动时间:** 输入“:-”+时间以删除定时启动时间。格式:
```plaintext
```
:-小时:分钟
```
注意:所有输入间没有空格
**注意:** 所有输入间没有空格
![信息配置10](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置10.png "MAA配置10")
![信息配置10](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置10.png "信息配置10")
#### 检索信息
### 检索信息
检索所有信息:`manage.exe`打开时会打印所有用户与配置信息。除此之外你可以通过输入“all ?”以打印所有信息,如下:
**检索所有信息:** `manage.exe`打开时会打印所有用户与配置信息。除此之外你可以通过输入“all ?”以打印所有信息,如下:
```plaintext
```
all ?
```
![信息配置11](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置11.png "MAA配置11")
![信息配置11](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置11.png "信息配置11")
检索MAA路径输入“maa ?”以检索MAA安装路径如下
**检索MAA路径** 输入“maa ?”以检索MAA安装路径如下
```plaintext
```
maa ?
```
![信息配置12](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置12.png "MAA配置12")
![信息配置12](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置12.png "信息配置12")
检索启动时间输入“time ?”以检索定时启动的时间,如下:
**检索启动时间:** 输入“time ?”以检索定时启动的时间,如下:
```plaintext
```
time ?
```
![信息配置13](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置13.png "MAA配置13")
![信息配置13](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置13.png "信息配置13")
检索指定用户:输入用户名+“?”以检索指定用户信息,如下:
**检索指定用户:** 输入用户名+“?”以检索指定用户信息,如下:
```plaintext
```
用户名 ?
```
![信息配置14](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置14.png "MAA配置14")
**注意:** 由于需要检索用户密码,每一次`manage.exe`启动后的首次查询需要验证管理密钥。为了方便操作,之后的查询不会再要求重复验证。因此,完成密码查询后,请及时关闭`manage.exe`
#### 退出
![信息配置14](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置14.png "信息配置14")
### 修改管理密钥
输入“*”以开始修改管理密钥。依次输入:
**旧管理密钥:** 当数据库中没有存储用户信息时,允许跳过验证直接配置新管理密钥
**新管理密钥:** 请妥善保管,丢失无法找回。
![信息配置15](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/信息配置15.png "信息配置15")
### 退出
输入“-”以退出`manage.exe`,如下:
```plaintext
```
-
```
## 运行代理
#### 直接运行
### 直接运行
双击`run.exe`直接运行
#### 定时运行
### 定时运行
双击`AUTO_MAA.exe`打开,不要关闭。它会读取设定时间,在该时刻自动运行
注意:周一将自动进行剿灭代理
**注意:** 周一将自动进行剿灭代理
## 关于
@@ -224,9 +234,9 @@ time ?
----------------------------------------------------------------------------------------------
欢迎加入欢迎反馈bug
欢迎加入AUTO_MAA项目组欢迎反馈bug
QQ群没有
QQ群暂时没有
----------------------------------------------------------------------------------------------
@@ -249,4 +259,4 @@ QQ群没有
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=DLmaster361/AUTO_MAA&type=Date)](https://star-history.com/#DLmaster361/AUTO_MAA&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=DLmaster361/AUTO_MAA&type=Date)](https://star-history.com/#DLmaster361/AUTO_MAA&Date)

Binary file not shown.

View File

@@ -36,7 +36,6 @@ def readpass(text):
p+=typed.decode("utf-8")
sys.stdout.write(typed.decode("utf-8"))
sys.stdout.flush()
print('')
return p
@@ -101,7 +100,48 @@ def decryptx(note,PASSWORD):
private_key=RSA.import_key(private_key_pem)
#使用RSA私钥解密数据
decrypter=PKCS1_OAEP.new(private_key)
return decrypter.decrypt(note)
note=decrypter.decrypt(note)
return note.decode("utf-8")
#修改管理密钥
def changePASSWORD():
#获取用户信息
db=sqlite3.connect(DATABASE)
cur=db.cursor()
cur.execute("SELECT * FROM adminx WHERE True")
data=cur.fetchall()
cur.close()
db.close()
data=[list(row) for row in data]
global PASSWORD
#验证管理密钥
PASSWORDold=readpass("请输入旧管理密钥:")
if len(data)==0:
print("当前无用户,验证自动通过")
PASSWORDnew=readpass("请输入新管理密钥:")
getPASSWORD(PASSWORDnew)
PASSWORD=PASSWORDnew
return "管理密钥修改成功"
while decryptx(data[0][6],PASSWORDold)=="管理密钥错误":
print("管理密钥错误")
PASSWORDold=readpass("请输入旧管理密钥:")
print("验证通过")
#修改管理密钥
PASSWORDnew=readpass("请输入新管理密钥:")
#使用旧管理密钥解密
for i in range(len(data)):
data[i][6]=decryptx(data[i][6],PASSWORDold)
#使用新管理密钥重新加密
getPASSWORD(PASSWORDnew)
db=sqlite3.connect(DATABASE)
cur=db.cursor()
for i in range(len(data)):
cur.execute("UPDATE adminx SET password=? WHERE admin=?",(encryptx(data[i][6]),data[i][0]))
db.commit()
cur.close()
db.close()
PASSWORD=PASSWORDnew
return "管理密钥修改成功"
#添加用户
def add():
@@ -214,9 +254,9 @@ def search(id,book):
else:
#解密
global PASSWORD
if PASSWORD==0:
PASSWORD=input("请输入管理密钥:")
data[i][6]=decryptx(data[i][6],PASSWORD).decode("utf-8")
if PASSWORD==0 or decryptx(data[i][6],PASSWORD)=="管理密钥错误":
PASSWORD=readpass("请输入管理密钥:")
data[i][6]=decryptx(data[i][6],PASSWORD)
#制表输出
if book==1:
print('')
@@ -385,7 +425,7 @@ if not os.path.exists(DATABASE):
db.commit()
cur.close()
db.close()
PASSWORD=readpass("请设置管理密钥(密钥与数据库绑定且唯一不可变")
PASSWORD=readpass("请设置管理密钥(密钥与数据库绑定):")
getPASSWORD(PASSWORD)
#初始界面
@@ -397,24 +437,26 @@ while True:
read=input()
if len(read)==0:
print("无法识别的输入")
elif read[0]=='+':
elif read[0]=='+' and len(read)==1:
print(add())
elif read[0]=='-':
elif read[0]=='-' and len(read)==1:
exit()
elif read[0]=='/':
print(setpath(read[1:]))
elif read[0]=='*' and len(read)==1:
print(changePASSWORD())
elif read[0]==':' and (read[1]=='+' or read[1]=='-'):
print(settime(read[1],read[2:]))
else:
if read[-1]=='?':
if read[-1]=='?' and read[-2]==' ':
print(search(read[:-2],1))
elif read[-1]=='+':
elif read[-1]=='+' and read[-2]==' ':
print(renewal(read[:-2]))
elif read[-1]=='-':
elif read[-1]=='-' and read[-2]==' ':
print(delete(read[:-2]))
elif read[-1]=='~':
elif read[-1]=='~' and read[-2]==' ':
print(gameid(read[:-2]))
elif read[-1]=='y' or read[-1]=='n':
elif (read[-1]=='y' or read[-1]=='n') and read[-2]==' ':
print(turn(read[:-2],read[-1]))
else:
print("无法识别的输入")

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
run.exe

Binary file not shown.