Skip to content

Latest commit

 

History

History
110 lines (67 loc) · 4.28 KB

docs.md

File metadata and controls

110 lines (67 loc) · 4.28 KB
layout title permalink
page
Documentation
/docs/

Find details on the design & implementation of Unicorn in this BlackHat USA 2015 slides.


Compile & install Unicorn

There are several methods to compile and install Unicorn.

1. From source code

Find the source in Download section and follow the instructions to build and install the core of Unicorn.

2. From repositories

This section explains how to install Unicorn on *nix platforms from some software repositories.

2.1 Mac OSX - core engine

Homebrew users can install the core of Unicorn with:

{% highlight bash %} $ brew install unicorn {% endhighlight %}

Note that Homebrew installs libraries into its own directory, so you need to tell applications where to find them, for example with:

{% highlight bash %} $ export DYLD_LIBRARY_PATH=/usr/local/opt/unicorn/lib/:$DYLD_LIBRARY_PATH {% endhighlight %}

2.2 Pkgsrc - core engine

Unicorn has been packaged for pkgsrc, thus available for NetBSD, FreeBSD, Bitrig and OpenBSD.

Installation from binary pre-built packages with:

{% highlight bash %} $ pkgin install unicorn {% endhighlight %}

Installation from sources with:

{% highlight bash %} $ cd /usr/pkgsrc/emulators/unicorn && make install {% endhighlight %}

3. Python binding

The easiest way to install Python binding is via pip, where packages for all the Operating Systems, including Windows, are provided. Simply run the below command from prompt (you need sudo on Linux, MacOS for root access).

{% highlight bash %} pip install unicorn {% endhighlight %}

If you want to install from source, note that Python binding depends on the core, so make sure to install the core before you can use this binding.

On *nix platforms, do: {% highlight bash %} $ cd bindings/python $ sudo make install {% endhighlight %}

On Windows, do: {% highlight bash %} cd bindings/python python setup.py install {% endhighlight %}

For Windows, after above steps, you need to copy all the DLL files from the Windows core engine in the Download section into directory C:\location_to_python\Lib\site-packages\unicorn.


4. Precompiled binaries

At the moment precompiled binaries for Windows & Java are available in our Download section.

  • Windows

    If you only want to write your tool in Python, all you need is the Python installer, which includes full Unicorn module. The Windows core engine is not necessary because it is already embedded inside the Python module.

    For all the bindings, firstly you still need to install the Windows core engine, which includes the static/dynamic libraries and also the headers (*.h) for C programming.

  • Java

    Java binding is available in JAR package.


Programming

After installation, find in tutorials below how to write your tools based on Unicorn using your favorite programming languages.


Miscellaneous