python2 <known message> <md5 digest> <string to append> [length of secret]
Original Message: "hello"
Secret: "welcome"
Length of Secret: 7
MD5 (secret + Original Message): "3752460bd048f6527619c4f6067d3afd"
Appened Message: "good"
python2 main.py "hello" "3752460bd048f6527619c4f6067d3afd" "good" 7
To conduct a hash extension attack on MD5, the fllowing information are needed
- Digest of
secret + Original Message
- Length of
secret + Original Message
- Content of
Original Message
Thanks @d0nutptr for the python implementation of MD5.