Skip to content

Instantly share code, notes, and snippets.

@rkubik
Forked from kmcallister/dump-vdso.py
Created February 25, 2016 15:39
Show Gist options
  • Save rkubik/115b8251468a583b5469 to your computer and use it in GitHub Desktop.
Save rkubik/115b8251468a583b5469 to your computer and use it in GitHub Desktop.
dump vdso
#!/usr/bin/env python
from ctypes import *
for ln in open('/proc/self/maps'):
if "[vdso]" in ln:
start, end = [int(x,16) for x in ln.split()[0].split('-')]
CDLL("libc.so.6").write(1, c_void_p(start), end-start)
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment