From 3cdd94b727598868ad2e3e7ef2a04cbb879d1f19 Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Thu, 12 Dec 2019 14:01:34 +0100 Subject: [PATCH] Day 12 solved --- .gitignore | 1 + Day 12/BackToBasic.exe | Bin 0 -> 20480 bytes Day 12/decode.py | 11 +++++++++++ 3 files changed, 12 insertions(+) create mode 100644 .gitignore create mode 100644 Day 12/BackToBasic.exe create mode 100644 Day 12/decode.py 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 0000000000000000000000000000000000000000..6dbe3988b8b6fe4c4087096c0e3165f10ab08f28 GIT binary patch literal 20480 zcmeHO4NzRyb-uf-1#%?7GB~ngMQar~ii#-+q##?WR={Ey^YeCrwWg7ZR_vl(w6J*J zB4JlVcmx?X>sS34`KM#KN<*ifgnGzC8PQbEphym`E7$5+vzt3Z+AhUcqUHLnZCQ6bMHC#oO91T_r7=Ud+$>FN5@2(5W)sfRUt-^Q*toAGa}i{ zH9yD{XO_PG;HahM?FSnJLD}9J3Ga(|+wCphj*f8DzSnP$bamK+9rlX)277zh=Py{k z{O&y6^wDqp^8LU6@Pz>bs{Z?>fww^a#ndaDubuic&fUS50Ld60NlqbZENSBFORw)X zcoQPa@;S>AA?)A~AeF8F$_5k?<XQ4PbjtF{l;1^N40;nU*2#I5lKgizm;5nwpIa`;_jbAE{?AMD{u3_wY4Dzg zz1NUmpONIDO=WVlMv~XQEp$@oC0Yj9+H_BI91hKE{U_ zuVK)haA24?k;-c?BTCIQvcV*FSWjN&)H?-+hWhV&uND5jK76y z4~g6*D#MZXBC*`ET2$>Qf868mh}t(67HzRVY%lY+?6*h5$mL**xZfhm#P6YNYM!CA zX)7%J2wfPtSBUT6ol2!uwcr(yu-qjY@kR#D+jd&3(q711ZTXx{RC$WFh!sNQS=BT< zq^wIsjd!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EF9nAJqh-J- z{@QVZ#m_DsRnrk=BOOK5(-D167zs-02Q`L9CF>KkE^g3gG+O zelA7aWZmtQq4hh;jo{7A&#UUJIIQ-HHCV&a0hAw}78do>!*+E#O;xA2tLn^L<8!FF z^BflmB|X!KB!(hg+Y2P}ck5yG!t9#q?X&4K>g*c8;TiRR(Dt3+ygD^JcY(&i(&IJun~zsA8fM9ifEfWZ0%iov2$&K0Uno|HZ~y=R literal 0 HcmV?d00001 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))