Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbund/decompiler-explorer
Watch for changes in a binary and output a C-like decompilation
https://github.com/mbund/decompiler-explorer
c decompiler ghidra python reverse-engineering visualization
Last synced: 2 days ago
JSON representation
Watch for changes in a binary and output a C-like decompilation
- Host: GitHub
- URL: https://github.com/mbund/decompiler-explorer
- Owner: mbund
- License: gpl-3.0
- Created: 2023-09-19T04:06:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-20T21:29:36.000Z (about 1 year ago)
- Last Synced: 2024-04-24T03:22:32.982Z (7 months ago)
- Topics: c, decompiler, ghidra, python, reverse-engineering, visualization
- Language: Python
- Homepage:
- Size: 2.36 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Decompiler Explorer
Watch for changes in a binary and output a C-like decompilation.
![usage gif](docs/usage.gif)
## Usage
Run with nix
```
nix run github:mbund/decompiler-explorer
```CLI Usage
```
usage: decompiler-explorer [-h] [-o OUTPUT] [-v] [-n FUNCTIONS [FUNCTIONS ...]] binDecompiler explorer
positional arguments:
bin Path to binary used for analysisoptions:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Location for all decompilations
-v, --verbose Verbose output
-n FUNCTIONS [FUNCTIONS ...], --functions FUNCTIONS [FUNCTIONS ...]
Function names to decompile
```Use something like [entr](https://github.com/eradman/entr) to watch for changes in a file and recompile.
```bash
examples$ find . -name '*.c' | entr make
```Then also watch with the decompiler explorer.
```bash
examples$ decompiler-explorer program
```Or with extra options
```bash
examples$ decompiler-explorer -o output.gc ./program -n main myFunction
````output.gc` is the default output file, where `.gc` is short for "C-like ghidra decompilation"
## VSCode tips
Set the language mode of the outputted C like code to `C#` or some other language where you don't have a language server set up that will just give errors, but still has good syntax highlighting.
Run `File: Toggle Active Editor Read-only in Session` to set the outputted C like code to read only, since it will always be overwritten by Decompiler Explorer if your source binary changes.