diff --git a/hide_to_see/atbash.jpg b/hide_to_see/atbash.jpg new file mode 100755 index 0000000..7559242 Binary files /dev/null and b/hide_to_see/atbash.jpg differ diff --git a/hide_to_see/encrypted.txt b/hide_to_see/encrypted.txt new file mode 100644 index 0000000..474f463 --- /dev/null +++ b/hide_to_see/encrypted.txt @@ -0,0 +1 @@ +krxlXGU{zgyzhs_xizxp_zx751vx6} diff --git a/hide_to_see/sol.py b/hide_to_see/sol.py new file mode 100755 index 0000000..d7288bb --- /dev/null +++ b/hide_to_see/sol.py @@ -0,0 +1,20 @@ +#!/home/maxime/.pyvenv/bin/python3 + +def decode(char): + char = ord(char) + a = ord('a') + z = ord('z') + A = ord('A') + Z = ord('Z') + + if a <= char and char <= z: + return chr(z - (char - a)) + if A <= char and char <= Z: + return chr(Z - (char - A)) + return chr(char) + +with open("encrypted.txt", 'r') as f: + text = f.read() + dec = ''.join(map(decode, text)) + print(dec) +