Created
October 19, 2019 05:18
-
-
Save pryorda/c66ea4d4c6c709227c2fb62926f76056 to your computer and use it in GitHub Desktop.
Dump Process Memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
grep rw-p /proc/$1/maps \ | |
| sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' \ | |
| while read start stop; do \ | |
gdb --batch --pid $1 -ex \ | |
"dump memory $1-$start-$stop.dump 0x$start 0x$stop"; \ | |
done | |
# use strings on file after. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment