pyregfi
Packages | Classes | Functions
Package pyregfi

Python interface to the regfi library. More...

Packages

package  structures
 

Low-level data structures and C API mappings.


package  winsec
 

Low-level data structures for winsec library.


Classes

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

Functions

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

Detailed Description

Python interface to the regfi library.


Function Documentation

def pyregfi.getVersion ( )

Returns the (py)regfi library version.

Returns:
A string indicating the version
def 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.

def 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.

def 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
 All Classes Namespaces Files Functions Variables