Module ida_registry
[frames] | no frames]

Module ida_registry

IDA Plugin SDK API wrapper: registry

Functions
regval_type_t
reg_data_type(name, subkey=None)
Get data type of a given value.
bool
reg_delete(name, subkey=None)
Delete a value from the registry.
bool
reg_delete_subkey(name)
Delete a key from the registry.
bool
reg_delete_tree(name)
Delete a subtree from the registry.
bool
reg_exists(name, subkey=None)
Is there already a value with the given name?
 
reg_flush()
 
reg_load()
PyObject *
reg_read_binary(name, subkey=None)
Read binary data from the registry.
bool
reg_read_bool(name, defval, subkey=None)
Read boolean value from the registry.
int
reg_read_int(name, defval, subkey=None)
Read integer value from the registry.
PyObject *
reg_read_string(name, subkey=None, _def=None)
Read a string from the registry.
 
reg_read_strlist(subkey)
Retrieve all string values associated with the given key.
bool
reg_subkey_exists(name)
Is there already a key with the given name?
PyObject *
reg_subkey_subkeys(name)
Get all subkey names of given key.
PyObject *
reg_subkey_values(name)
Get all value names under given key.
 
reg_update_filestrlist(subkey, add, maxrecs, rem=None)
Update registry with a file list.
 
reg_update_strlist(subkey, add, maxrecs, rem=None, ignorecase=False)
Update list of strings associated with given key.
PyObject *
reg_write_binary(name, py_bytes, subkey=None)
Write binary data to the registry.
 
reg_write_bool(name, value, subkey=None)
Write boolean value to the registry.
 
reg_write_int(name, value, subkey=None)
Write integer value to the registry.
 
reg_write_string(name, utf8, subkey=None)
Write a string to the registry.
Variables
  ROOT_KEY_NAME = 'Software\\Hex-Rays\\IDA'
  SWIG_PYTHON_LEGACY_BOOL = 1
  __package__ = None
  reg_binary = 3
  reg_dword = 4
  reg_sz = 1
  reg_unknown = 0
Function Details

reg_data_type(name, subkey=None)

 

Get data type of a given value.

Parameters:
  • name - value name (C++: const char *)
  • subkey - key name (C++: const char *)
Returns: regval_type_t
false if the [key+]value doesn't exist

reg_delete(name, subkey=None)

 

Delete a value from the registry.

Parameters:
  • name - value name (C++: const char *)
  • subkey - parent key (C++: const char *)
Returns: bool
success

reg_delete_subkey(name)

 

Delete a key from the registry.

Parameters:
  • name, (C++ - const char *)
Returns: bool

reg_delete_tree(name)

 

Delete a subtree from the registry.

Parameters:
  • name, (C++ - const char *)
Returns: bool

reg_exists(name, subkey=None)

 

Is there already a value with the given name?

Parameters:
  • name - value name (C++: const char *)
  • subkey - parent key (C++: const char *)
Returns: bool

reg_read_binary(name, subkey=None)

 

Read binary data from the registry.

Parameters:
  • name - value name (C++: const char *)
  • subkey - key name (C++: const char *)
Returns: PyObject *
false if 'data' is not large enough to hold all data present. in this case 'data' is left untouched.

reg_read_bool(name, defval, subkey=None)

 

Read boolean value from the registry.

Parameters:
  • name - value name (C++: const char *)
  • defval - default value (C++: bool)
  • subkey - key name (C++: const char *)
Returns: bool
boolean read from registry, or 'defval' if the read failed

reg_read_int(name, defval, subkey=None)

 

Read integer value from the registry.

Parameters:
  • name - value name (C++: const char *)
  • defval - default value (C++: int)
  • subkey - key name (C++: const char *)
Returns: int
the value read from the registry, or 'defval' if the read failed

reg_read_string(name, subkey=None, _def=None)

 

Read a string from the registry.

Parameters:
  • name - value name (C++: const char *)
  • subkey - key name (C++: const char *)
Returns: PyObject *
success

reg_read_strlist(subkey)

 

Retrieve all string values associated with the given key. Also see 'reg_update_strlist()' .

Parameters:
  • subkey, (C++ - const char *)

reg_subkey_exists(name)

 

Is there already a key with the given name?

Parameters:
  • name, (C++ - const char *)
Returns: bool

reg_subkey_subkeys(name)

 

Get all subkey names of given key.

Parameters:
  • name, (C++ - const char *)
Returns: PyObject *

reg_subkey_values(name)

 

Get all value names under given key.

Parameters:
  • name, (C++ - const char *)
Returns: PyObject *

reg_update_filestrlist(subkey, add, maxrecs, rem=None)

 

Update registry with a file list. Case sensitivity will vary depending on the target OS.'add' and 'rem' must be UTF-8, just like for regular string operations.

Parameters:
  • subkey, (C++ - const char *)
  • add, (C++ - const char *)
  • maxrecs, (C++ - size_t)
  • rem, (C++ - const char *)

reg_update_strlist(subkey, add, maxrecs, rem=None, ignorecase=False)

 

Update list of strings associated with given key.

Parameters:
  • subkey - key name (C++: const char *)
  • add - string to be added to list, can be NULL (C++: const char *)
  • maxrecs - limit list to this size (C++: size_t)
  • rem - string to be removed from list, can be NULL (C++: const char *)
  • ignorecase - ignore case for 'add' and 'rem' (C++: bool)

reg_write_binary(name, py_bytes, subkey=None)

 

Write binary data to the registry.

Parameters:
  • name - value name (C++: const char *)
  • subkey - key name (C++: const char *)
Returns: PyObject *

reg_write_bool(name, value, subkey=None)

 

Write boolean value to the registry.

Parameters:
  • name - value name (C++: const char *)
  • value - boolean to write (nonzero = true) (C++: int)
  • subkey - key name (C++: const char *)

reg_write_int(name, value, subkey=None)

 

Write integer value to the registry.

Parameters:
  • name - value name (C++: const char *)
  • value - value to write (C++: int)
  • subkey - key name (C++: const char *)

reg_write_string(name, utf8, subkey=None)

 

Write a string to the registry.

Parameters:
  • name - value name (C++: const char *)
  • utf8 - utf8-encoded string (C++: const char *)
  • subkey - key name (C++: const char *)