Add napcat-database and DatabaseApi support

Introduce a new napcat-database package that implements SQLCipher/NTQQ DB handling (constants, key derivation, page decryption, file-level decrypt, and a reader that can list tables using node:sqlite). Add NTQQDatabaseApi to napcat-core (APIs export, NapCatCore field & container) to expose high-level helpers (isSqliteAvailable, readDatabase, scanDatabases, decryptDatabase, formatResults). Add protobuf definitions for OidbSvcTrpcTcp.0xcde_2 and hook packet handlers in framework and shell to capture the DB passphrase and set core.dbPassphrase. Update package.json files and vite configs to include napcat-database/napcat-protobuf and allow node:sqlite, and update pnpm-lock accordingly.
This commit is contained in:
手瓜一十雪 committed 2026-03-04 10:56:18 +08:00
1 parent b42b6c3cf0
commit b9dcedacf5
20 files changed
+775 -39

No files matched your search

@@ -25,6 +25,7 @@ export * from './oidb/Oidb.0x929';
export * from './oidb/Oidb.0xE37_1200';
export * from './oidb/Oidb.0xE37_1700';
export * from './oidb/Oidb.0XE37_800';
export * from './oidb/Oidb.0xCDE_2';
export * from './oidb/Oidb.0xEB7';
export * from './oidb/Oidb.0xED3_1';
export * from './oidb/Oidb.0XFE1_2';
@@ -0,0 +1,11 @@
import { ProtoField, ScalarType } from 'napcat-protobuf';
// OidbSvcTrpcTcp.0xcde_2 响应体
// body.field2.field1 为目标字符串值
export const OidbSvcTrpcTcp0XCDE_2RespBodyInner = {
value: ProtoField(1, ScalarType.STRING),
};
export const OidbSvcTrpcTcp0XCDE_2RespBody = {
inner: ProtoField(2, () => OidbSvcTrpcTcp0XCDE_2RespBodyInner),
};