Skip to content

Instantly share code, notes, and snippets.

@pcyu16
Forked from savanovich/mem_dump.py
Created May 21, 2019 02:04
Show Gist options
  • Select an option

  • Save pcyu16/755244dc7174ace8711f5062a780976e to your computer and use it in GitHub Desktop.

Select an option

Save pcyu16/755244dc7174ace8711f5062a780976e to your computer and use it in GitHub Desktop.
Memory Dump with Python
# http://lwn.net/Articles/655992/
# https://github.com/mfleming/bits/blob/master/python/bits/__init__.py
import bits
from ctypes import *
mem = (c_char * 128).from_address(0xf1390)
print bits.dumpmem(mem)
# 00000000: 2f 68 6f 6d 65 2f 6a 6f 73 68 ... /home/josh...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment