Skip to content

Instantly share code, notes, and snippets.

@suzusime
Created December 11, 2017 21:04
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 suzusime/005c7fbf2d069367a47aa0e7f61559a0 to your computer and use it in GitHub Desktop.
Save suzusime/005c7fbf2d069367a47aa0e7f61559a0 to your computer and use it in GitHub Desktop.
SECCON 2017 Online CTF - SHA-1 is dead
import struct
#print('h'*(4035*512))
src = open("shattered-1.pdf", "rb").read()
l = 4035*512 - len(src)
src = src + b'h'*l
dst = open("made1", "wb").write(src)
src2 = open("shattered-2.pdf", "rb").read(4035*512)
l2 = 4035*512 - len(src2)
src2 = src2 + b'h'*l2
dst2 = open("made2", "wb").write(src2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment