Created
February 17, 2021 21:10
-
-
Save xmpf/66af365793281937a851a6b3b08f0718 to your computer and use it in GitHub Desktop.
binary2shellcode
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 bin2shellcode { | |
echo "----- CUT HERE -----" | |
sc="" | |
for i in $(objdump -d "$1" | awk -F"\t" '{ print $2 }' | tr '\n' ' ' | sed 's/\ //g' | fold -w 2 | paste -sd' ') | |
do | |
sc="${sc}\\\x${i}" | |
done | |
echo "\"${sc}\"" | |
echo "--------------------" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment