Author: Felix Tang
-
Decryption of Caesar Cipher using Dictionary-Based Approach
By evaluating all 25 decrypted messages, we can identify the correct one by examining its resemblance to English text rather than mere random gibberish. Unix/Linux systems come with a dictionary file. I am using Ubuntu and the dictionary locates at /usr/share/dict/cracklib-small, which contains an extensive collection (54763 words) of English words. To facilitate the process, a… Read more
-
Caesar cipher by Bash scripts
The Caesar Cipher, used by Julius Caesar around 58 BC, is a substitution cipher that shifts letters in a message to make it unreadable if intercepted. To decrypt, the receiver reverses the shift. To encrypt or decrypt text using the tr (translate) command in Bash, you can define a mapping of characters to new characters and apply it… Read more
-
Useful Bash Scripts
Prompt the user to press the Enter key before proceeding with the script execution. Check if a variable is empty Transform any uppercase letters in the input word to their corresponding lowercase letters. # hello world Assign the current date to the variable date in the format “YYYYMMDD”. Find string length Extract substring Detailed explanation: # April Find and… Read more