Skip to content

Instantly share code, notes, and snippets.

@cryptolok
Created February 22, 2020 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cryptolok/26cfe7c8379f8b9311c309dc692c8e46 to your computer and use it in GitHub Desktop.
Save cryptolok/26cfe7c8379f8b9311c309dc692c8e46 to your computer and use it in GitHub Desktop.
#!/bin/bash
# vimdiff for assembly
# $ apt install vimdiff objdump
BIN1=$1
BIN2=$2
if [ ! "$BIN1" ] && [ ! "$BIN2" ]
then
echo 'Usage : asmdiff $BINARY1 $BINARY2'
echo 'Example : asmdiff original.dll cracked.dll'
exit 1
fi
umask=$(umask)
umask 337
ONE=/tmp/$RANDOM
TWO=/tmp/$RANDOM
objdump -xDTFa "$BIN1" > $ONE
objdump -xDTFa "$BIN2" > $TWO
umask $umask
vimdiff -c ':set syntax=asm' -c ':color elflord' $ONE $TWO
rm -f $ONE $TWO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment