dissect.hypervisor.disk.vmdk
¶
Module Contents¶
Classes¶
Basic buffered stream that provides easy aligned reads. |
|
Functions¶
Attributes¶
- dissect.hypervisor.disk.vmdk.log¶
- class dissect.hypervisor.disk.vmdk.VMDK(fh: BinaryIO | pathlib.Path | str | list[BinaryIO | pathlib.Path | str])¶
Bases:
dissect.util.stream.AlignedStream
Basic buffered stream that provides easy aligned reads.
- Must be subclassed for various stream implementations. Subclasses can implement:
_read(offset, length)
_seek(pos, whence=io.SEEK_SET)
The offset and length for _read are guaranteed to be aligned. The only time that overriding _seek would make sense is if there’s no known size of your stream, but still want to provide SEEK_END functionality.
Most subclasses of AlignedStream take one or more file-like objects as source. Operations on these subclasses, like reading, will modify the source file-like object as a side effect.
- Parameters:
size – The size of the stream. This is used in read and seek operations. None if unknown.
align – The alignment size. Read operations are aligned on this boundary. Also determines buffer size.
- disks = []¶
- parent = None¶
- descriptor = None¶
- sector_count = 0¶
- class dissect.hypervisor.disk.vmdk.RawDisk(fh: BinaryIO, size: int | None = None, offset: int = 0, sector_offset: int = 0)¶
- fh¶
- offset = 0¶
- sector_offset = 0¶
- sector_count¶
- read¶
- seek¶
- tell¶
- class dissect.hypervisor.disk.vmdk.SparseDisk(fh: BinaryIO, parent: VMDK | RawDisk | SparseDisk | None = None, offset: int = 0, sector_offset: int = 0)¶
- fh¶
- parent = None¶
- offset = 0¶
- sector_offset = 0¶
- filesize¶
- descriptor = None¶
- header¶
- size¶
- sector_count¶
- get_runs(sector: int, count: int) list[tuple[int, int, int, int | None]] ¶
- dissect.hypervisor.disk.vmdk.RE_EXTENT_DESCRIPTOR¶
- class dissect.hypervisor.disk.vmdk.ExtentDescriptor¶
- raw: str¶
- access_mode: str¶
- sectors: int¶
- type: str¶
- filename: str | None = None¶
- start_sector: int | None = None¶
- partition_uuid: str | None = None¶
- device_identifier: str | None = None¶
- __post_init__() None ¶
- __repr__() str ¶
- __str__() str ¶
- class dissect.hypervisor.disk.vmdk.DiskDescriptor(attr: dict, extents: list[ExtentDescriptor], disk_db: dict, sectors: int, raw_config: str | None = None)¶
- attr¶
- extents¶
- ddb¶
- sectors¶
- raw = None¶
- classmethod parse(vmdk_config: str) DiskDescriptor ¶
Return
DiskDescriptor
based on the providedvmdk_config
.
- __str__() str ¶