Gallopsled / Gallopsled/pwntools
Add the ability to specify custom shellcraft templates
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.9k
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
Shellcraft templates are a really nice feature when needing to write custom shellcode but there is currently no easy way to do this.
The best way I can come up with is something like the following:
```python
from pwn import shellcraft
from pwnlib.shellcraft.internal import make_function
import shutil
shellcraft_templates = Path(shellcraft.__file__).resolve().parent / "templates"
shutil.copy("custom_shellcode.asm", shellcraft_templates / "x86" / "linux")
custom_shellcode = make_function("custom_shellcode", "custom_shellcode.asm", "x86/linux")
...
```
But copying files to shellcraft's template folder and relying on internal interfaces to do this does not seem ideal
Contributor guide
Research direction
Start by reading pwnlib.shellcraft.internal.make_function and the shellcraft templates directory described in the issue, including the custom_shellcode.asm example. Define and verify a supported way to load a custom template without copying files into the installed template folder or relying on internal interfaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100