Created
October 18, 2021 18:20
-
-
Save Mr-Un1k0d3r/9b4e580dc46540b91eb2e247361f89b5 to your computer and use it in GitHub Desktop.
Generate shellcode bash script
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
# Usage: | |
# ./generate.sh file.o | |
# \x0f\x01\x.. | |
# ./generate.sh file.o ,0x | |
# ,0x0f,0x01,0x.. | |
#!/bin/bash | |
DELIMITER=$2 | |
if [ -z "$DELIMITER" ] | |
then | |
DELIMITER='\x' | |
fi | |
for i in $(objdump -d $1 -M intel |grep "^ " |cut -f2); do echo -n $DELIMITER$i; done;echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment