Skip to content

Commit

Permalink
Merge: development -> main
Browse files Browse the repository at this point in the history
Chores
  • Loading branch information
Sarapulov-Vas authored Nov 1, 2024
2 parents d709b48 + 5be3bd6 commit 4df6a7b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: blacktop/ghidra
image: blacktop/ghidra:11.1.0
env:
GHIDRA_INSTALL_DIR: /ghidra
strategy:
Expand All @@ -26,7 +26,7 @@ jobs:
run: |
apt update
apt install build-essential -y
apt install pip -y
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
Expand Down
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

0 comments on commit 4df6a7b

Please sign in to comment.