picoctf/crypto/transposition_trial/solve.py

13 lines
275 B
Python
Raw Normal View History

2024-09-02 23:03:40 +02:00
#!/usr/bin/env python3
with open('message.txt', 'r') as f:
content = f.read().strip()
def chunks(l, n):
for i in range(0, len(l), n):
yield l[i:i + n]
if __name__ == '__main__':
for x, y, z in chunks(content, 3):
print(f'{z}{x}{y}', end='')
print()