ECTF 2016: DaaS (Crypto, 50 pts)

Shawty set up a decryption service for his homies. Plz rek it.
Hosted at:

ECTF{Good job! You broke RSA!}

If you look at the source code from, you will notice that it allows you to decrypt any cipher text with their private RSA key except for the flag:

if ct == original_ctext:  
    self.socket.send("Enter a different ciphertext!\n")

Thus, all we have to do is square the flag and decrypt that. The flag will merely be the square root of the result. The number you get back from the decryption of the square of the flag is 14976163546025824215219983377430419358004271280652134044154188258973584975862835304227097446148458887402217784615786067424779807312505454548381779044, the square root of which is 122377136533038001196115884989660077193971120967459330489119850802647760138. Converting this number to hex and printing out the ASCII results in ECTF{Good job! You broke RSA!}.