pyregfi
Loading...
Searching...
No Matches
Namespaces | Classes | Functions
pyregfi Namespace Reference

Python interface to the regfi library. More...

Namespaces

namespace  structures
 Low-level data structures and C API mappings.
 
namespace  winsec
 Low-level data structures for winsec library.
 

Classes

class  _GenericList
 Abstract class for ValueList and SubkeyList. More...
 
class  _StructureWrapper
 Abstract class for most objects returned by the library. More...
 
class  DATA_TYPES
 An enumeration of registry Value data types. More...
 
class  Hive
 Represents a single registry hive (file) More...
 
class  HiveIterator
 A special purpose iterator for registry hives. More...
 
class  Key
 Registry key These represent registry keys (REGFI_NK records) and provide access to their subkeys, values, and other metadata. More...
 
class  LOG_TYPES
 An enumeration of log message types. More...
 
class  Security
 Represents a registry SK record which contains a security descriptor. More...
 
class  SubkeyList
 The list of subkeys associated with a Key. More...
 
class  Value
 Registry value (metadata) More...
 
class  ValueList
 The list of values associated with a Key. More...
 

Functions

 getVersion ()
 Returns the (py)regfi library version.
 
 getLogMessages ()
 Retrieves messages produced by regfi during parsing and interpretation.
 
 setLogMask (log_types)
 Sets the types of log messages to record.
 
 openHive (path)
 Opens a file as a registry hive.
 

Detailed Description

Python interface to the regfi library.

Function Documentation

◆ getVersion()

pyregfi.getVersion ( )

Returns the (py)regfi library version.

Returns
A string indicating the version

◆ getLogMessages()

pyregfi.getLogMessages ( )

Retrieves messages produced by regfi during parsing and interpretation.

The regfi C library may generate log messages stored in a special thread-safe global data structure. These messages should be retrieved periodically or after each major operation by callers to determine if any errors or warnings should be reported to the user. Failure to retrieve these could result in excessive memory consumption.

Referenced by pyregfi.Hive.__init__(), and pyregfi.HiveIterator.descend().

◆ setLogMask()

pyregfi.setLogMask (   log_types)

Sets the types of log messages to record.

Parameters
log_typesA sequence of message types that regfi should generate. Message types can be found in the LOG_TYPES enumeration.
Returns
True on success, False on failure. Failures are rare, but could indicate that global logging is not operating as expected.

Example:

setLogMask((LOG_TYPES.ERROR, LOG_TYPES.WARN, LOG_TYPES.INFO))

The message mask is a global (all hives, iterators), thread-specific value. For more information, see regfi_log_set_mask.

◆ openHive()

pyregfi.openHive (   path)

Opens a file as a registry hive.

Parameters
pathThe file path of a hive, as one would provide to the open() built-in
Returns
A new Hive instance