HideToSee

This commit is contained in:
Maxime Vorwerk
2024-07-07 13:01:07 +02:00
parent 150f2f382f
commit 34efed2553
3 changed files with 21 additions and 0 deletions

BIN
hide_to_see/atbash.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -0,0 +1 @@
krxlXGU{zgyzhs_xizxp_zx751vx6}

20
hide_to_see/sol.py Executable file
View File

@@ -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)