Skip to content

Instantly share code, notes, and snippets.

@kevingosse
Created May 18, 2020 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevingosse/0d2768370fd8f0f88cd762be290d76f1 to your computer and use it in GitHub Desktop.
Save kevingosse/0d2768370fd8f0f88cd762be290d76f1 to your computer and use it in GitHub Desktop.
#!/bin/bash
offset="0x"$(nm -C $2/libcoreclr.so | grep GCEventStatus::enabledLevels | cut -d ' ' -f1)
module="0x"$(cat /proc/$1/maps | grep -m 1 libcoreclr.so | cut -d '-' -f1)
dd bs=1 skip="$(($module + $offset))" count=8 status=none if="/proc/$1/mem" | od -An -vtu4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment