Documentation ¶
Index ¶
Constants ¶
View Source
const ZIP_ECD_FIELD_CENTRAL_DIRECTORY_SIZE = 12
Size of the central directory in bytes
View Source
const ZIP_ECD_FIELD_COMMENT_SIZE = 20
Size of the variable-length comment field in the end-of-central-directory record
View Source
const ZIP_ECD_FIELD_START_ARCHIVE_OFFSET = 16
Offset in bytes from the start of the central directory to the start of the zip file
Variables ¶
View Source
var GZIP_HEADER = []byte{0x1f, 0x8b}
View Source
var ZIP_ECD_HEADER = []byte{0x50, 0x4b, 0x05, 0x06}
Magic preamble for the end-of-central-directory record
Functions ¶
func Scan ¶
func Scan(startOffset int64, path string, onDetection func(Detection), onProgress func(ProgressInfo)) error
Bootstrap and run the detection system, scanning the given path for remnants of wallets. Normally, the path given would be a raw device file handle, like /dev/sdb or some such; the system would then scan every sector of that device
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
A block of data being worked on
type ProgressInfo ¶
type ProgressInfo struct { // Description of the target currently being scanned CurrentTarget string // Number of bytes scanned in the current target ScannedBytes int64 // Bytes in the current target TotalBytes int64 // Number of targets remaining to be scanned; this may grow dynamically as new targets // are discovered inside existing targets (eg. compressed files) UnscannedTargets int }
Click to show internal directories.
Click to hide internal directories.