GithubHelp home page GithubHelp logo

ax330d / hrdev Goto Github PK

View Code? Open in Web Editor NEW
176.0 16.0 50.0 146 KB

Hex-Rays Decompiler Enhanced View

License: MIT License

Python 100.00%
python ida-pro ida-plugin clang-python-binding hex-rays-decompiler

hrdev's Introduction

Hex-Rays Decompiler Enhanced View (HRDEV)

What is this

This is an IDA Pro Python plugin to make Hex-Rays Decompiler output bit more attractive. HRDEV plugin retrieves standard decompiler output, parses it with Python Clang bindings and puts back.

Requirements & installation

The only requirement is Clang Python binding. See https://pypi.python.org/pypi/clang. Clang binding is required to parse decompiler output and produce plugin output.

First install Clang Python binding if you don't have it, then just paste plugin into "plugins/" IDA folder and plugin will be available on startup.

Note: please make sure that you have matching LLVM Python bindings and LLVM version installed (http://releases.llvm.org/download.html). Otherwise you may get errors due to incompatibility. This is not an HRDEV issue.

Note: only IDA version higher than 6.6 is supported. If I get requests to support earlier versions I will port HRDEV. See http://www.hexblog.com/?p=886.

How it works

Load plugin, then press "Alt + F5" and listing will appear. Currently this is an alternative only to a standard "F5" (function decompilation), listing for complete files is currently not supported.

You can put plugin into "plugins/" directory or load it via Alt+F7. If you put it into "plugins/" folder, then place hrdev.py and hrdev_plugin at the same level and exactly under "plugins/".

Options

HRDEV plugin has other key shortcuts:

  • Ctr+S - will save current document
  • Ctr+F - will pop up find-replace modal dialog

HRDEV plugin comes with several themes for syntax highlighting, however, you can edit them or add own. To add your own, simply paste file with certain theme name to folder "data/themes" and edit your file. The name of the file is the name of the theme.

For various editor options please take a look at "data/config.ini" and configuration files in "data/themes/*.ini". Files contain comments, so it should not be difficult to understand how to configure editor.

You can toggle line highlight on-off by clicking twice on line number bar.

Other things to know

Plugin may print that there were some Clang parsing errors, but normally that is not of a big concern, usually you can ignore them.

Plugin saves all decompiled files to the "hrdev_cache/MODULE_NAME/*" temporary folder. It is done so you can save changes made to file. Next time when Alt+F5, is pressed, plugin will lookup for file in cache. If you want to discard changes made, simply delete file in "hrdev_cache/MODULE_NAME/*" folder or disable file caching at all by configuring settings: "disable_cache=True".

This is still beta-release, so I am pretty sure you will find some bugs. Don't hesitate to report them.

Plugin was tested on Windows only, however, I believe that there should be no problems on other platforms.

Parsing huge file may take a while.

Examples

This is how usually output looks like:

Decompiler outut

This is how output looks by plugin:

Enhanced View

TODOs and bugs

See TODO.

hrdev's People

Contributors

ax330d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hrdev's Issues

Error in hrdev_plugin

Hi,
I have copied hrdev.py and the hrdev_plugin folder in [ida path]/plugin/ , but when i try to decompile with alt+f5 ida report a python error in hrdev_plugin __init__.py (line 43): "global name hrdev_plugin is not defined".

virtualbox_cc17-windows-7_09_04_2017_20_35_51

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.