Documentation ¶
Index ¶
- Constants
- Variables
- type CompressionLevel
- type EWFCreator
- type EWFDataSection
- type EWFDigestSection
- type EWFDoneSection
- type EWFHashSection
- type EWFHeader
- type EWFHeaderSection
- type EWFMediaInfo
- 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 EWFSectionDescriptor
- type EWFSectionDescriptorData
- type EWFSectorsSection
- type EWFSegment
- type EWFTableSection
- type EWFTableSectionEntries
- type EWFTableSectionFooter
- type EWFTableSectionHeader
- type EWFVolume
- type EWFVolumeSection
- type EWFVolumeSectionData
- func (e *EWFVolumeSectionData) GetChecksum() uint32
- func (e *EWFVolumeSectionData) GetChunkCount() uint32
- func (e *EWFVolumeSectionData) GetSectorCount() uint32
- func (e *EWFVolumeSectionData) GetSectorSize() uint32
- func (e *EWFVolumeSectionData) IncrementChunkCount()
- func (e *EWFVolumeSectionData) SetChecksum(c uint32)
- type EWFVolumeSectionSpecData
- func (e *EWFVolumeSectionSpecData) GetChecksum() uint32
- func (e *EWFVolumeSectionSpecData) GetChunkCount() uint32
- func (e *EWFVolumeSectionSpecData) GetSectorCount() uint32
- func (e *EWFVolumeSectionSpecData) GetSectorSize() uint32
- func (e *EWFVolumeSectionSpecData) IncrementChunkCount()
- func (e *EWFVolumeSectionSpecData) SetChecksum(c uint32)
- type EWFWriter
- type MediaFlags
- type MediaType
Constants ¶
View Source
const ( EVFSignature = "EVF\x09\x0d\x0a\xff\x00" LVFSignature = "LVF\x09\x0d\x0a\xff\x00" )
View Source
const ( DefaultChunkSize = 32768 ChecksumSize = 4 Uint32Size = 4 )
View Source
const ( EWF_SECTION_TYPE_HEADER = "header" EWF_SECTION_TYPE_HEADER2 = "header2" EWF_SECTION_TYPE_VOLUME = "volume" EWF_SECTION_TYPE_DISK = "disk" EWF_SECTION_TYPE_TABLE = "table" EWF_SECTION_TYPE_TABLE2 = "table2" EWF_SECTION_TYPE_DATA = "data" EWF_SECTION_TYPE_SECTORS = "sectors" EWF_SECTION_TYPE_ERRORS2 = "errors2" EWF_SECTION_TYPE_NEXT = "next" EWF_SECTION_TYPE_SESSION = "session" EWF_SECTION_TYPE_HASH = "hash" EWF_SECTION_TYPE_DIGEST = "digest" EWF_SECTION_TYPE_DONE = "done" )
View Source
const ( EWF_HEADER_VALUES_INDEX_COMPRESSION_BEST = "b" EWF_HEADER_VALUES_INDEX_COMPRESSION_FASTEST = "f" EWF_HEADER_VALUES_INDEX_COMPRESSION_NO = "n" )
Variables ¶
View Source
var AcquiredMediaIdentifiers = map[EWFMediaInfo]string{ EWF_HEADER_VALUES_INDEX_DESCRIPTION: "Description", EWF_HEADER_VALUES_INDEX_CASE_NUMBER: "Case Number", EWF_HEADER_VALUES_INDEX_EVIDENCE_NUMBER: "Evidence Number", EWF_HEADER_VALUES_INDEX_EXAMINER_NAME: "Examiner Name", EWF_HEADER_VALUES_INDEX_NOTES: "Notes", EWF_HEADER_VALUES_INDEX_MODEL: "Media model", EWF_HEADER_VALUES_INDEX_SERIAL_NUMBER: "Serial number", EWF_HEADER_VALUES_INDEX_DEVICE_LABEL: "Device label", EWF_HEADER_VALUES_INDEX_ACQUIRY_SOFTWARE_VERSION: "Version", EWF_HEADER_VALUES_INDEX_ACQUIRY_OPERATING_SYSTEM: "Platform", EWF_HEADER_VALUES_INDEX_ACQUIRY_DATE: "Acquired Date", EWF_HEADER_VALUES_INDEX_SYSTEM_DATE: "System Date", EWF_HEADER_VALUES_INDEX_PASSWORD: "Password Hash", EWF_HEADER_VALUES_INDEX_PROCESS_IDENTIFIER: "Process Identifiers", EWF_HEADER_VALUES_INDEX_UNKNOWN_DC: "Unknown", EWF_HEADER_VALUES_INDEX_EXTENTS: "Extents", EWF_HEADER_VALUES_INDEX_COMPRESSION_TYPE: "Compression level", }
View Source
var CompressionLevels = map[string]string{ EWF_HEADER_VALUES_INDEX_COMPRESSION_BEST: "Best", EWF_HEADER_VALUES_INDEX_COMPRESSION_FASTEST: "Fastest", EWF_HEADER_VALUES_INDEX_COMPRESSION_NO: "No compression", }
View Source
var DescriptorSize = uint64(binary.Size(&EWFSectionDescriptorData{}))
Functions ¶
This section is empty.
Types ¶
type CompressionLevel ¶
type CompressionLevel uint8
const ( None CompressionLevel = 0x00 Good CompressionLevel = 0x01 Best CompressionLevel = 0x02 )
type EWFCreator ¶
type EWFCreator struct {
// contains filtered or unexported fields
}
func CreateEWF ¶
func CreateEWF(dest io.WriteSeeker) (*EWFCreator, error)
func (*EWFCreator) AddMediaInfo ¶
func (creator *EWFCreator) AddMediaInfo(key EWFMediaInfo, value string)
func (*EWFCreator) Start ¶
func (creator *EWFCreator) Start() (*EWFWriter, error)
type EWFDataSection ¶
type EWFDataSection struct { MediaType uint8 Unknown1 [3]uint8 ChunkCount uint32 SectorPerChunk uint32 BytesPerSector uint32 Sectors uint64 CylindersCHS uint32 HeadesCHS uint32 SectorsCHS uint32 MediaFlags uint8 Uknown2 [3]uint8 PALM uint32 Unkown3 [4]uint8 SMART uint32 CompressionLevel uint8 Unknown4 [3]uint8 SectorErrorGr [4]uint8 Unknown5 [4]uint8 GUID [16]uint8 Pad [963]uint8 Signature [5]uint8 Checksum uint32 }
func (*EWFDataSection) Decode ¶
func (d *EWFDataSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
func (*EWFDataSection) Encode ¶
func (d *EWFDataSection) Encode(ewf io.WriteSeeker) error
type EWFDigestSection ¶
func (*EWFDigestSection) Decode ¶
func (d *EWFDigestSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
func (*EWFDigestSection) Encode ¶
func (d *EWFDigestSection) Encode(ewf io.WriteSeeker) error
type EWFDoneSection ¶
type EWFDoneSection struct { }
func (*EWFDoneSection) Decode ¶
func (d *EWFDoneSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
func (*EWFDoneSection) Encode ¶
func (d *EWFDoneSection) Encode(ewf io.WriteSeeker) (err error)
type EWFHashSection ¶
func (*EWFHashSection) Decode ¶
func (d *EWFHashSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
func (*EWFHashSection) Encode ¶
func (d *EWFHashSection) Encode(ewf io.WriteSeeker) error
type EWFHeaderSection ¶
type EWFHeaderSection struct { NofCategories string CategoryName string MediaInfo map[string]string }
func (*EWFHeaderSection) Decode ¶
func (ewfHeader *EWFHeaderSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
func (*EWFHeaderSection) Encode ¶
func (ewfHeader *EWFHeaderSection) Encode(ewf io.WriteSeeker) error
type EWFMediaInfo ¶
type EWFMediaInfo string
const ( EWF_HEADER_VALUES_INDEX_DESCRIPTION EWFMediaInfo = "a" EWF_HEADER_VALUES_INDEX_CASE_NUMBER EWFMediaInfo = "c" EWF_HEADER_VALUES_INDEX_EXAMINER_NAME EWFMediaInfo = "e" EWF_HEADER_VALUES_INDEX_EVIDENCE_NUMBER EWFMediaInfo = "n" EWF_HEADER_VALUES_INDEX_NOTES EWFMediaInfo = "t" EWF_HEADER_VALUES_INDEX_ACQUIRY_SOFTWARE_VERSION EWFMediaInfo = "av" EWF_HEADER_VALUES_INDEX_ACQUIRY_OPERATING_SYSTEM EWFMediaInfo = "ov" EWF_HEADER_VALUES_INDEX_ACQUIRY_DATE EWFMediaInfo = "m" EWF_HEADER_VALUES_INDEX_SYSTEM_DATE EWFMediaInfo = "u" EWF_HEADER_VALUES_INDEX_PASSWORD EWFMediaInfo = "p" EWF_HEADER_VALUES_INDEX_PROCESS_IDENTIFIER EWFMediaInfo = "pid" EWF_HEADER_VALUES_INDEX_UNKNOWN_DC EWFMediaInfo = "dc" EWF_HEADER_VALUES_INDEX_EXTENTS EWFMediaInfo = "ext" EWF_HEADER_VALUES_INDEX_COMPRESSION_TYPE EWFMediaInfo = "r" EWF_HEADER_VALUES_INDEX_MODEL EWFMediaInfo = "md" EWF_HEADER_VALUES_INDEX_SERIAL_NUMBER EWFMediaInfo = "sn" EWF_HEADER_VALUES_INDEX_DEVICE_LABEL EWFMediaInfo = "l" )
type EWFReader ¶
type EWFReader struct { First *EWFSegment ChunkSize uint32 EWFSize int64 // contains filtered or unexported fields }
type EWFSectionDescriptor ¶
type EWFSectionDescriptor struct { Descriptor *EWFSectionDescriptorData Type string Next 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 [16]byte Next uint64 Size uint64 Pad [40]byte Checksum uint32 }
func NewEWFSectionDescriptorData ¶
func NewEWFSectionDescriptorData(typeStr string) *EWFSectionDescriptorData
type EWFSectorsSection ¶
type EWFSectorsSection struct {
// contains filtered or unexported fields
}
func (*EWFSectorsSection) Decode ¶
func (d *EWFSectorsSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
func (*EWFSectorsSection) Encode ¶
func (d *EWFSectorsSection) Encode(ewf io.WriteSeeker, dataSize, next uint64) (err error)
type EWFSegment ¶
type EWFSegment struct { EWFHeader *EWFHeader Header *EWFHeaderSection Volume *EWFVolumeSection Sectors *EWFSectorsSection Tables []*EWFTableSection Digest *EWFDigestSection Hash *EWFHashSection Data *EWFDataSection 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) 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 BaseOffset int64 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) error
func (*EWFTableSection) Encode ¶
func (d *EWFTableSection) Encode(ewf io.WriteSeeker) error
type EWFTableSectionEntries ¶
type EWFTableSectionEntries struct { Data []uint32 // contains filtered or unexported fields }
type EWFTableSectionFooter ¶
type EWFTableSectionFooter struct {
}type EWFTableSectionHeader ¶
type EWFVolumeSection ¶
type EWFVolumeSection struct { Data EWFVolume // contains filtered or unexported fields }
func (*EWFVolumeSection) Decode ¶
func (v *EWFVolumeSection) Decode(fh io.ReadSeeker, section *EWFSectionDescriptor) error
func (*EWFVolumeSection) Encode ¶
func (vol *EWFVolumeSection) Encode(ewf io.WriteSeeker) (err error)
type EWFVolumeSectionData ¶
type EWFVolumeSectionData struct { MediaType MediaType Reserved1 [3]byte ChunkCount uint32 SectorCount uint32 SectorSize uint32 TotalSectorCount uint64 NumCylinders uint32 NumHeads uint32 NumSectors uint32 MediaFlags MediaFlags Unknown1 [3]byte PalmStartSector uint32 Unknown2 uint32 SmartStartSector uint32 CompressionLevel CompressionLevel Unknown3 [3]byte ErrorGranularity uint32 Unknown4 uint32 UUID [16]byte Pad [963]byte Signature [5]byte Checksum uint32 }
func DefaultVolume ¶
func DefaultVolume() *EWFVolumeSectionData
func (*EWFVolumeSectionData) GetChecksum ¶
func (e *EWFVolumeSectionData) GetChecksum() uint32
func (*EWFVolumeSectionData) GetChunkCount ¶
func (e *EWFVolumeSectionData) GetChunkCount() uint32
func (*EWFVolumeSectionData) GetSectorCount ¶
func (e *EWFVolumeSectionData) GetSectorCount() uint32
func (*EWFVolumeSectionData) GetSectorSize ¶
func (e *EWFVolumeSectionData) GetSectorSize() uint32
func (*EWFVolumeSectionData) IncrementChunkCount ¶
func (e *EWFVolumeSectionData) IncrementChunkCount()
func (*EWFVolumeSectionData) SetChecksum ¶
func (e *EWFVolumeSectionData) SetChecksum(c uint32)
type EWFVolumeSectionSpecData ¶
type EWFVolumeSectionSpecData struct { Reserved uint32 ChunkCount uint32 SectorCount uint32 SectorSize uint32 TotalSectorCount uint32 Reserved1 [20]byte Pad [45]byte Signature [5]byte Checksum uint32 }
func (*EWFVolumeSectionSpecData) GetChecksum ¶
func (e *EWFVolumeSectionSpecData) GetChecksum() uint32
func (*EWFVolumeSectionSpecData) GetChunkCount ¶
func (e *EWFVolumeSectionSpecData) GetChunkCount() uint32
func (*EWFVolumeSectionSpecData) GetSectorCount ¶
func (e *EWFVolumeSectionSpecData) GetSectorCount() uint32
func (*EWFVolumeSectionSpecData) GetSectorSize ¶
func (e *EWFVolumeSectionSpecData) GetSectorSize() uint32
func (*EWFVolumeSectionSpecData) IncrementChunkCount ¶
func (e *EWFVolumeSectionSpecData) IncrementChunkCount()
func (*EWFVolumeSectionSpecData) SetChecksum ¶
func (e *EWFVolumeSectionSpecData) SetChecksum(c uint32)
type EWFWriter ¶
type EWFWriter struct { Segment *EWFSegment SegmentOffset uint32 ChunkSize uint32 // contains filtered or unexported fields }
EWFWriter is helper for creating E01 images. Data is always compressed
type MediaFlags ¶
type MediaFlags uint8
const ( Image MediaFlags = 0x01 Physical MediaFlags = 0x02 Fastbloc MediaFlags = 0x04 Tablaeu MediaFlags = 0x08 )
Click to show internal directories.
Click to hide internal directories.