-
Put
pwngdb.py
andangelheap.py
into/path/to/pwndbg/pwndbg/
-
Put
commands/pwngdb.py
andcommands/angelheap.py
into/path/to/pwndbg/pwndbg/commands/
-
Add
import pwndbg.commands.pwngdb
andimport pwndbg.commands.angelheap
into/path/to/pwndbg/pwndbg/__init__.py
You can use these commands to install it:
#!/bin/bash
# You need to change the `/path/to/pwdbg` to your pwndbg location
pwndbg='/path/to/pwndbg'
cp pwngdb.py $pwndbg/pwndbg/pwngdb.py
cp angelheap.py $pwndbg/pwndbg/angelheap.py
cp commands/pwngdb.py $pwndbg/pwndbg/commands/pwngdb.py
cp commands/angelheap.py $pwndbg/pwndbg/commands/angelheap.py
sed -i -e '/import pwndbg.commands.xor/a import pwndbg.commands.pwngdb' $pwndbg/pwndbg/__init__.py
sed -i -e '/import pwndbg.commands.xor/a import pwndbg.commands.angelheap' $pwndbg/pwndbg/__init__.py
To avoid the conflict with pwndbg, some commands will be different or be removed.
-
got
will be renamed toobjdump_got
-
canary
will be removed since pwndbg already hascanary
command
- Use more pwndbg API if possible instead of using
gdb.execute
(see developer notes of pwndbg)