Files
favicon-trap/bindings/python
Charles Ferguson 1ba59ed70a Clear Python pending hook exception before we enter the emulation.
The pending exception hook is set when the hook raised an exception
and wants to report it outside the emulation loop. However, it is
never cleared back to None. This means that after an exception is
raised in a hook, all subsequent execution (even if successful) will
raise the exception.

This change clears the exception before we start another emulation,
which should ensure that if we have _hook_exception set, it really
is from hooks in this emulation run.
2022-01-15 17:45:45 +00:00
..
2021-10-04 22:22:41 +08:00
2021-10-26 13:10:59 +02:00
2015-08-28 21:05:38 -07:00
2021-10-03 22:14:44 +08:00
2017-05-15 09:11:22 +08:00
2017-04-25 12:55:26 +08:00
2021-11-04 21:47:30 +01:00
2016-11-06 16:27:24 -08:00
2016-11-06 16:27:24 -08:00
2021-10-03 22:14:44 +08:00
2021-10-03 22:14:44 +08:00
2016-11-06 16:27:24 -08:00
2021-10-03 22:14:44 +08:00
2021-11-25 18:19:46 +01:00

This documentation explains how to install the python binding for Unicorn
from source.

1. Installing on Linux:

	$ sudo python setup.py install

	This will build the core C library, package it with the python bindings, 
	and install it to your system.

    If you want to prevent the build of the native library during the python installation,
    set the environment variable LIBUNICORN_PATH. You may also set this to a directory
    containing libunicorn.so if you wish to use a verison of the native library other than
    the globally installed one.


2. Installing on Windows:

	Run the following command in command prompt:

		C:\> C:\location_to_python\python.exe setup.py install

	Next, copy all the DLL files from the 'Core engine for Windows' package available
	on the Unicorn download page and paste it in the path:

		C:\location_to_python\Lib\site-packages\unicorn\


3. Sample code

	This directory contains some sample code to show how to use Unicorn API.

	- sample_<arch>.py
	  These code show how to access architecture-specific information for each
	  architecture.

	- shellcode.py
	  This shows how to analyze a Linux shellcode.

	- sample_network_auditing.py
	  This shows how to analyze & interpret Linux shellcode.