Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Common constants PageSize = 4096 KeySize = 32 SaltSize = 16 AESBlockSize = 16 SQLiteHeader = "SQLite format 3\x00" // Version specific constants V3IterCount = 64000 V4IterCount = 256000 IVSize = 16 // Same for both versions HmacSHA1Size = 20 // Used in V3 HmacSHA512Size = 64 // Used in V4 )
Constants for WeChat database decryption
View Source
const ( StatusInit = "" StatusOffline = "offline" StatusOnline = "online" )
View Source
const ( V3ProcessName = "WeChat" V4ProcessName = "Weixin" )
Variables ¶
View Source
var ( ErrHashVerificationFailed = errors.New("hash verification failed") ErrInvalidVersion = errors.New("invalid version, must be 3 or 4") ErrInvalidKey = errors.New("invalid key format") ErrIncorrectKey = errors.New("incorrect decryption key") ErrReadFile = errors.New("failed to read database file") ErrOpenFile = errors.New("failed to open database file") ErrIncompleteRead = errors.New("incomplete header read") ErrCreateCipher = errors.New("failed to create cipher") ErrDecodeKey = errors.New("failed to decode hex key") ErrWriteOutput = errors.New("failed to write output") ErrSeekFile = errors.New("failed to seek in file") ErrOperationCanceled = errors.New("operation was canceled") ErrAlreadyDecrypted = errors.New("file is already decrypted") )
Error definitions
View Source
var ( Items []*Info ItemMap map[string]*Info )
Functions ¶
func DecryptDBFile ¶
DecryptDBFile decrypts a WeChat database file and returns the decrypted content
func DecryptDBFileToFile ¶
DecryptDBFileToFile decrypts a WeChat database file and saves the result to the specified output file
Types ¶
type Decryptor ¶
type Decryptor struct {
// contains filtered or unexported fields
}
Decryptor handles the decryption of WeChat database files
func NewDecryptor ¶
NewDecryptor creates a new Decryptor for the specified database file and version
func (*Decryptor) Decrypt ¶
Decrypt decrypts the database using the provided key and writes the result to the writer
func (*Decryptor) GetTotalPages ¶
GetTotalPages returns the total number of pages in the database
Click to show internal directories.
Click to hide internal directories.