Created
May 11, 2015 15:43
-
-
Save chitoge/ab73da2839cbeb1c4b18 to your computer and use it in GitHub Desktop.
ASIS CTF 2015 Quals - dump
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 hashlib | |
# calculate key | |
key_ar = [0 for i in range(5)] | |
key_ar[0] = hex(58559604012647)[2:].decode('hex') | |
key_ar[1] = hex(27697077611219024)[2:].decode('hex') | |
key_ar[2] = hex(28839576914310229)[2:].decode('hex') | |
key_ar[3] = hex(14469853439423811)[2:].decode('hex') | |
key_ar[4] = hex(21189029315236706)[2:].decode('hex') | |
key = '-'.join(key_ar) | |
# original code | |
# key = raw_input('Please enter the access key: ').strip() | |
if len(key) == 38: | |
key_ar = key.split('-') | |
if len(key_ar) == 5: | |
if int(key_ar[0].encode('hex'), 16) == 58559604012647: | |
if int(key_ar[1].encode('hex'), 16) == 27697077611219024: | |
if int(key_ar[2].encode('hex'), 16) == 28839576914310229: | |
if int(key_ar[3].encode('hex'), 16) == 14469853439423811: | |
if int(key_ar[4].encode('hex'), 16) == 21189029315236706: | |
print key[18] + key[-2] + chr(ord(key[26]) - 1) + key[-2] + '{' + hashlib.md5(key).hexdigest() + '}' | |
else: | |
print 'You access key is not correct! Banned!!' | |
else: | |
print 'You access key is not correct! Banned!!' | |
else: | |
print 'You access key is not correct! Banned!!' | |
else: | |
print 'You access key is not correct! Banned!!' | |
else: | |
print 'You access key is not correct! Banned!!' | |
else: | |
print 'You access key is not correct! Banned!!' | |
else: | |
print 'You access key is not correct! Banned!!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment