Skip to content

Instantly share code, notes, and snippets.

@thefotios
Created October 2, 2011 16:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefotios/1257586 to your computer and use it in GitHub Desktop.
Save thefotios/1257586 to your computer and use it in GitHub Desktop.
Use this script to convert objdump output to a binary file
# 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