Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme actualization #75

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# recompilation_postprocessor
![Pylint](https://github.com/VyacheslavIurevich/recompilation_postprocessor/actions/workflows/pylint.yml/badge.svg)
![Pylint](https://github.com/VyacheslavIurevich/recompilation_postprocessor/actions/workflows/lint.yml/badge.svg)

This script provides ability to postprocess code, which is decompiled via Ghidra, to make it recompilable.
This script provides ability to postprocess code, which is decompiled via Ghidra, to make it closer to recompilable.
# Technologies used
* [Python 3.12](https://www.python.org/)
* [pyhidra](https://github.com/dod-cyber-crime-center/pyhidra)
* [Ghidra](https://github.com/NationalSecurityAgency/ghidra)
* [Ghidra 11.1.0](https://github.com/NationalSecurityAgency/ghidra)

Development:
* [Pylint](https://www.pylint.org/)
* [Pytest](https://docs.pytest.org/en/stable/)
* [Shellcheck](https://www.shellcheck.net/)

Running tests:
* [GCC](https://gcc.gnu.org/)

# Setup
Ensure that you do have Python with installed used technologies and Ghidra app.
Ensure that you do have Python with installed pip, Ghidra app and GCC compiler. If you want to run CI scripts, ensure you do have shellcheck installed.
Then just clone the repo
using HTTPS:
```shell
Expand Down Expand Up @@ -46,13 +50,23 @@ python3 run.py {path to input binary} {output .c file path}
```
For example:
```shell
mkdir -p res/out
python3 run.py res/in/hello_world res/out/hello_world.c
```
After this, you can try to compile output code. Example with GCC:
```shell
gcc res/out/hello_world.c
```
Enjoy!
# Running tests
Ensure you do have res/out directory set.
```shell
mkdir -p res/out
```
After that, you can run our tests using pytest.
```shell
pytest src/tests/user_tests.py
```
# File structure
```
├── run.py # Runs the postprocessor
Expand Down Expand Up @@ -94,7 +108,7 @@ Enjoy!
* Vyacheslav Kochergin. [GitHub](https://github.com/VyacheslavIurevich), [Contact](https://t.me/se4life).
* Vasilii Sarapulov. [GitHub](https://github.com/Sarapulov-Vas), [Contact](https://t.me/sarpaulov).
# Project status
In development.
Paused. Check our Ghidra [fork](https://github.com/VyacheslavIurevich/recompilation-ghidra)
# Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md)
# License
Expand Down
Loading