From 8f86bd9c5f444fb9dbe4301aeba8d28e38b6cc00 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 2 Sep 2024 23:03:40 +0200 Subject: [PATCH] crypto/transposition_trial --- crypto/transposition_trial/message.txt | 1 + crypto/transposition_trial/solve.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 crypto/transposition_trial/message.txt create mode 100755 crypto/transposition_trial/solve.py diff --git a/crypto/transposition_trial/message.txt b/crypto/transposition_trial/message.txt new file mode 100644 index 0000000..9d591b8 --- /dev/null +++ b/crypto/transposition_trial/message.txt @@ -0,0 +1 @@ +heTfl g as iicpCTo{7F4NRP051N5_16_35P3X51N3_V9AAB1F8}7 \ No newline at end of file diff --git a/crypto/transposition_trial/solve.py b/crypto/transposition_trial/solve.py new file mode 100755 index 0000000..91cc6e3 --- /dev/null +++ b/crypto/transposition_trial/solve.py @@ -0,0 +1,13 @@ +#!/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() \ No newline at end of file