Created
October 28, 2018 09:01
-
-
Save ywkw1717/1e879639885bd8f31d2fbeeea10c1bef to your computer and use it in GitHub Desktop.
SECCON 2018 Online CTF Special Instructions
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
#!/usr/bin/env python | |
def main(): | |
key = ["35c36d03", | |
"c8fa2132", | |
"9f72275c", | |
"3ed1ca90", | |
"e32b4951", | |
"1c29ac51", | |
"e5e39880", | |
"7f0f53f9", | |
"89d0b941", | |
"f5e6563d", | |
"cbf769ad", | |
"4ba4dacc", | |
"49a432b2", | |
"c557954b", | |
"40a4eeb4", | |
"dd74800d", | |
"ce2e86b7", | |
"2a1de9cb", | |
"f6084259", | |
"70ff1d78", | |
"b93854d0", | |
"b5228d01", | |
"8b22df40", | |
"8b583725", | |
"e54151fb", | |
"e45c5644", | |
"1e13e10e", | |
"6a399017", | |
"f63e5c0a", | |
"bcd582d5", | |
"9ec62492", | |
"7e8849b8"] | |
flag = "6d 72 c3 e2 cf 95 54 9d b6 ac 03 84 c3 c2 35 93 c3 d7 7c e2 dd d4 ac 5e 99 c9 a5 34 de 06 4e".split(" ") | |
randval = "3d 05 dc 31 d1 8a af 29 96 fa cb 1b 01 ec e2 f7 15 70 6c f4 7e a1 9e 0e 01 f9 c2 4c ba a0 a1 08".split(" ") | |
result = "" | |
for i in range(len(flag)): | |
result += chr((int(randval[i], 16) ^ int(key[i][-2:], 16)) ^ int(flag[i], 16)) | |
print result | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment