Documentation
¶
Index ¶
- Constants
- Variables
- type EWFCaseDataInformationKey
- type EWFCaseDataSection
- func (ewfHeader *EWFCaseDataSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor, ...) error
- func (ewfHeader *EWFCaseDataSection) Encode(ewf io.Writer, previousDescriptorPosition int64) (dataN int, descN int, err error)
- func (c *EWFCaseDataSection) GetChunkCount() (int, error)
- func (c *EWFCaseDataSection) GetSectorCount() (int, error)
- type EWFCreator
- type EWFDeviceInformationKey
- type EWFDeviceInformationSection
- func (ewfHeader *EWFDeviceInformationSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor, ...) error
- func (ewfHeader *EWFDeviceInformationSection) Encode(ewf io.Writer, previousDescriptorPosition int64) (dataN int, descN int, err error)
- func (c *EWFDeviceInformationSection) GetSectorSize() (int, error)
- type EWFDoneSection
- type EWFHeader
- type EWFMD5Section
- type EWFReader
- func (ewf *EWFReader) Metadata() map[string]interface{}
- func (ewf *EWFReader) Read(p []byte) (n int, err error)
- func (ewf *EWFReader) ReadAt(p []byte, off int64) (n int, err error)
- func (ewf *EWFReader) Seek(offset int64, whence int) (ret int64, err error)
- func (ewf *EWFReader) Segment(index int) (*EWFSegment, *list.Element, error)
- func (ewf *EWFReader) Size() int64
- type EWFSHA1Section
- type EWFSectionDescriptor
- type EWFSectionDescriptorData
- type EWFSectionType
- type EWFSectorsSection
- type EWFSegment
- type EWFTableSection
- type EWFTableSectionEntries
- type EWFTableSectionEntry
- type EWFTableSectionFooter
- type EWFTableSectionHeader
- type EWFWriter
Constants ¶
View Source
const ( EVF2Signature = "EVF2\x0d\x0a\x81\x00" LVF2Signature = "LVF2\x0d\x0a\x81\x00" )
View Source
const ( DefaultChunkSize = 32768 ChecksumSize = 4 Uint32Size = 4 )
View Source
const ( // The chunk data is compressed EWF_CHUNK_DATA_FLAG_IS_COMPRESSED = 0x00000001 // The chunk data has a checksum EWF_CHUNK_DATA_FLAG_HAS_CHECKSUM = 0x00000002 // The chunk data uses pattern fill EWF_CHUNK_DATA_FLAG_USES_PATTERN_FILL = 0x00000004 )
View Source
const ( EWF_COMPRESSION_METHOD_NONE = 0 EWF_COMPRESSION_METHOD_ZLIB = 1 EWF_COMPRESSION_METHOD_BZIP2 = 2 )
Variables ¶
View Source
var CaseDataIdentifiers = map[EWFCaseDataInformationKey]string{ EWF_CASE_DATA_NAME: "Name", EWF_CASE_DATA_CASE_NUMBER: "Case Number", EWF_CASE_DATA_EVIDENCE_NUMBER: "Evidence Number", EWF_CASE_DATA_EXAMINER_NAME: "Examiner name", EWF_CASE_DATA_NOTES: "Notes", EWF_CASE_DATA_APPLICATION_VERSION: "Application Version", EWF_CASE_DATA_OS: "Operatin system", EWF_CASE_DATA_TARGET_TIME: "Target Time", EWF_CASE_DATA_ACTUAL_TIME: "Actual Time", EWF_CASE_DATA_NUMBER_OF_CHUNKS: "Number of chunks", EWF_CASE_DATA_COMPRESSION_METHOD: "Compression method", EWF_CASE_DATA_NUMBER_OF_SECTORS_PC: "Number of sectors per chunk", EWF_CASE_DATA_ERROR_GRANULARITY: "Error granularity", EWF_CASE_DATA_WRITE_BLOCKER_TYPE: "Write-blocker type", }
View Source
var DescriptorSize = int64(binary.Size(&EWFSectionDescriptorData{}))
View Source
var DeviceInformationIdentifiers = map[EWFDeviceInformationKey]string{ EWF_DEVICE_INFO_SERIAL_NUMBER: "Serial Number", EWF_DEVICE_INFO_DRIVE_MODEL: "Drive Model", EWF_DEVICE_INFO_DRIVE_LABEL: "Drive Label", EWF_DEVICE_INFO_NUMBER_OF_SECTORS: "Number of Sectors", EWF_DEVICE_INFO_NUMBER_OF_HPA: "Number of HPA protected sectors", EWF_DEVICE_INFO_NUMBER_OF_DCO: "Number of DCO protected sectors", EWF_DEVICE_INFO_DRIVE_TYPE: "Drive Type", EWF_DEVICE_INFO_PROCESS_ID: "Process Identifier", EWF_DEVICE_INFO_MUMBER_OF_PALM: "Number of sectors PALM Ram device", EWF_DEVICE_INFO_NUMBER_OF_SMART_LOGS: "SMART or ATA logs", EWF_DEVICE_INFO_BYTES_PER_SEC: "Bytes per Sector", EWF_DEVICE_INFO_IS_PHYSICAL: "Is physical", }
Functions ¶
This section is empty.
Types ¶
type EWFCaseDataInformationKey ¶
type EWFCaseDataInformationKey string
const ( EWF_CASE_DATA_NAME EWFCaseDataInformationKey = "nm" EWF_CASE_DATA_CASE_NUMBER EWFCaseDataInformationKey = "cn" EWF_CASE_DATA_EVIDENCE_NUMBER EWFCaseDataInformationKey = "en" EWF_CASE_DATA_EXAMINER_NAME EWFCaseDataInformationKey = "ex" EWF_CASE_DATA_NOTES EWFCaseDataInformationKey = "nt" EWF_CASE_DATA_APPLICATION_VERSION EWFCaseDataInformationKey = "av" EWF_CASE_DATA_OS EWFCaseDataInformationKey = "os" EWF_CASE_DATA_TARGET_TIME EWFCaseDataInformationKey = "tt" EWF_CASE_DATA_ACTUAL_TIME EWFCaseDataInformationKey = "at" EWF_CASE_DATA_NUMBER_OF_CHUNKS EWFCaseDataInformationKey = "tb" EWF_CASE_DATA_COMPRESSION_METHOD EWFCaseDataInformationKey = "cp" EWF_CASE_DATA_NUMBER_OF_SECTORS_PC EWFCaseDataInformationKey = "sb" EWF_CASE_DATA_ERROR_GRANULARITY EWFCaseDataInformationKey = "gr" EWF_CASE_DATA_WRITE_BLOCKER_TYPE EWFCaseDataInformationKey = "wb" )
type EWFCaseDataSection ¶
type EWFCaseDataSection struct { NumberOfObjects string ObjectName string KeyValue map[string]string }
func (*EWFCaseDataSection) Decode ¶
func (ewfHeader *EWFCaseDataSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor, decompressorFunc shared.Decompressor) error
func (*EWFCaseDataSection) Encode ¶
func (ewfHeader *EWFCaseDataSection) Encode(ewf io.Writer, previousDescriptorPosition int64) (dataN int, descN int, err error)
Encode writes data and its description to the target writer. Returns data write count, descriptor write count and err
func (*EWFCaseDataSection) GetChunkCount ¶
func (c *EWFCaseDataSection) GetChunkCount() (int, error)
func (*EWFCaseDataSection) GetSectorCount ¶
func (c *EWFCaseDataSection) GetSectorCount() (int, error)
type EWFCreator ¶
type EWFCreator struct {
// contains filtered or unexported fields
}
func (*EWFCreator) AddCaseData ¶
func (creator *EWFCreator) AddCaseData(key EWFCaseDataInformationKey, value string)
func (*EWFCreator) AddDeviceInformation ¶
func (creator *EWFCreator) AddDeviceInformation(key EWFDeviceInformationKey, value string)
type EWFDeviceInformationKey ¶
type EWFDeviceInformationKey string
const ( EWF_DEVICE_INFO_SERIAL_NUMBER EWFDeviceInformationKey = "sn" EWF_DEVICE_INFO_DRIVE_MODEL EWFDeviceInformationKey = "md" EWF_DEVICE_INFO_DRIVE_LABEL EWFDeviceInformationKey = "lb" EWF_DEVICE_INFO_NUMBER_OF_SECTORS EWFDeviceInformationKey = "ts" EWF_DEVICE_INFO_NUMBER_OF_HPA EWFDeviceInformationKey = "hs" EWF_DEVICE_INFO_NUMBER_OF_DCO EWFDeviceInformationKey = "dc" EWF_DEVICE_INFO_DRIVE_TYPE EWFDeviceInformationKey = "dt" EWF_DEVICE_INFO_PROCESS_ID EWFDeviceInformationKey = "pid" EWF_DEVICE_INFO_MUMBER_OF_PALM EWFDeviceInformationKey = "rs" EWF_DEVICE_INFO_NUMBER_OF_SMART_LOGS EWFDeviceInformationKey = "ls" EWF_DEVICE_INFO_BYTES_PER_SEC EWFDeviceInformationKey = "bp" EWF_DEVICE_INFO_IS_PHYSICAL EWFDeviceInformationKey = "ph" )
type EWFDeviceInformationSection ¶
type EWFDeviceInformationSection struct { NumberOfObjects string ObjectName string KeyValue map[string]string }
func (*EWFDeviceInformationSection) Decode ¶
func (ewfHeader *EWFDeviceInformationSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor, decompressorFunc shared.Decompressor) error
func (*EWFDeviceInformationSection) Encode ¶
func (ewfHeader *EWFDeviceInformationSection) Encode(ewf io.Writer, previousDescriptorPosition int64) (dataN int, descN int, err error)
Encode writes data and its description to the target writer. Returns data write count, descriptor write count and err
func (*EWFDeviceInformationSection) GetSectorSize ¶
func (c *EWFDeviceInformationSection) GetSectorSize() (int, error)
type EWFDoneSection ¶
type EWFDoneSection struct { }
func (*EWFDoneSection) Decode ¶
func (d *EWFDoneSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor, segment *EWFSegment) error
type EWFHeader ¶
type EWFMD5Section ¶
func (*EWFMD5Section) Decode ¶
func (d *EWFMD5Section) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
type EWFReader ¶
type EWFReader struct { First *EWFSegment ChunkSize uint32 EWFSize int64 // contains filtered or unexported fields }
type EWFSHA1Section ¶
func (*EWFSHA1Section) Decode ¶
func (d *EWFSHA1Section) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
type EWFSectionDescriptor ¶
type EWFSectionDescriptor struct { Descriptor *EWFSectionDescriptorData Type EWFSectionType Previous uint64 Size uint64 Checksum uint32 DataOffset int64 // contains filtered or unexported fields }
func NewEWFSectionDescriptor ¶
func NewEWFSectionDescriptor(fh io.ReadSeeker) (*EWFSectionDescriptor, error)
func (*EWFSectionDescriptor) String ¶
func (esd *EWFSectionDescriptor) String() string
type EWFSectionDescriptorData ¶
type EWFSectionDescriptorData struct { Type uint32 DataFlags uint32 PreviousOffset uint64 DataSize uint64 DescriptorSize uint32 PaddingSize uint32 MD5Hash [16]byte Pad [12]byte Checksum uint32 }
func NewEWFSectionDescriptorData ¶
func NewEWFSectionDescriptorData(secType EWFSectionType) *EWFSectionDescriptorData
type EWFSectionType ¶
type EWFSectionType uint32
const ( EWF_SECTION_TYPE_DEVICE_INFORMATION EWFSectionType = 1 EWF_SECTION_TYPE_CASE_DATA EWFSectionType = 2 EWF_SECTION_TYPE_SECTOR_DATA EWFSectionType = 3 EWF_SECTION_TYPE_SECTOR_TABLE EWFSectionType = 4 EWF_SECTION_TYPE_ERROR_TABLE EWFSectionType = 5 EWF_SECTION_TYPE_SESSION_TABLE EWFSectionType = 6 EWF_SECTION_TYPE_INCREMENET_DATA EWFSectionType = 7 EWF_SECTION_TYPE_MD5_HASH EWFSectionType = 8 EWF_SECTION_TYPE_SHA1_HASH EWFSectionType = 9 EWF_SECTION_TYPE_RESTART_DATA EWFSectionType = 10 EWF_SECTION_TYPE_ENCRYPTION_KEYS EWFSectionType = 11 EWF_SECTION_TYPE_MEMORY_EXTENTS_TABLE EWFSectionType = 12 EWF_SECTION_TYPE_NEXT EWFSectionType = 13 EWF_SECTION_TYPE_FINAL_INFORMATION EWFSectionType = 14 EWF_SECTION_TYPE_DONE EWFSectionType = 15 EWF_SECTION_TYPE_ANALYTICAL_DATA EWFSectionType = 16 )
type EWFSectorsSection ¶
type EWFSectorsSection struct { }
func (*EWFSectorsSection) Decode ¶
func (d *EWFSectorsSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
type EWFSegment ¶
type EWFSegment struct { EWFHeader *EWFHeader DeviceInformation *EWFDeviceInformationSection CaseData *EWFCaseDataSection Sectors *EWFSectorsSection Tables []*EWFTableSection MD5Hash *EWFMD5Section SHA1Hash *EWFSHA1Section Done *EWFDoneSection SectionDescriptors []*EWFSectionDescriptor // contains filtered or unexported fields }
func NewEWFSegment ¶
func NewEWFSegment(fh io.ReadSeeker) (*EWFSegment, error)
func (*EWFSegment) Decode ¶
func (seg *EWFSegment) Decode(link *EWFSegment, decompressorFunc shared.Decompressor) error
func (*EWFSegment) ReadSectors ¶
func (seg *EWFSegment) ReadSectors(sector int64, count int) ([]byte, error)
type EWFTableSection ¶
type EWFTableSection struct { Section *EWFSectionDescriptor Segment *EWFSegment Header *EWFTableSectionHeader Entries *EWFTableSectionEntries SectorCount int64 SectorOffset int64 Size int64 Offset int64 // contains filtered or unexported fields }
func (*EWFTableSection) Decode ¶
func (d *EWFTableSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor, segment *EWFSegment, decompressorFunc shared.Decompressor) error
type EWFTableSectionEntries ¶
type EWFTableSectionEntries struct { Data []EWFTableSectionEntry // contains filtered or unexported fields }
type EWFTableSectionEntry ¶
type EWFTableSectionFooter ¶
type EWFTableSectionFooter struct {
}type EWFTableSectionHeader ¶
type EWFWriter ¶
type EWFWriter struct { Segment *EWFSegment SegmentOffset uint32 ChunkSize uint32 // contains filtered or unexported fields }
EWFWriter is helper for creating Ex01 images. Data is always compressed
Click to show internal directories.
Click to hide internal directories.