https://github.com/filipporanza/caesar_cipher
encrypt, decrypt and crack text file using Caesar Cipher
https://github.com/filipporanza/caesar_cipher
python3
Last synced: 6 months ago
JSON representation
encrypt, decrypt and crack text file using Caesar Cipher
- Host: GitHub
- URL: https://github.com/filipporanza/caesar_cipher
- Owner: FilippoRanza
- License: gpl-3.0
- Created: 2018-09-28T09:49:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T15:02:09.000Z (about 7 years ago)
- Last Synced: 2025-04-14T22:56:31.997Z (6 months ago)
- Topics: python3
- Language: Python
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# caesar_cipher
[](https://travis-ci.org/FilippoRanza/caesar_cipher)
encrypt, decrypt and crack text file using Caesar Cipher## Description
**caesar_cipher** encrypt *pure text* files usign [Caesar Cipher](https://en.wikipedia.org/wiki/Caesar_cipher).
**caesar_cipher** is also able to recover the key of an encrypted message using [frequency analysis](https://en.wikipedia.org/wiki/Frequency_analysis). By now only *Italian* and *English* are supported.#### ATTENTION
input must be made only of white spaces, new lines and letters, both upper and lower case.## Installation
This software requires *Python3*
Change directory to **caesar_cipher** repository and
```
[sudo] python[3] setup.py install
```root access is needed to preform an install.
## Usage
**caesar_cipher** has four commands. Only one can be used at a time. Each argument
has its specific options.```
caesar_cipher crypt | decrypt | crack | help [command_options...]
```### crypt
```
caesar_cipher crypt [ [-i INPUT_FILE] [-o OUTPUT_FILE] [-k KEY]| -h]
```
Encrypt INPUT_FILE, using KEY as key, writing output to OUTPUT_FILE.
If OUTPUT_FILE is omitted, output is wrote to INPUT_FILE.out.
If INPUT_FILE is omitted, *stdin* is read and the output is **always** *stdout* (OUTPUT_FILE is ignored).
if KEY is omitted **caesar_cipher** uses a key = 3.### decrypt
```
caesar_cipher decrypt [ [-i INPUT_FILE] [-o OUTPUT_FILE] [-k KEY]| -h]
```
Decrypt INPUT_FILE, using KEY as key, writing output to OUTPUT_FILE.
If OUTPUT_FILE is omitted, output is wrote to INPUT_FILE.out.
If INPUT_FILE is omitted, *stdin* is read and the output is **always** *stdout* (OUTPUT_FILE is ignored).
if KEY is omitted **caesar_cipher** uses a key = 3.### crack
```
caesar_cipher crack [ [-i INPUT_FILE] [-o OUTPUT_FILE] [-l LANG] | -a | -h]
```Recover the *key* used to encrypt INPUT_FILE, writing recovered message to OUTPUT_FILE. This command also write key and a *key ranking* to *stdout*. The
analysis is done using distribution for the given language LANG.If OUTPUT_FILE is omitted, output is wrote to INPUT_FILE.out.
If INPUT_FILE is omitted, *stdin* is read and the output is **always** *stdout* (OUTPUT_FILE is ignored).If LANG is omitted by default is used *English*.
If this command is run with *a* flag it will print all'available languages without trying to
recover anything.### help
```
caesar_cipher help
```Display an help message and exit.