Created
October 2, 2011 16:12
-
-
Save thefotios/1257586 to your computer and use it in GitHub Desktop.
Use this script to convert objdump output to a binary file
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: objdump -D test.exe | perl this_script.pl > file.shellcode | |
while(<>){ | |
if (/^\s[\dA-Fa-f]+:\s(.*?)\s{2}/) { | |
foreach(split(/\s/,$1)){ | |
printf pack('H*',$_) ; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment