Switch branches/tags
Clone or download
Latest commit 4ac11f0 May 13, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Add some examples May 11, 2017
src/Hapstone Fixed alignment, this time the right way :) May 12, 2017
test Fixed alignment, this time the right way :) May 12, 2017
.gitignore Removed binaries Mar 13, 2016
LICENSE Fix missing text in LICENSE May 10, 2017
README.md Add some examples May 11, 2017
Setup.hs Initial commit Feb 25, 2016
hapstone.cabal Updated cabal file. May 12, 2017
stack.yaml Update for capstone-3.0.5-rc2 May 10, 2017

README.md

Hapstone - Haskell bindings for Capstone

This repository contains bindings to the Capstone disassembly framework (link). At the time of writing, both low-level and idiomatic bindings are present.

The documentation is probably pretty complete, but might need clarification. In case you find bugs, want to contribute, especially enhance the docs, please do this over issues/pull requests on GitHub, contribution is always welcome.

Link to Hackage.

Installation

To install the bindings, make sure c2hs is present on your system, as it is used to preprocess the bindings to Capstone. Obviously, Capstone needs to be installed as well. Then, you can simply pull the package from Hackage via cabal or manually.

Examples

Please see the examples directory for more information on how to use Hapstone.

In short, you must import Hapstone.Capstone and then call either disasmIO or disasmSimpleIO if you plan on using the defaultAction rather than building your own. You define a Disassembler with the correct parameters that define the architecture and mode to use, plus the actual buffer of data that should be disassembled.