Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SECCON 2018 Online CTF Special Instructions
#!/usr/bin/env python
def main():
key = ["35c36d03",
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__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment