In “Scout” part of the scouting technique is to decrypt and encrypt messages, usually used in a game called “Mafeking Siege” or “Treasure hunt”.
In addition to Morse code, there are other codes in this library that are quite curious.
Cheer up and contribute more of your scout group's codes!
Handshake with left hand!
Be ready ⚜️
- 6+ Cipher Methods: Morse, Keyword, Reverse and more.
- Simple API: Intuitive classes for each cipher (
Morse()
,Murcielago()
, etc.). - MIT Licensed: Free for personal and commercial use.
pip install ScoutCipher
Common Morse code where each letter is separated by / and words by //.
from ScoutCipher import MorseCipher
cipher = MorseCipher()
encrypted_message = cipher.encrypt("Be ready") # Output: "-..././/.-././.-/-../-.--"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Be ready"
Just read each word backwards:
Example: “Be ready” using the code would be “eb ydaer”.
from ScoutCipher import ReverseCipher
cipher = ReverseCipher()
encrypted_message = cipher.encrypt("Scout") # Output: "tuocs"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"
We write the normal alphabet, and under it we write the keyword alphabet.
The key alphabet starts with the keyword without repeating letters
and then we write the normal alphabet omitting the letters of the keyword.
Example with the word “Batman” as the keyword:
Then, each letter of the normal alphabet corresponds to the letter of the coded alphabet below it.
Normal Alphabet: A B C D E F G H I J K L M N Ñ O P Q R S T U V W X Y Z
Code Alphabet: B A T M N C D E F G H I J K L Ñ O P Q R S U V W X Y Z
from ScoutCipher import KeywordCipher
cipher = KeywordCipher("batman")
encrypted_message = cipher.encrypt("Scout")# Output: "RTÑUS"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"
In this key, each letter of the key is translated by another letter, like this:
A FOR Z
B FOR Y
C FOR X
And so on.
Example:
A B C D E F G H I J K L M N Ñ O P Q R S T U V W X Y Z
Z Y X W V U T S R Q P O Ñ N M L K J I H G F E D C B A
from ScoutCipher import BackwardCipher
cipher = BackwardCipher()
encrypted_message = cipher.encrypt("Scout") # Output: "Hxlfg"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"
The grid is a 3x3 matrix of letters, and each letter is assigned a code based on its position in the matrix ("row-column" format).
It is a mostly visual code where a table is used to encrypt or decrypt the code.
║ ║
A B C ║ D E F ║ G H I
═══════╬═══════╬═══════
J K L ║ M N Ñ ║ O P Q
═══════╬═══════╬═══════
R S T ║ U V W ║ X Y Z
║ ║
Example: S is 3 in the row and 2 in the column
from ScoutCipher import GridCipher
cipher = GridCipher()
encrypted_message = cipher.encrypt("Scout") # Output: "32 13 27 34 33"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"
The word bat (“Murcielago” in Spanish) is used where each letter of the word is assigned a number.
The rest of the letters remain the same
M u r c i e l a g o
0 1 2 3 4 5 6 7 8 9
from ScoutCipher import MurcielagoCipher
cipher = MurcielagoCipher()
encrypted_message = cipher.encrypt("Scout") # Ouput: "s391t"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"
We welcome contributions to ScoutCipher! If you want to add more ciphers, fix bugs, or improve documentation, feel free to fork the repository and submit a pull request.
- Fork the project.
- Create a branch (git checkout -b feature/your-feature).
- Commit your changes (git commit -am 'Add new cipher').
- Push to the branch (git push origin feature/your-feature).
- Open a pull request.
This project is licensed under the MIT license. See the LICENSE file for more details.