Wednesday 26 February 2014

Hexrays Python Binding for IDA 6.1 and Python 2.7

This is my hexrays-python prebuild:

IDA 6.1 & Python 2.7
https://mega.co.nz/#!sd8ARbSZ!gQeF3RqzgS_ynVR2KYxA0MIZxri1Ak5db45oiJ15gfw
Read more about hexrays-python in:

https://github.com/EiNSTeiN-/hexrays-python

Video Demo:

Demo Hexrays Python in IDA Pro 6.1 & Python 27

Demo code:

""" It demonstrates how to decompile full function at current cursor position.
Author: ASUS
"""
import hexrays
import idaapi
 
def main():
  # Start hexrays plugin
  if not hexrays.init_hexrays_plugin():
    return False
 
  print "Hex-rays version %s has been detected" % hexrays.get_hexrays_version()
 
  # Get function at current screen address
  f = idaapi.get_func(idaapi.get_screen_ea());
  if f is None:
    print "Please position the cursor within a function"
    return True
 
  # Decompile whose function
  cfunc = hexrays.decompile(f);
  if cfunc is None:
    print "Failed to decompile!"
    return True
 
  # Print function as string
  print str(cfunc)
 
if main():
  # Terminate hexrays plugin
  hexrays.term_hexrays_plugin();

Read more:

http://techbliss.org/threads/hexrays-python-binding-for-ida-6-1-hexrays-1-5.479/

No comments: