Skip to content

Instantly share code, notes, and snippets.

@t94j0
Created December 19, 2016 22:01
Show Gist options
  • Save t94j0/c51ab10da4197f2cef621b838e9b066b to your computer and use it in GitHub Desktop.
Save t94j0/c51ab10da4197f2cef621b838e9b066b to your computer and use it in GitHub Desktop.
New and improved shellcode getter
function get_shellcode
objdump -D ./$argv[1]|grep '[0-9a-f]:'|grep -v 'file'|cut -f2 -d:|cut -f1-6 -d' '|tr -s ' '|tr '\t' ' '|sed 's/ $//g'|sed 's_ _\\\x_g'|paste -d '' -s |sed 's/^/"/'|sed 's/$/"/g'
end
@t94j0
Copy link
Author

t94j0 commented Dec 19, 2016

You can substitute the -D for -d at the beginning of objdump to just get the .text section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment