Skip to content

Instantly share code, notes, and snippets.

@pajp pajp/script.sh
Created Aug 26, 2012

Embed
What would you like to do?
print out oauth tokens from a process using dtrace
#!/bin/sh
/Applications/Twitter.app/Contents/MacOS/Twitter &
sudo dtrace -q -p $! -n 'pid$target::free:entry /arg0 != 0/ { printf("%s\n", copyinstr(arg0)) }' 2> /dev/null | grep oauth
@stisti

This comment has been minimized.

Copy link

stisti commented Aug 27, 2012

Nice hack! Does it work?

@pajp

This comment has been minimized.

Copy link
Owner Author

pajp commented Sep 5, 2012

It works surprisingly well. It was inspired by this: https://twitter.com/joedamato/statuses/237583522003574784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.