Created
December 2, 2016 16:12
-
-
Save t94j0/684fbab0e46e8765bea49fb4c3d856f8 to your computer and use it in GitHub Desktop.
Getting shellcode from an objdump. Typically used for ASM. Just use `get_shellcode BINARY`
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