winshlrc package
Subpackages
- winshlrc.scripts package
- Submodules
- winshlrc.scripts.extract module
- winshlrc.scripts.generate_docs module
- winshlrc.scripts.generate_source module
- winshlrc.scripts.merge_yaml module
- Module contents
Submodules
winshlrc.extractor module
Windows shell extractor.
- class winshlrc.extractor.ShellFolder(identifier=None, localized_string=None)[source]
Bases:
objectWindows shell folder.
- alternate_names
alternate names.
- Type:
list[str]
- class_name
class name (CLSID).
- Type:
str
- identifier
identifier (GUID).
- Type:
str
- name
name.
- Type:
str
- localized_string
localized string of the name.
- Type:
str
- class winshlrc.extractor.WindowsShellExtractor(*args: Any, **kwargs: Any)[source]
Bases:
WindowsVolumeScannerWindows shell extractor.
- ascii_codepage
ASCII string codepage.
- Type:
str
- preferred_language_identifier
preferred language identifier (LCID).
- Type:
int
- ScanForWindowsVolume(source_path, options=None)[source]
Scans for a Windows volume.
- Parameters:
source_path (str) – source path.
options (Optional[VolumeScannerOptions]) – volume scanner options. If None the default volume scanner options are used, which are defined in the VolumeScannerOptions class.
- Returns:
True if a Windows volume was found.
- Return type:
bool
- Raises:
ScannerError – if the source path does not exists, or if the source path is not a file or directory, or if the format of or within the source file is not supported.
- __init__(debug=False, mediator=None)[source]
Initializes a Windows shell extractor.
- Parameters:
debug (Optional[bool]) – True if debug information should be printed.
mediator (dfvfs.VolumeScannerMediator) – a volume scanner mediator or None.
- property windows_version
The Windows version (getter).
winshlrc.resource_file module
Windows Resource file.
- class winshlrc.resource_file.WindowsResourceFile(windows_path, ascii_codepage='cp1252', preferred_language_identifier=1033)[source]
Bases:
objectWindows Resource file.
- windows_path
Windows path of the resource file.
- Type:
str
- GetMUILanguage()[source]
Retrieves the MUI language.
- Returns:
MUI language or None if not available.
- Return type:
str
- GetMUIResource()[source]
Retrieves the MUI resource.
- Returns:
MUI resource or None if not available.
- Return type:
pywrc.mui_resource
- GetStringTableResource()[source]
Retrieves the string table resource.
- Returns:
- resource containing the string table resource or None
if not available.
- Return type:
pywrc.resource
- HasStringTableResource()[source]
Determines if the resource file as a string table resource.
- Returns:
True if the resource file as a string table resource.
- Return type:
bool
- OpenFileObject(file_object)[source]
Opens the Windows Resource file using a file-like object.
- Parameters:
file_object (file) – file-like object.
- Raises:
OSError – if already open.
- __init__(windows_path, ascii_codepage='cp1252', preferred_language_identifier=1033)[source]
Initializes the Windows Resource file.
- Parameters:
windows_path (str) – normalized version of the Windows path.
ascii_codepage (Optional[str]) – ASCII string codepage.
preferred_language_identifier (Optional[int]) – preferred language identifier (LCID).
- property file_version
the file version.
- Type:
str
- property product_version
the product version.
- Type:
str
winshlrc.resources module
Windows shell resources.
- class winshlrc.resources.ControlPanelItemDefinition[source]
Bases:
objectWindows control panel item definition.
- alternate_module_names
alternate module names.
- Type:
list[str]
- identifier
identifier.
- Type:
str
- module_name
module name.
- Type:
str
- name
name.
- Type:
str
- windows_versions
Windows versions.
- Type:
list[str]
- class winshlrc.resources.KnownFolderDefinition[source]
Bases:
objectWindows known folder definition.
- alternate_display_names
alternate display names.
- Type:
list[str]
- csidl
CSIDLs that correspond to the known folder.
- Type:
list[str]
- default_path
default path.
- Type:
str
- display_name
display name.
- Type:
str
- identifier
identifier.
- Type:
str
- legacy_default_path
legacy default path.
- Type:
str
- legacy_display_name
legacy display name.
- Type:
str
- name
name.
- Type:
str
- windows_versions
Windows versions.
- Type:
list[str]
- Merge(other)[source]
Merges the values of another known folder into the current one.
- Parameters:
other (KnownFolderDefinition) – known folder definition to merge values from.
- Raises:
ValueError – if the known folders cannot be merged.
winshlrc.versions module
Windows versions.
winshlrc.volume_scanner module
Windows Registry volume scanner.
- class winshlrc.volume_scanner.SingleFileWindowsRegistryFileReader(*args: Any, **kwargs: Any)[source]
Bases:
WinRegistryFileReaderSingle file Windows Registry file reader.
- Open(path, ascii_codepage='cp1252')[source]
Opens the Windows Registry file specified by the path.
- Parameters:
path (str) – path of the Windows Registry file. The path is a Windows path relative to the root of the file system that contains the specific Windows Registry file. E.g. C:WindowsSystem32configSYSTEM
ascii_codepage (Optional[str]) – ASCII string codepage.
- Returns:
- Windows Registry file or None if the file cannot
be opened.
- Return type:
WinRegistryFile
- class winshlrc.volume_scanner.VolumeScannerOptions(*args: Any, **kwargs: Any)[source]
Bases:
VolumeScannerOptionsVolume scanner options.
- credentials
credentials, per type, to unlock volumes.
- Type:
list[tuple[str, str]]
- partitions
partition identifiers.
- Type:
list[str]
- scan_mode
mode that defines how the VolumeScanner should scan for volumes and snapshots.
- Type:
str
- snapshots
snapshot identifiers.
- Type:
list[str]
- username
username.
- Type:
str
- volumes
volume identifiers, e.g. those of an APFS or LVM volume system.
- Type:
list[str]
- class winshlrc.volume_scanner.WindowsRegistryVolumeScanner(*args: Any, **kwargs: Any)[source]
Bases:
WindowsVolumeScannerWindows Registry volume scanner.
- registry
Windows Registry.
- Type:
dfwinreg.WinRegistry
- IsSingleFileRegistry()[source]
Determines if the Registry consists of a single file.
- Returns:
True if the Registry consists of a single file.
- Return type:
bool
- ScanForWindowsVolume(source_path, options=None)[source]
Scans for a Windows volume.
- Parameters:
source_path (str) – source path.
options (Optional[VolumeScannerOptions]) – volume scanner options. If None the default volume scanner options are used, which are defined in the VolumeScannerOptions class.
- Returns:
True if a Windows volume was found.
- Return type:
bool
- Raises:
ScannerError – if the source path does not exists, or if the source path is not a file or directory, or if the format of or within the source file is not supported.
winshlrc.yaml_definitions_file module
YAML-based Windows shell definitions files.
- class winshlrc.yaml_definitions_file.YAMLControlPanelItemsDefinitionsFile[source]
Bases:
objectYAML-based control panel item definitions file.
A YAML-based control panel item definitions file contains one or more control panel item definitions. A control panel item definition consists of:
identifier: c58c4893-3be0-4b45-abb5-a63e4b8c8651 module_name: “Troubleshooting” name: “Microsoft.Troubleshooting” windows_versions: [“Windows XP 32-bit”, “Windows 10 (1511)”]
Where: * alternate_module_names, defines alternate module names of the control panel
item;
identifier, defines the control panel item identifier;
module_name, defines the module name of the control panel item;
name, defines the name of the control panel item;
windows_versions, defines Windows versions the control panel item was seen.
- class winshlrc.yaml_definitions_file.YAMLKnownFoldersDefinitionsFile[source]
Bases:
objectYAML-based known folders definitions file.
A YAML-based known folders definitions file contains one or more known folder definitions. A known folder definition consists of:
identifier: 20d04fe0-3aea-1069-a2d8-08002b30309d display_name: “My Computer” alternate_display_names: [“Computer”, “This PC”] windows_versions: [“Windows XP 32-bit”, “Windows 10 (1511)”]
Where: * alternate_display_names, defines alternate diplay names of the known folder; * display_name, defines the name of the known folder; * identifier, defines the known folder identifier; * name, defines the name of the known folder; * windows_versions, defines Windows versions the known folder was seen.
- class winshlrc.yaml_definitions_file.YAMLShellFoldersDefinitionsFile[source]
Bases:
objectYAML-based shell folders definitions file.
A YAML-based shell folders definitions file contains one or more shell folder definitions. A shell folder definition consists of:
identifier: 20d04fe0-3aea-1069-a2d8-08002b30309d name: “My Computer” alternate_names: [“Computer”, “This PC”] windows_versions: [“Windows XP 32-bit”, “Windows 10 (1511)”]
Where: * alternate_names, defines alternate names of the shell folder; * class_name, defines the name of the shell folder class; * identifier, defines the shell folder identifier; * name, defines the name of the shell folder; * windows_versions, defines Windows versions the shell folder was seen.
Module contents
Windows Shell resources (winshlrc).