
If you're on OSX you can simply use DYLD_FRAMEWORK_PATH to get binja to use Brew Python and by extension, the modules installed by pip. Now if you normally use Python installed via brew (as you should be doing) run:ĭYLD_FRAMEWORK_PATH=/usr/local/opt/python/Frameworks /Applications/Binary\ Ninja.app/Contents/MacOS/binaryninjaīinja should open up except instead of using the built-in system Python it will now use the brew installed Python.Īnd IPython and all its tab-complete goodness and syntax highlighting should be visible in the terminal that started binja. Sys.stderr = _PythonScriptingInstanceOutput(sys.stderr, True) Sys.stdout = _PythonScriptingInstanceOutput(sys.stdout, False) Sys.stdin = _PythonScriptingInstanceInput(sys.stdin)

# Wrap stdin/stdout/stderr for Python scripting provider implementation
Brew install ipython Patch#
You should now apply the patch here by modifying the last few lines of _init_.py to the following code: if not (): Applications/Binary Ninja.app/Contents/Resources/python/binaryninja/_init_.py Note that right now this trick for IPython will only work on OSXįirst you need to modify _init_.py to effectively break the built in Python console while you are using IPython.
Brew install ipython license#
If you run into issues with IPython calling () and giving an error about _PythonScriptingInstanceOutput, keep reading.įor users of the personal license it's a little more difficult to get IPython working. The binja Python console is a vanilla Python console that overrides stdin/stdout/stderr to get the Python output to show up in the binja interface.įor users of binja's commercial license there's little problem with just modifying the PYTHONPATH (like we did before with add2virtualenv) to include the binaryninja Python module and also use IPython. mkvirtualenv binjaĪdd2virtualenv '/Applications/Binary Ninja.app/Contents/Resources/python'Īll of a sudden you're that much more organized! IPython and Tab Complete

You can do that with the following commands with virtualenvwrapper. If you have the commercial license and leverage the scripting interface it may help to install the binaryninja module in a virtualenv. Virtual Environments are great, they help you keep your Python modules organized and even let you switch Python versions pretty easily.

I've played with binja a bit and here are some things I've figured out that help me when working with it. It's clear that if the IDA Disassembler is going to be the IDE of reversing, then Binary Ninja (or binja as most people call it) wants to be the Sublime Text or Atom text editor of reversing. It represents a new age of beautiful, programmatic reverse engineering. Binary Ninja is the new hotness in the reverse engineering world.
