Created
December 19, 2016 22:01
-
-
Save t94j0/c51ab10da4197f2cef621b838e9b066b to your computer and use it in GitHub Desktop.
New and improved shellcode getter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can substitute the
-D
for-d
at the beginning ofobjdump
to just get the .text section