Package Libs :: Module internals
[hide private]
[frames] | no frames]

Source Code for Module Libs.internals

 1  #!/usr/bin/env python 
 2  """ 
 3  (c) Immunity, Inc. 2004-2007 
 4   
 5   
 6  U{Immunity Inc.<http://www.immunityinc.com>} 
 7   
 8   
 9  Internal libs 
10   
11   
12  """ 
13   
14  __VERSION__ = '1.0' 
15   
16  import pickle 
17  import immlib 
18   
19   
20   
21   
22 -def hookmain(pickled_hook,regs):
23 """Auxiliar hook function 24 get pickled hook instance and execute run()""" 25 imm= immlib.Debugger() 26 hook=pickle.loads(pickled_hook) 27 if hook.enabled==True: #only enabled hooks will execute 28 hook._run(regs) #be sure this method is actually the one you want executed with your hook
29 30
31 -def hookmaintimeout(pickled_hook,regs):
32 """Auxiliar hook function 33 get pickled hook instance and execute runtimeout()""" 34 imm= immlib.Debugger() 35 hook=pickle.loads(pickled_hook) 36 if hook.enabled==True: #only enabled hooks will execute 37 hook._runTimeout(regs) #be sure this method is actually the one you want executed with your hook
38 39 40 41
42 -def addGenHook(object):
43 imm=immlib.Debugger() 44 imm.addGenHook(object) 45 del imm
46