Package src :: Module pyfault :: Class pyfault
[hide private]
[frames] | no frames]

Class pyfault

source code

This class is mainly a DLL injector/ejector, but I hope to expand it to be a fault injection suite, to torture software on those days the elusive 0-day doesn't come knocking. For now inject away until I have time to code up some other lovin'

Instance Methods [hide private]
 
__init__(self) source code
 
get_module_info(self, dll_name, pid) source code
 
eject_dll(self, dll_name, pid)
Eject a loaded DLL from a running process.
source code
 
inject_dll(self, dll_path, pid)
Inject a DLL of your choice into a running process.
source code
Instance Variables [hide private]
  pid
This function is basically a nice wrapper around CreateToolhelp32Snapshot() to retrieve detailed information on a DLL for use in ejection.
Method Details [hide private]

eject_dll(self, dll_name, pid)

source code 
Eject a loaded DLL from a running process.
Parameters:
  • dll_name (String) - The name of the DLL you wish to eject.
  • pid (Integer) - The process ID that you want to eject a DLL from.

    @returns True if successful, False if not.

inject_dll(self, dll_path, pid)

source code 
Inject a DLL of your choice into a running process.
Parameters:
  • dll_name (String) - The path to the DLL you wish to inject.
  • pid (Integer) - The process ID that you wish to inject into.

    @returns True if the DLL was injected successfully, False if it wasn't.