Metadata-Version: 2.1
Name: gadgetfinder
Version: 1.0.0
Summary: A tool with interactive shell for finding gadgets in executable files
Home-page: https://https://github.com/jmc0/GadgetFinder
Author: 733g10
Author-email: rla141@sfu.ca, zma30@sfu.ca, zca110@sfu.ca
License: UNKNOWN
Project-URL: Bug Tracker, https://https://github.com/jmc0/GadgetFinder/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# GadgetFinder
A tool with interactive shell for finding gadgets in executable files. 
Support ELF and PE file format, multiple architectures and modes: x86, ARM, 32bit, 64 bit.
Can also assemble and disassemble instructions.


## Requirements
+ capstone
+ keystone
+ pyelftools
+ pefile

## Getting started
create a virtualenv:
```bash
virtualenv env            
source env/bin/activate   # activate the Python virtualenv 
```

Install development dependencies:
```bash
pip install -r requirements.txt
```

Run the interactive shell:
```bash
cd src/gadgetfinder
python3 shell.py
```

## Examples
In the interactive shell, run:
```bash
asm inc eax; add eax,ecx  --arch x86  --mode 64
disas ['0xff', '0xc0', '0x1', '0xc8'] --mode 64
asm pop ebp; ret
disas ['0x5d', '0xc3']
```
<img src="media/shell2.PNG" width="80%" height="80%" />

```bash
load ../../data/prog.file 
info
dump
```

<img src="media/shell1.PNG" width="50%" height="50%" />

```bash
search pop ebp
```

<img src="media/shell3.PNG" width="80%" height="80%" />

## Build your own package
You can edit configuration in setup.config.\
To build:
```bash
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
python3 -m build
```

## Package usage
### Installation
```
$ pip install gadgetfinder==0.0.1
```

### Usage

<img src="media/ts1.png" width="80%" height="80%" />
<img src="media/ts2.png" width="80%" height="80%" />


