File: README.md

package info (click to toggle)
unicorn-engine 2.1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,912 kB
  • sloc: ansic: 379,830; python: 9,213; sh: 9,011; java: 8,609; ruby: 4,241; pascal: 1,805; haskell: 1,379; xml: 490; cs: 424; makefile: 348; cpp: 298; asm: 64
file content (39 lines) | stat: -rw-r--r-- 1,597 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
This documentation explains how to install the Java binding for Unicorn
from source.

0. Follow `docs/COMPILE.md` in the root directory to compile the core to the `build` directory.

   Note: by default, the Java binding native library will be built by statically linking to
   `../../build/libunicorn.a`, thereby removing `libunicorn` as a runtime dependency, but
   making the produced native library `libunicorn_java` bigger.

   If you instead want to dynamically link against the installed `libunicorn`, change
   `LIBS=../../build/libunicorn.a` to `LIBS=-lunicorn` in `Makefile`.

1. Install a JDK for your platform.

2. Install Maven: https://maven.apache.org/install.html.

3. Change directories into the java bindings and build the Maven package:

        $ mvn package

This will automatically build and test the Unicorn Java bindings.

The bindings consist of the native JNI library (`libunicorn_java.{so,dylib,dll}`)
and the Java JAR (`target/unicorn-2.xx.jar`). You will need to have the native
library on `java.library.path` and the JAR on your classpath.

The `src/main/test/java` directory contains some sample code to show how to use Unicorn API.
`samples` is a set of sample classes showcasing the various features of the Unicorn API,
while `tests` is a set of JUnit tests for the API.

- `Sample_<arch>.java`:
  These show how to access architecture-specific information for each
  architecture.

- `Shellcode.java`:
  This shows how to analyze a Linux shellcode.

- `SampleNetworkAuditing.java`:
  Unicorn sample for auditing network connection and file handling in shellcode.