Coder Social home page Coder Social logo

lexxeous / py_basic_blocks Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 278 KB

Linux Executable Basic Block Random Access Disassembly with Python3

Home Page: https://wikipedia.org/wiki/Basic_block

Makefile 1.46% Python 98.54%
executable linux basic-block disassembly python python3 capstone pyelftools

py_basic_blocks's Introduction

Lexxeous's Python Basic Blocks:

Summary:

This program takes a Linux executable as an input, and optionally a list of values as manual basic block leader addresses, and disassembles the executable's .text section, at an assembly level, into all of its unique, basic logic blocks.

You can read more about basic blocks from the Wikipedia page.

How to Run:

You can run basic_blocks.py manually using:

python3 basic_blocks.py <executable_path> [space_separated_list_of_values]

where <executable_path> can also be `which <executable_name>`.

Using Make:

Alternatively, you can take advantage of the Makefile by using:

make <executable_name>

which will disassemble all of the basic blocks for an exacutable called <executable_name>.

To include a list of manual leaders, use:

make <executable_name> leaders=<value>\ <value>\ ... \ <value>

where the list of values is separated by escaped space characters "\ ".

Values in the leaders list represent addresses in the .text section of the chosen executable. The values must be within range and may be of formats hexidecimal or decimal integer.

Output Files:

The output of all basic blocks is to a file called basic_blocks.txt.

The .text section and the entire <explore> list is outputted to a file called text_section.txt.

Cleaning Up:

Using make clean will remove these two output files. They will be recreated upon running the program again.

py_basic_blocks's People

Contributors

lexxeous avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.