diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bee8a64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/Day 12/BackToBasic.exe b/Day 12/BackToBasic.exe new file mode 100644 index 0000000..6dbe398 Binary files /dev/null and b/Day 12/BackToBasic.exe differ diff --git a/Day 12/decode.py b/Day 12/decode.py new file mode 100644 index 0000000..88aa947 --- /dev/null +++ b/Day 12/decode.py @@ -0,0 +1,11 @@ +#!/usr/bin/python + +def xor(str1, str2): + l = min(len(str1), len(str2)) + return "".join(chr(int(str1[i]) ^ int(str2[i])) for i in range(l)) + +str3 = b"6klzic<=bPBtdvff'y\x7fFI~on//N" # expected input encrypted +str1 = b"AAAAAAAAAAAAAAAAAAAAAAAAAAA" # input +str2 = b"GFIHKJMLONQPSRUTWVYX[Z]\_^a" # input encrypted +key = xor(str1, str2).encode("UTF-8") # key +print("HV19{%s}" % xor(str3, key))