Gallopsled / Gallopsled/pwntools

ROP "describe" should use argument names from functions.py

Open
#1,914 0 comments 1 reaction 0 assignees View on GitHub
feature rop
Dominant language
Python
Stars
13.7k
Forks
1.9k
Avg merge
6d 23h
Merged PRs (30d)
3

Description

Currently, when calling e.g. `rop.system("/bin/sh")` and doing `rop.dump()` we might print out the address of `/bin/sh` with e.g. `arg0` as the "description" for that ROP slot.

It would be useful if, when doing `rop.call`, we look up the function in @zachriggle's `functions.py` (https://github.com/zachriggle/functions/blob/master/functions.py) and use the argument name from there.

Since this is a huge file, it should be lazily-loaded.

In this case, it has a line:

```
'system': Function(type='int', derefcnt=0, name='system', args=[Argument(type='char', derefcnt=1, name='command')]),
```

So we would be able to use `char* command` instead of `arg0`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.