I'm developing a debugging automation system using https://github.com/MarioVilas/winappdbg.

I would like to retrieve process name from event object. Here is my code:

def EventHandler(event):
    print 'Inside event handler'
    # I want to print the  process name here, In this case which should be somefile.exe

debug = Debug( EventHandler, bKillOnExit = True )
proc = debug.execv(['c:\somefile.exe','arg'])
  • What is the question? – julian Mar 25 '17 at 18:38

The tool author answered my question on github : Here is the solution

We can do event.get_process().get_filename(), or if we want to be more fancy:

process = event.get_process()
name = process.get_filename()
print "Process: %s" % name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.