When connecting to the challenge server, it gives us a strange string.
File command says it is zlib compressed string. Well then, just use a script to decompress it everytime (what is send to the server should also be zlib compressed).
We are required to send two different strings with same sha1 value. It is easy to recall the two pdfs with same sha1 that Google release several weeks ago. First 320 byte of the two files are different.
Experiments show that, if we use the different first 320 bytes and a same suffix to construct a string, their sha1 will also be the same. The sha1 should end with certain 5 bytes, but this is easily worked out with brute force. So again write a script (kinda ugly though)
from pwn import *
for i in xrange(10000000):
#for i in xrange(100):
Run it and the server would pop the flag.