Created
July 25, 2025 18:01
-
-
Save bjhaid/20f3df6f9cca8fbfdaebed23010f6594 to your computer and use it in GitHub Desktop.
dump linux process memory
This file contains hidden or 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
| cat /proc/$1/maps | grep -Fv ".so" | grep " 0 " | awk '{print $1}' | ( IFS="-" | |
| while read a b; do | |
| dd if=/proc/$1/mem bs=$( getconf PAGESIZE ) iflag=skip_bytes,count_bytes \ | |
| skip=$(( 0x$a )) count=$(( 0x$b - 0x$a )) of="$1_mem_$a.bin" | |
| done ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment