Skip to content

Instantly share code, notes, and snippets.

@KaoRz
Created December 22, 2018 19:04
Show Gist options
  • Save KaoRz/bbc20ffc9f6b7aed658bb93a9841b353 to your computer and use it in GitHub Desktop.
Save KaoRz/bbc20ffc9f6b7aed658bb93a9841b353 to your computer and use it in GitHub Desktop.
Santa's lucky number - Web Challenge | X-MAS CTF 2018
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