Skip to content

Python utility for extracting callgraphs and other related info from unstripped binaries.

License

Notifications You must be signed in to change notification settings

mjerabek/pybintools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pybintools

Python utility for extracting callgraphs and other related info from unstripped binaries.

Usage

from bintools import *
from pprint import pprint

# X86 binary with default tools
b = X86Binary('/bin/sh')

# ARM binary; arm-none-eabi-* tools are used
b = ARMBinary('my_arm_binary')

# use custom tools
b = ARMBinary('my_arm_binary', prefix='/path/to/toolchain/arm-linux-gnueabihf-')

# Get callgraph. C++ names are mangled.
g = b.get_callgraph()
pprint(g)

# demangle names and transform graph
dm = b.demangle_map(g.keys())
g_demangled = dict((dm[u], [dm.get(v,v) for v in vs]) for u,vs in g.items())

# get symbol sizes
sizes = b.get_symbol_sizes()
pprint(sizes)

About

Python utility for extracting callgraphs and other related info from unstripped binaries.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages