DiskAnalyzer.DiskAnalyzer (version 0.1.1)
index
diskanalyzer.py

This package implements multiples libraries and tools to parse, analyze
and extract informations from disk on the live system.

 
Classes
       
_ctypes.Structure(_ctypes._CData)
GPTHeader
GPTPartitionEntry
MBRHeader
MBRPartitionEntry
builtins.object
Partition

 
class GPTHeader(_ctypes.Structure)
    This class defines the GPT structure.
 
 
Method resolution order:
GPTHeader
_ctypes.Structure
_ctypes._CData
builtins.object

Methods defined here:
to_partition(self) -> Union[Partition, None]
This function makes partition from GPT.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
backup_lba
current_lba
disk_guid
first_usable_lba
header_crc32
header_size
last_usable_lba
num_part_entries
part_array_crc32
part_entry_size
partition_entry_lba
reserved
revision
signature

Methods inherited from _ctypes.Structure:
__buffer__(self, flags, /)
Return a buffer object that exposes the underlying memory of the object.
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Static methods inherited from _ctypes.Structure:
__new__(*args, **kwargs) class method of _ctypes.Structure
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(self, /)
default __ctypes_from_outparam__ method returns self.
__hash__(self, /)
Return hash(self).
__reduce__(self, /)
Helper for pickle.
__setstate__(self, dict, data, /)

 
class GPTPartitionEntry(_ctypes.Structure)
    This class defines the GPT partition structure.
 
 
Method resolution order:
GPTPartitionEntry
_ctypes.Structure
_ctypes._CData
builtins.object

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
attributes
end_lba
part_name
part_type_guid
start_lba
unique_part_guid

Methods inherited from _ctypes.Structure:
__buffer__(self, flags, /)
Return a buffer object that exposes the underlying memory of the object.
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Static methods inherited from _ctypes.Structure:
__new__(*args, **kwargs) class method of _ctypes.Structure
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(self, /)
default __ctypes_from_outparam__ method returns self.
__hash__(self, /)
Return hash(self).
__reduce__(self, /)
Helper for pickle.
__setstate__(self, dict, data, /)

 
class MBRHeader(_ctypes.Structure)
    This class defines the MBR structure.
 
 
Method resolution order:
MBRHeader
_ctypes.Structure
_ctypes._CData
builtins.object

Methods defined here:
fat_partitions(self) -> Iterable[Partition]
This generators returns FAT partitions.
to_partition(self) -> Union[Partition, None]
This function makes partition from MBR.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
bootloader
partitions
signature

Methods inherited from _ctypes.Structure:
__buffer__(self, flags, /)
Return a buffer object that exposes the underlying memory of the object.
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Static methods inherited from _ctypes.Structure:
__new__(*args, **kwargs) class method of _ctypes.Structure
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(self, /)
default __ctypes_from_outparam__ method returns self.
__hash__(self, /)
Return hash(self).
__reduce__(self, /)
Helper for pickle.
__setstate__(self, dict, data, /)

 
class MBRPartitionEntry(_ctypes.Structure)
    This class defines the MBR partition structure.
 
 
Method resolution order:
MBRPartitionEntry
_ctypes.Structure
_ctypes._CData
builtins.object

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object
chs_first
chs_last
lba_start
status
total_sectors
type

Methods inherited from _ctypes.Structure:
__buffer__(self, flags, /)
Return a buffer object that exposes the underlying memory of the object.
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Static methods inherited from _ctypes.Structure:
__new__(*args, **kwargs) class method of _ctypes.Structure
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(self, /)
default __ctypes_from_outparam__ method returns self.
__hash__(self, /)
Return hash(self).
__reduce__(self, /)
Helper for pickle.
__setstate__(self, dict, data, /)

 
class Partition(builtins.object)
    Partition(start_sector: int, end_sector: int, size: int) -> None
 
Partition(start_sector: int, end_sector: int, size: int)
 
  Methods defined here:
__eq__(self, other)
Return self==value.
__init__(self, start_sector: int, end_sector: int, size: int) -> None
Initialize self.  See help(type(self)) for accurate signature.
__replace__ = _replace(self, /, **changes) from dataclasses
__repr__(self)
Return repr(self).

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
__dataclass_fields__ = {'end_sector': Field(name='end_sector',type=<class 'int'>,defau...xy({}),kw_only=False,doc=None,_field_type=_FIELD), 'size': Field(name='size',type=<class 'int'>,default=<da...xy({}),kw_only=False,doc=None,_field_type=_FIELD), 'start_sector': Field(name='start_sector',type=<class 'int'>,def...xy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,ord...rue,kw_only=False,slots=False,weakref_slot=False)
__hash__ = None
__match_args__ = ('start_sector', 'end_sector', 'size')

 
Functions
       
disk_parsing(keep_open: bool = False, file_path: str = None) -> Union[Tuple[Union[PermissionError, Exception, MBRHeader, GPTHeader], BufferedReader], PermissionError, Exception, MBRHeader, GPTHeader]
This function returns the parsed structure or error and opened file if keep_open is True.
get_main_partition(*args, **kwargs) -> Tuple[Partition, Union[None, BufferedReader]]
This function returns the main partition.
parse_mbr(mbr_data: bytes) -> MBRHeader
This function parses the MBR data.

 
Data
        __all__ = ['GPTHeader', 'GPTPartitionEntry', 'MBRHeader', 'MBRPartitionEntry', 'Partition', 'disk_parsing', 'get_main_partition', 'parse_mbr']
__author_email__ = 'mauricelambert434@gmail.com'
__copyright__ = '\nDiskAnalyzer Copyright (C) 2025, 2026 Maurice...ome to redistribute it\nunder certain conditions.\n'
__description__ = '\nThis package implements multiples libraries and...tract informations from disk on the live system.\n'
__license__ = 'GPL-3.0 License'
__maintainer__ = 'Maurice Lambert'
__maintainer_email__ = 'mauricelambert434@gmail.com'
__url__ = 'https://github.com/mauricelambert/DiskAnalyzer'

 
Author
        Maurice Lambert