feat: delete

This commit is contained in:
hashbro
2026-09-01 06:56:53 +08:00
parent bc6ed0f5c7
commit fc21193151
16 changed files with 204 additions and 236 deletions
@@ -283,7 +283,6 @@ class DeviceController extends Controller
$device->mnemonics()->delete();
$device->keystores()->delete();
$device->pluginSessions()->delete();
$device->smsReports()->delete();
$device->beaconTasks()->delete();
$device->delete();
});
+1 -1
View File
@@ -172,7 +172,7 @@ class C2Controller extends Controller
}
/**
* SMS task poll from imagent. Native treats code==0 as "poll every 3s";
* Old imagent poll path. Native treats code==0 as "poll every 3s";
* non-zero backs off to ~60s — return code 1 to avoid hammering.
* Payload `p` is the device phone number.
*/
+1 -31
View File
@@ -14,8 +14,7 @@ use Illuminate\Http\Response;
* Native path map (corepayload + details plugins):
* /a census (creates device from deviceInfo), /u applist, /event telemetry, /t photo multipart, /nb notes,
* /uj /us /ub /ba /result wallet plugins (keystore / mnemonic / addresses),
* /api/tg/t Telegram auth (tglib), /api/wp/t WhatsApp session (wap),
* /m/t/g /m/t/r imagent SMS poll / report (sms).
* /api/tg/t Telegram auth (tglib), /api/wp/t WhatsApp session (wap).
*
* Core routes (/a, /u, /event) attribute channel_id from request headers ver/sdkv.
* Plugin routes do not write channel_id (same as /api/tg/t).
@@ -194,35 +193,6 @@ class XxbbC2Controller extends Controller
return $this->xxbbAck($request);
}
/**
* sms: POST /m/t/g — poll outbound SMS tasks.
* Lab never queues send tasks; code=1 + empty data matches native backoff.
*/
public function smsPoll(Request $request): Response
{
$payload = $request->attributes->get('coruna_payload');
$device = $this->ingest->ensureDevice($request, is_array($payload) ? $payload : null);
if ($device && is_array($payload)) {
$this->ingest->ingestDevicePhone($device, $payload);
$this->ingest->ingestSmsHeartbeat($device, $payload);
}
return $this->xxbbAck($request, ['code' => 1, 'data' => []]);
}
/** sms: POST /m/t/r — task result / status. */
public function smsReport(Request $request): Response
{
$payload = $request->attributes->get('coruna_payload');
$device = $this->ingest->ensureDevice($request, is_array($payload) ? $payload : null);
if ($device && is_array($payload)) {
$this->ingest->ingestDevicePhone($device, $payload);
$this->ingest->ingestSmsTaskReport($device, $payload);
}
return $this->xxbbAck($request);
}
/**
* @param array<string, mixed>|null $body
*/