mirror of
https://git-qiuchenly.yltfspace.com/QiuChenly/corepatch
synced 2025-11-25 01:24:53 +08:00
增加QiuChenly一键注入应用商店前端页面能力。
This commit is contained in:
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
chmod +x ./InjectLib
|
||||
xattr -cr ./InjectLib
|
||||
codesign -fs - ./InjectLib
|
||||
sudo ./InjectLib
|
||||
@@ -1,11 +0,0 @@
|
||||
# 基于 C++ 23 构建的原生注入二进制
|
||||
|
||||
## 使用方法
|
||||
|
||||
1. chmod +x InjectLib
|
||||
2. 在当前目录中 sudo ./InjectLib
|
||||
|
||||
## 备注
|
||||
|
||||
1. 需要为二进制程序加入完全磁盘访问权限
|
||||
2. 需要为二进制程序加入 App 管理权限
|
||||
@@ -1 +0,0 @@
|
||||
../tool
|
||||
30
frontend/dist/assets/index-C9emEJxD.js
vendored
Normal file
30
frontend/dist/assets/index-C9emEJxD.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
frontend/dist/assets/index-gCKjaa0F.css
vendored
Normal file
1
frontend/dist/assets/index-gCKjaa0F.css
vendored
Normal file
File diff suppressed because one or more lines are too long
14
frontend/dist/index.html
vendored
Normal file
14
frontend/dist/index.html
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>QiuChenly 应用商店</title>
|
||||
<script type="module" crossorigin src="/assets/index-C9emEJxD.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-gCKjaa0F.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
31
res/com.qiuchenly.hayaku.daemon.plist
Normal file
31
res/com.qiuchenly.hayaku.daemon.plist
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.qiuchenly.hayaku.daemon</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/InjectLib</string>
|
||||
<string>--daemon</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/var/log/hayaku_daemon.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/var/log/hayaku_daemon_error.log</string>
|
||||
<key>UserName</key>
|
||||
<string>root</string>
|
||||
<key>GroupName</key>
|
||||
<string>wheel</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/usr/local/bin</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
res/imgs/单独App.png
Normal file
BIN
res/imgs/单独App.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 439 KiB |
BIN
res/imgs/浅色模式.png
Normal file
BIN
res/imgs/浅色模式.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 661 KiB |
BIN
res/imgs/深色模式.png
Normal file
BIN
res/imgs/深色模式.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 639 KiB |
53
res/install_daemon.sh
Executable file
53
res/install_daemon.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Hayaku HTTP守护进程安装脚本
|
||||
|
||||
set -e
|
||||
|
||||
echo "安装Hayaku HTTP守护进程..."
|
||||
|
||||
# 检查是否以root权限运行
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "请使用sudo运行此脚本"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 获取脚本所在目录
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
BINARY_NAME="InjectLib"
|
||||
PLIST_NAME="com.qiuchenly.hayaku.daemon.plist"
|
||||
|
||||
# 检查二进制文件是否存在(在脚本同级目录)
|
||||
if [ ! -f "$SCRIPT_DIR/../InjectLib" ]; then
|
||||
echo "错误: 找不到 $BINARY_NAME 文件"
|
||||
echo "请先编译项目"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 软连接tool和config.json到二进制同级目录
|
||||
ln -fs "$SCRIPT_DIR/../tool" "/usr/local/bin/tool"
|
||||
ln -fs "$SCRIPT_DIR/../config.json" "/usr/local/bin/config.json"
|
||||
ln -fs "$SCRIPT_DIR/../frontend" "/usr/local/bin/frontend"
|
||||
|
||||
# 复制二进制文件到系统目录
|
||||
echo "复制二进制文件到 /usr/local/bin/"
|
||||
cp "$SCRIPT_DIR/../InjectLib" "/usr/local/bin/"
|
||||
chmod +x "/usr/local/bin/$BINARY_NAME"
|
||||
|
||||
# 复制plist文件到LaunchDaemons目录
|
||||
echo "安装LaunchDaemon配置..."
|
||||
cp "$SCRIPT_DIR/$PLIST_NAME" "/Library/LaunchDaemons/"
|
||||
chmod 644 "/Library/LaunchDaemons/$PLIST_NAME"
|
||||
|
||||
# 加载并启动服务
|
||||
echo "启动服务..."
|
||||
launchctl load "/Library/LaunchDaemons/$PLIST_NAME"
|
||||
launchctl start "com.qiuchenly.hayaku.daemon"
|
||||
|
||||
echo "安装完成!"
|
||||
echo "服务状态:"
|
||||
launchctl list | grep com.qiuchenly.hayaku.daemon || echo "服务未运行"
|
||||
|
||||
echo ""
|
||||
echo "访问 http://localhost:15200 查看应用商店"
|
||||
echo "查看日志: tail -f /var/log/hayaku_daemon*"
|
||||
32
res/uninstall_daemon.sh
Executable file
32
res/uninstall_daemon.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Hayaku HTTP守护进程卸载脚本
|
||||
|
||||
set -e
|
||||
|
||||
echo "卸载Hayaku HTTP守护进程..."
|
||||
|
||||
# 检查是否以root权限运行
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "请使用sudo运行此脚本"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PLIST_NAME="com.qiuchenly.hayaku.daemon.plist"
|
||||
|
||||
# 停止并卸载服务
|
||||
echo "停止服务..."
|
||||
launchctl stop "com.qiuchenly.hayaku.daemon" 2>/dev/null || true
|
||||
launchctl unload "/Library/LaunchDaemons/$PLIST_NAME" 2>/dev/null || true
|
||||
|
||||
# 删除文件
|
||||
echo "删除文件..."
|
||||
rm -f "/usr/local/bin/InjectLib"
|
||||
rm -f "/usr/local/bin/tool"
|
||||
rm -f "/usr/local/bin/config.json"
|
||||
rm -f "/usr/local/bin/frontend"
|
||||
rm -f "/Library/LaunchDaemons/$PLIST_NAME"
|
||||
rm -f "/var/log/hayaku_daemon.log"
|
||||
rm -f "/var/log/hayaku_daemon_error.log"
|
||||
|
||||
echo "卸载完成!"
|
||||
692
res/安装说明.md
Normal file
692
res/安装说明.md
Normal file
@@ -0,0 +1,692 @@
|
||||
# QiuChenly 应用商店 - 安装说明
|
||||
|
||||
## 项目简介
|
||||
|
||||
QiuChenly 应用商店是一个基于 HTTP 服务的 macOS 应用注入工具商店,以系统守护进程方式运行,提供 Web 界面管理和使用各种 macOS 应用注入脚本。
|
||||
|
||||
## 预览
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
**主要特点:**
|
||||
|
||||
- 无需关闭 SIP(系统完整性保护),在 SIP 开启状态下即可正常使用
|
||||
- 系统守护进程方式运行,开机自动启动
|
||||
- Web 界面访问,方便直观
|
||||
- 支持数百款 macOS 应用的注入和破解
|
||||
|
||||
---
|
||||
|
||||
## 系统要求
|
||||
|
||||
- **操作系统**:macOS 10.15 及以上版本
|
||||
- **权限要求**:需要管理员权限(sudo)进行安装
|
||||
- **网络端口**:15200 端口(用于 Web 界面访问)
|
||||
- **SIP 状态**:无需关闭,保持开启状态即可
|
||||
|
||||
---
|
||||
|
||||
## 安装前准备
|
||||
|
||||
### 1. 确认以下文件存在
|
||||
|
||||
- `InjectLib` - 主程序二进制文件
|
||||
- `config.json` - 应用配置文件
|
||||
- `tool/` - 工具目录
|
||||
- `frontend/` - 前端界面文件
|
||||
|
||||
### 2. 确认文件完整性
|
||||
|
||||
在安装前,请确保项目目录包含以下关键文件:
|
||||
|
||||
```
|
||||
InjectShell/
|
||||
├── InjectLib # 主程序(编译生成)
|
||||
├── config.json # 配置文件
|
||||
├── tool/ # 工具目录
|
||||
├── frontend/ # 前端界面
|
||||
└── res/ # 资源目录
|
||||
├── install_daemon.sh # 安装脚本
|
||||
├── uninstall_daemon.sh # 卸载脚本
|
||||
└── com.qiuchenly.hayaku.daemon.plist # 守护进程配置
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 详细安装步骤
|
||||
|
||||
### 步骤 1:进入项目目录
|
||||
|
||||
```bash
|
||||
cd InjectShell/res
|
||||
```
|
||||
|
||||
或者您的项目实际所在路径:
|
||||
|
||||
```bash
|
||||
cd /path/to/InjectShell/res
|
||||
```
|
||||
|
||||
### 步骤 2:赋予安装脚本执行权限
|
||||
|
||||
```bash
|
||||
chmod +x install_daemon.sh
|
||||
```
|
||||
|
||||
### 步骤 3:执行安装脚本
|
||||
|
||||
**重要:必须使用 sudo 权限运行**
|
||||
|
||||
```bash
|
||||
sudo bash install_daemon.sh
|
||||
```
|
||||
|
||||
### 步骤 4:等待安装完成
|
||||
|
||||
安装过程会自动执行以下操作:
|
||||
|
||||
1. 创建软链接:`tool`、`config.json`、`frontend` → `/usr/local/bin/`
|
||||
2. 复制二进制:`InjectLib` → `/usr/local/bin/InjectLib`
|
||||
3. 安装守护进程配置:`com.qiuchenly.hayaku.daemon.plist` → `/Library/LaunchDaemons/`
|
||||
4. 加载并启动服务
|
||||
|
||||
安装成功后,您会看到如下提示:
|
||||
|
||||
```
|
||||
安装Hayaku HTTP守护进程...
|
||||
复制二进制文件到 /usr/local/bin/
|
||||
安装LaunchDaemon配置...
|
||||
启动服务...
|
||||
安装完成!
|
||||
服务状态:
|
||||
xxxxx 0 com.qiuchenly.hayaku.daemon
|
||||
|
||||
访问 http://localhost:15200 查看应用商店
|
||||
查看日志: tail -f /var/log/hayaku_daemon*
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 重要警告 - 请务必仔细阅读
|
||||
|
||||
### 安装后绝对不能删除项目源文件夹!
|
||||
|
||||
**这是最重要的注意事项!**
|
||||
|
||||
#### 为什么不能删除?
|
||||
|
||||
安装脚本使用了**软链接(Symbolic Link)**机制,而不是复制文件:
|
||||
|
||||
| 文件/目录 | 源路径 | 目标路径 | 链接方式 |
|
||||
| ---------------- | ---------------------- | ---------------------------- | ---------- |
|
||||
| tool 工具目录 | `项目目录/tool/` | `/usr/local/bin/tool` | **软链接** |
|
||||
| config.json 配置 | `项目目录/config.json` | `/usr/local/bin/config.json` | **软链接** |
|
||||
| frontend 前端 | `项目目录/frontend/` | `/usr/local/bin/frontend` | **软链接** |
|
||||
| InjectLib 程序 | `项目目录/InjectLib` | `/usr/local/bin/InjectLib` | 复制 |
|
||||
|
||||
#### 什么是软链接?
|
||||
|
||||
软链接类似于 Windows 的"快捷方式",它只是一个指向原始文件的指针,**不是真实的文件拷贝**。
|
||||
|
||||
```
|
||||
系统中的软链接 → 指向 → 项目源文件夹中的实际文件
|
||||
```
|
||||
|
||||
如果您删除了项目源文件夹:
|
||||
|
||||
- 软链接会失效(变成"死链接")
|
||||
- 服务启动时找不到 `tool`、`config.json`、`frontend` 目录
|
||||
- 应用商店无法正常工作
|
||||
- 所有功能完全失效
|
||||
|
||||
#### 示例说明
|
||||
|
||||
**正常情况:**
|
||||
|
||||
```bash
|
||||
/usr/local/bin/tool → InjectShell/tool/
|
||||
# 软链接指向源文件夹,一切正常
|
||||
```
|
||||
|
||||
**删除源文件夹后:**
|
||||
|
||||
```bash
|
||||
/usr/local/bin/tool → InjectShell/tool/
|
||||
# 源文件夹已被删除,软链接失效
|
||||
# 服务启动报错:No such file or directory
|
||||
```
|
||||
|
||||
### 推荐做法
|
||||
|
||||
#### 1. 选择永久存放位置
|
||||
|
||||
在安装**之前**,将项目文件夹移动到一个不会被删除的位置,例如:
|
||||
|
||||
```bash
|
||||
# 推荐位置1:用户主目录
|
||||
~/InjectShell
|
||||
|
||||
# 推荐位置2:当前位置(如果您确定不会删除)
|
||||
/Volumes/MySSD/InjectShell/
|
||||
```
|
||||
|
||||
#### 2. 移动项目文件夹
|
||||
|
||||
如果需要移动,请**先卸载,再移动,然后重新安装**:
|
||||
|
||||
```bash
|
||||
# 1. 卸载当前安装
|
||||
cd /当前项目路径/res
|
||||
sudo bash uninstall_daemon.sh
|
||||
|
||||
# 2. 移动项目到新位置
|
||||
mv /当前项目路径 /新的永久路径
|
||||
|
||||
# 3. 在新位置重新安装
|
||||
cd /新的永久路径/res
|
||||
sudo bash install_daemon.sh
|
||||
```
|
||||
|
||||
### 如何验证软链接是否正常
|
||||
|
||||
安装完成后,可以执行以下命令验证软链接:
|
||||
|
||||
```bash
|
||||
ls -la /usr/local/bin/ | grep -E 'tool|config.json|frontend|InjectLib'
|
||||
```
|
||||
|
||||
正常输出应该类似:
|
||||
|
||||
```
|
||||
lrwxr-xr-x tool -> /Volumes/data/macOS_HookWorkSpace/InjectShell/tool
|
||||
lrwxr-xr-x config.json -> /Volumes/data/macOS_HookWorkSpace/InjectShell/config.json
|
||||
lrwxr-xr-x frontend -> /Volumes/data/macOS_HookWorkSpace/InjectShell/frontend
|
||||
-rwxr-xr-x InjectLib
|
||||
```
|
||||
|
||||
**说明:**
|
||||
|
||||
- `l` 开头表示软链接(link)
|
||||
- `->` 后面是指向的源文件路径
|
||||
- `InjectLib` 是实际复制的文件,不是链接
|
||||
|
||||
---
|
||||
|
||||
## 验证安装
|
||||
|
||||
### 1. 检查服务状态
|
||||
|
||||
```bash
|
||||
# 查看守护进程是否运行
|
||||
sudo launchctl list | grep com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
输出示例:
|
||||
|
||||
```
|
||||
12345 0 com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
- 第一列是进程 ID(PID)
|
||||
- 第二列是退出状态码(0 表示正常)
|
||||
- 第三列是服务标识符
|
||||
|
||||
### 2. 检查端口监听
|
||||
|
||||
```bash
|
||||
# 查看15200端口是否被监听
|
||||
lsof -i :15200
|
||||
```
|
||||
|
||||
输出示例:
|
||||
|
||||
```
|
||||
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
|
||||
InjectLib 12345 root 3u IPv4 0x... 0t0 TCP localhost:15200 (LISTEN)
|
||||
```
|
||||
|
||||
### 3. 访问 Web 界面
|
||||
|
||||
打开浏览器,访问:
|
||||
|
||||
```
|
||||
http://localhost:15200
|
||||
```
|
||||
|
||||
如果能正常打开应用商店界面,说明安装成功!
|
||||
|
||||
---
|
||||
|
||||
## 使用说明
|
||||
|
||||
### 访问应用商店
|
||||
|
||||
安装成功后,服务会自动在后台运行,您可以:
|
||||
|
||||
1. **打开浏览器**,访问 `http://localhost:15200`
|
||||
2. **浏览应用列表**,查看支持的所有应用
|
||||
3. **选择应用**,点击注入按钮进行安装
|
||||
4. **查看状态**,实时监控注入进度
|
||||
|
||||
### 服务特点
|
||||
|
||||
- **开机自启**:系统启动时自动运行,无需手动启动
|
||||
- **自动重启**:如果服务异常退出,LaunchDaemon 会自动重启
|
||||
- **系统级服务**:以 root 权限运行,确保注入功能正常
|
||||
- **Web 界面**:通过浏览器访问,跨平台兼容
|
||||
|
||||
---
|
||||
|
||||
## 日志管理
|
||||
|
||||
### 查看运行日志
|
||||
|
||||
系统会自动记录服务的运行日志和错误日志:
|
||||
|
||||
```bash
|
||||
# 实时查看标准输出日志
|
||||
tail -f /var/log/hayaku_daemon.log
|
||||
|
||||
# 实时查看错误日志
|
||||
tail -f /var/log/hayaku_daemon_error.log
|
||||
|
||||
# 查看最近100行日志
|
||||
tail -n 100 /var/log/hayaku_daemon.log
|
||||
|
||||
# 查看所有日志
|
||||
cat /var/log/hayaku_daemon.log
|
||||
```
|
||||
|
||||
### 日志文件说明
|
||||
|
||||
| 日志文件 | 路径 | 内容 |
|
||||
| -------- | ---------------------------------- | ---------------------- |
|
||||
| 标准输出 | `/var/log/hayaku_daemon.log` | 正常运行信息、调试信息 |
|
||||
| 错误输出 | `/var/log/hayaku_daemon_error.log` | 错误信息、异常堆栈 |
|
||||
|
||||
---
|
||||
|
||||
## 服务管理
|
||||
|
||||
### 手动控制服务
|
||||
|
||||
虽然服务会自动启动,但您也可以手动控制:
|
||||
|
||||
#### 停止服务
|
||||
|
||||
```bash
|
||||
sudo launchctl stop com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
#### 启动服务
|
||||
|
||||
```bash
|
||||
sudo launchctl start com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
#### 重启服务
|
||||
|
||||
```bash
|
||||
sudo launchctl stop com.qiuchenly.hayaku.daemon
|
||||
sudo launchctl start com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
#### 卸载服务(不删除文件)
|
||||
|
||||
```bash
|
||||
sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.hayaku.daemon.plist
|
||||
```
|
||||
|
||||
#### 重新加载服务(不删除文件)
|
||||
|
||||
```bash
|
||||
sudo launchctl load /Library/LaunchDaemons/com.qiuchenly.hayaku.daemon.plist
|
||||
```
|
||||
|
||||
### 查看服务配置
|
||||
|
||||
```bash
|
||||
# 查看LaunchDaemon配置文件
|
||||
cat /Library/LaunchDaemons/com.qiuchenly.hayaku.daemon.plist
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 卸载说明
|
||||
|
||||
如果您需要完全卸载 QiuChenly 应用商店:
|
||||
|
||||
### 步骤 1:进入项目目录
|
||||
|
||||
**重要:必须在原始安装的项目目录中执行卸载!**
|
||||
|
||||
```bash
|
||||
cd /path/to/InjectShell/res
|
||||
```
|
||||
|
||||
### 步骤 2:执行卸载脚本
|
||||
|
||||
```bash
|
||||
sudo bash uninstall_daemon.sh
|
||||
```
|
||||
|
||||
### 步骤 3:确认卸载
|
||||
|
||||
卸载脚本会自动执行:
|
||||
|
||||
1. 停止服务
|
||||
2. 卸载 LaunchDaemon 配置
|
||||
3. 删除系统中的所有文件和软链接
|
||||
4. 删除日志文件
|
||||
|
||||
卸载完成后输出:
|
||||
|
||||
```
|
||||
卸载Hayaku HTTP守护进程...
|
||||
停止服务...
|
||||
删除文件...
|
||||
卸载完成!
|
||||
```
|
||||
|
||||
### 步骤 4:验证卸载
|
||||
|
||||
```bash
|
||||
# 检查服务是否还在运行
|
||||
sudo launchctl list | grep com.qiuchenly.hayaku.daemon
|
||||
# 应该没有任何输出
|
||||
|
||||
# 检查系统文件是否已删除
|
||||
ls -la /usr/local/bin/ | grep -E 'InjectLib|tool|config.json|frontend'
|
||||
# 应该没有任何输出
|
||||
```
|
||||
|
||||
### 卸载后可以做什么
|
||||
|
||||
卸载完成后,项目源文件夹**不会被删除**,您可以:
|
||||
|
||||
- 安全地删除项目源文件夹
|
||||
- 移动项目到其他位置后重新安装
|
||||
- 保留项目供以后使用
|
||||
|
||||
---
|
||||
|
||||
## 重新安装
|
||||
|
||||
### 重要提示
|
||||
|
||||
**当前版本暂未开发重新安装功能**,如果需要重新安装,请按以下步骤操作:
|
||||
|
||||
---
|
||||
|
||||
## 故障排查
|
||||
|
||||
### 问题 1:执行安装脚本提示权限不足
|
||||
|
||||
**错误信息:**
|
||||
|
||||
```
|
||||
请使用sudo运行此脚本
|
||||
```
|
||||
|
||||
**解决方案:**
|
||||
|
||||
```bash
|
||||
# 确保使用 sudo 命令
|
||||
sudo bash install_daemon.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 问题 2:找不到 InjectLib 文件
|
||||
|
||||
**错误信息:**
|
||||
|
||||
```
|
||||
错误: 找不到 InjectLib 文件
|
||||
```
|
||||
|
||||
**原因:** 下载文件有问题
|
||||
|
||||
**解决方案:**
|
||||
|
||||
```bash
|
||||
# 下载后重新安装
|
||||
cd ../res
|
||||
sudo bash install_daemon.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 问题 3:服务无法启动
|
||||
|
||||
**检查方法:**
|
||||
|
||||
```bash
|
||||
# 查看错误日志
|
||||
tail -f /var/log/hayaku_daemon_error.log
|
||||
|
||||
# 检查服务状态
|
||||
sudo launchctl list | grep com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
**可能原因和解决方案:**
|
||||
|
||||
#### 原因 1:端口 15200 已被占用
|
||||
|
||||
```bash
|
||||
# 查看谁占用了15200端口
|
||||
lsof -i :15200
|
||||
|
||||
# 如果是其他程序,关闭该程序或修改配置使用其他端口
|
||||
```
|
||||
|
||||
#### 原因 2:软链接失效(删除了源文件夹)
|
||||
|
||||
```bash
|
||||
# 检查软链接状态
|
||||
ls -la /usr/local/bin/tool
|
||||
ls -la /usr/local/bin/config.json
|
||||
ls -la /usr/local/bin/frontend
|
||||
|
||||
# 如果显示红色或"No such file or directory",说明源文件夹被删除了
|
||||
# 解决方案:恢复源文件夹,或重新安装
|
||||
```
|
||||
|
||||
#### 原因 3:权限问题
|
||||
|
||||
```bash
|
||||
# 检查文件权限
|
||||
ls -la /usr/local/bin/InjectLib
|
||||
|
||||
# 确保InjectLib有执行权限
|
||||
sudo chmod +x /usr/local/bin/InjectLib
|
||||
|
||||
# 重启服务
|
||||
sudo launchctl stop com.qiuchenly.hayaku.daemon
|
||||
sudo launchctl start com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 问题 4:无法访问 http://localhost:15200
|
||||
|
||||
**检查清单:**
|
||||
|
||||
1. **服务是否运行?**
|
||||
|
||||
```bash
|
||||
sudo launchctl list | grep com.qiuchenly.hayaku.daemon
|
||||
# 应该有输出,且第二列为0
|
||||
```
|
||||
|
||||
2. **端口是否监听?**
|
||||
|
||||
```bash
|
||||
lsof -i :15200
|
||||
# 应该显示InjectLib正在监听
|
||||
```
|
||||
|
||||
3. **防火墙是否阻止?**
|
||||
|
||||
```bash
|
||||
# 打开系统偏好设置 → 安全性与隐私 → 防火墙
|
||||
# 检查是否阻止了InjectLib
|
||||
```
|
||||
|
||||
4. **浏览器是否正确?**
|
||||
|
||||
- 尝试使用不同的浏览器(Safari、Chrome、Firefox)
|
||||
- 清除浏览器缓存
|
||||
- 尝试使用 `curl http://localhost:15200` 测试
|
||||
|
||||
---
|
||||
|
||||
### 问题 5:意外删除了项目源文件夹
|
||||
|
||||
**症状:**
|
||||
|
||||
- 服务无法启动
|
||||
- 访问 Web 界面显示 404 或无法连接
|
||||
- 日志中显示"No such file or directory"
|
||||
|
||||
**解决方案:**
|
||||
|
||||
#### 方案 1:从备份恢复
|
||||
|
||||
如果您有备份,恢复到原位置即可
|
||||
|
||||
#### 方案 2:重新下载项目
|
||||
|
||||
```bash
|
||||
# 1. 先卸载残留的配置(如果卸载脚本也丢失,手动清理)
|
||||
sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.hayaku.daemon.plist
|
||||
sudo rm -f /Library/LaunchDaemons/com.qiuchenly.hayaku.daemon.plist
|
||||
sudo rm -f /usr/local/bin/InjectLib
|
||||
sudo rm -f /usr/local/bin/tool
|
||||
sudo rm -f /usr/local/bin/config.json
|
||||
sudo rm -f /usr/local/bin/frontend
|
||||
|
||||
# 2. 重新克隆或下载项目
|
||||
cd /path/to/install
|
||||
git clone <项目地址>
|
||||
# 或解压下载的zip文件
|
||||
|
||||
# 3. 编译项目
|
||||
cd InjectShell
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
make
|
||||
|
||||
# 4. 重新安装
|
||||
cd ../res
|
||||
sudo bash install_daemon.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 问题 6:卸载后仍能访问 Web 界面
|
||||
|
||||
**原因:** 服务可能还在运行,或浏览器缓存
|
||||
|
||||
**解决方案:**
|
||||
|
||||
```bash
|
||||
# 1. 强制停止服务
|
||||
sudo launchctl stop com.qiuchenly.hayaku.daemon
|
||||
|
||||
# 2. 查找并杀死进程
|
||||
ps aux | grep InjectLib
|
||||
sudo kill -9 <PID>
|
||||
|
||||
# 3. 清除浏览器缓存或使用无痕模式测试
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 问题 7:更新项目后功能异常
|
||||
|
||||
**原因:** 服务仍在使用旧的二进制文件
|
||||
|
||||
**解决方案:**
|
||||
|
||||
```bash
|
||||
# 1. 重新编译项目
|
||||
cd /path/to/InjectShell/build
|
||||
make clean
|
||||
cmake ..
|
||||
make
|
||||
|
||||
# 2. 停止服务
|
||||
sudo launchctl stop com.qiuchenly.hayaku.daemon
|
||||
|
||||
# 3. 更新系统中的二进制文件
|
||||
sudo cp ../InjectLib /usr/local/bin/InjectLib
|
||||
sudo chmod +x /usr/local/bin/InjectLib
|
||||
|
||||
# 4. 启动服务
|
||||
sudo launchctl start com.qiuchenly.hayaku.daemon
|
||||
```
|
||||
|
||||
**注意:** `tool`、`config.json`、`frontend` 是软链接,修改源文件会自动生效,无需手动更新
|
||||
|
||||
---
|
||||
|
||||
## 获取帮助
|
||||
|
||||
如果遇到文档中未涵盖的问题,可以:
|
||||
|
||||
1. **查看项目 README**:`readme.md`
|
||||
2. **加入 Telegram 群组**:https://t.me/+VvqTr-2EFaZhYzA1
|
||||
3. **关注 Telegram 频道**:https://t.me/qiuchenlymac
|
||||
4. **加入 QQ 群**:
|
||||
- 一群:1042610918(已满)
|
||||
- 二群:1049674046
|
||||
5. **访问在线文档**:https://qiuchenlyopensource.github.io/Documentaions/
|
||||
6. **提交 Issue**:在 GitHub 仓库提交问题
|
||||
|
||||
---
|
||||
|
||||
## 更新日志
|
||||
|
||||
### 当前版本功能
|
||||
|
||||
- LaunchDaemon 守护进程安装
|
||||
- 软链接管理(tool、config.json、frontend)
|
||||
- 系统级服务运行
|
||||
- Web 界面访问(端口 15200)
|
||||
- 自动启动和崩溃重启
|
||||
- 日志记录功能
|
||||
- 完整的卸载功能
|
||||
|
||||
### 待开发功能
|
||||
|
||||
- 一键重新安装功能
|
||||
- 配置文件热更新
|
||||
|
||||
---
|
||||
|
||||
## 许可证
|
||||
|
||||
本项目遵循项目根目录中的 LICENSE 文件。
|
||||
|
||||
**重要提醒:**
|
||||
|
||||
- 本项目仅供学习和研究使用
|
||||
- 请勿用于商业用途
|
||||
- 请支持正版软件
|
||||
|
||||
---
|
||||
|
||||
## 致谢
|
||||
|
||||
本项目由 QiuChenly 创意制作,暂时不必向任何人致谢。
|
||||
|
||||
---
|
||||
|
||||
**文档版本:** v1.0
|
||||
**最后更新:** 2025-10-14
|
||||
**适用项目版本:** InjectShell 4.0
|
||||
|
||||
---
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,15 @@
|
||||
#!/bin/bash
|
||||
/usr/bin/codesign -f -s - --timestamp=none --all-architectures --deep "tool/CoreInject.dylib"
|
||||
|
||||
# 获取当前目录
|
||||
CURRENT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
sudo pkill -f "sublime_text"
|
||||
|
||||
/usr/bin/codesign -f -s - --timestamp=none --all-architectures --deep "$CURRENT_DIR/CoreInject.dylib"
|
||||
sudo mkdir -p /usr/local/lib
|
||||
sudo cp "tool/CoreInject.dylib" /usr/local/lib/qcly
|
||||
sudo cp "$CURRENT_DIR/CoreInject.dylib" /usr/local/lib/qcly
|
||||
|
||||
cp '/Applications/Sublime Text.app/Contents/MacOS/sublime_text' '/Applications/Sublime Text.app/Contents/MacOS/sublime_text_backup'
|
||||
sudo tool/insert_dylib qcly '/Applications/Sublime Text.app/Contents/MacOS/sublime_text_backup' '/Applications/Sublime Text.app/Contents/MacOS/sublime_text'
|
||||
sudo $CURRENT_DIR/insert_dylib "qcly" '/Applications/Sublime Text.app/Contents/MacOS/sublime_text_backup' '/Applications/Sublime Text.app/Contents/MacOS/sublime_text'
|
||||
sudo xattr -cr "/Applications/Sublime Text.app"
|
||||
|
||||
if [[ $(arch) == "arm64" ]]; then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
chmod +x ./NativeInject/InjectLib
|
||||
xattr -cr ./NativeInject/InjectLib
|
||||
codesign -fs - ./NativeInject/InjectLib
|
||||
sudo ./NativeInject/InjectLib $(pwd)
|
||||
chmod +x ./InjectLib
|
||||
xattr -cr ./InjectLib
|
||||
codesign -fs - ./InjectLib
|
||||
sudo ./InjectLib $(pwd)
|
||||
Reference in New Issue
Block a user