Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Common image format definitions JPG = Format{Header: []byte{0xFF, 0xD8, 0xFF}, Ext: "jpg"} PNG = Format{Header: []byte{0x89, 0x50, 0x4E, 0x47}, Ext: "png"} GIF = Format{Header: []byte{0x47, 0x49, 0x46, 0x38}, Ext: "gif"} TIFF = Format{Header: []byte{0x49, 0x49, 0x2A, 0x00}, Ext: "tiff"} BMP = Format{Header: []byte{0x42, 0x4D}, Ext: "bmp"} Formats = []Format{JPG, PNG, GIF, TIFF, BMP} // WeChat v4 related constants V4XorKey byte = 0x37 // Default XOR key for WeChat v4 dat files V4DatHeader = []byte{0x07, 0x08, 0x56, 0x31} // WeChat v4 dat file header JpgTail = []byte{0xFF, 0xD9} // JPG file tail marker )
Functions ¶
func Dat2Image ¶
Dat2Image converts WeChat dat file data to image data Returns the decoded image data, file extension, and any error encountered
func Dat2ImageV4 ¶ added in v0.0.6
Dat2ImageV4 processes WeChat v4 dat image files WeChat v4 uses a combination of AES-ECB and XOR encryption
func ScanAndSetXorKey ¶ added in v0.0.6
ScanAndSetXorKey scans a directory for "_t.dat" files to calculate and set the global XOR key for WeChat v4 dat files Returns the found key and any error encountered
Types ¶
Click to show internal directories.
Click to hide internal directories.