项目作者: enferex

项目描述 :
libsprinkles: Simple disassembly library.
高级语言: C++
项目地址: git://github.com/enferex/libsprinkles.git
创建时间: 2019-12-15T01:18:51Z
项目社区:https://github.com/enferex/libsprinkles

开源协议:

下载


libsprinkles: Simple disassembly library.

This project is alpha (which is my excuse if something doesn’t
function accurately or correctly).

libsprinkles is both a library and has an accompanying example called vorhees
libsprinkles provides a simple API that can be used to disassemble binaries
using LLVM. The example program vorhees uses libsprinkles and can be used to
disassemble a binary into a JSON representation.

Usage

The best example is to look at vorhees/main.cc which takes as input an object
file and outputs a JSON representation of the executable code.

So you want to use the library?

  1. Include “sprinkles.hh”
  2. Instantiate a Sprinkles instance providing a path to an object file that is
    to be disassembled: sprinkles::Sprinkles S(filename);
  3. Initialize the Sprinkles instance (perform the disassembly):
    S.initialize();
  4. Now you’re ready to Sprinkle out some magical assembly!

Example

Vorhees is an object file -to- JSON dumper. Give it a whirl!
build/vorhees/vorhees <object file>

Building

  1. Create a build directory. mkdir libsprinkles/build
  2. From the just created build directory, invoke cmake with the path to the
    libsprinkles sources. cd libsprinkles/build; cmake ../
  3. Invoke make to build the library and example program vorhees.

Dependencies

  • llvm: libsprinkles uses many of the libraries provided
    by LLVM. Build and install LLVM, or use a package (llvm and/or llvm-dev).

Resources

Contact

Matt Davis: https://github.com/enferex