bdpayne/libvmi — pull request #21 by tklengyel (2013-01-16 05:01:19+00:00)
Title: Update pyvmi and associated tools to take advantage of the new custom-init functions

This PR depends on the prior Xenstore branch, will be rebased once it gets merged.

--------------------------------------------
In order to be able to target domains through their ID instead of just their names, PyVMI had to be updated to support the new custom-init functions. This involved:
- Adding glib to setup.py (and fix the hard-coded paths in there)
- Check if the input given to pyvmi_init is the regular two strings (mode & vmname) or if a dict was passed with the configuration
- Translate the dict to a GHashTable and pass it to custom-init

For pyvmiaddressspace.py a new method was derived to target a domain based on its name or id with the syntax vmi://domid/ or vmi://name/. If no domid/ or name/ was provided it falls back to the default mode. Here are some example:
# python ~/volatility-svn/vol.py -l vmi://domid/28 pslist
# python ~/volatility-svn/vol.py -l vmi://name/tamas-windows-xp-sp2 pslist
# python ~/volatility-svn/vol.py -l vmi://tamas-windows-xp-sp2 pslist

For pyvmifs.py a new option was added, domid to use the new init functions with a GHashTable.