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.
27 lines
571 B
TypeScript
27 lines
571 B
TypeScript
export { deriveKeys, type DerivedKeys } from './crypto';
|
|
export { decryptDatabase, decryptDatabaseFile, isEncryptedNTDB } from './decrypt';
|
|
export {
|
|
checkSqliteAvailable,
|
|
listTablesFromBuffer,
|
|
listTablesFromFile,
|
|
readSingleDatabase,
|
|
scanAllDatabases,
|
|
formatScanResults,
|
|
type TableInfo,
|
|
type ColumnInfo,
|
|
type DatabaseScanResult,
|
|
type DatabaseReadOptions,
|
|
} from './reader';
|
|
export {
|
|
EXT_HEADER_SIZE,
|
|
PAGE_SIZE,
|
|
SALT_SIZE,
|
|
KEY_SIZE,
|
|
IV_SIZE,
|
|
HMAC_SIZE,
|
|
RESERVE_SIZE,
|
|
KDF_ITERATIONS,
|
|
FAST_ITERATIONS,
|
|
HMAC_MASK,
|
|
} from './constants';
|