Skip to content
A little python script that encodes and decodes a text by replacing spaces with random numbers and applies rot13 to the letters. πŸ“œ
Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENCE
README.md
sepyrot.py

README.md

sepyrot

A little python script that encodes and decodes a text by replacing spaces with random numbers, applies rot13 to the letters and replace the second of doubled letters with a "+".

Requirements

Python β‰₯ 3.0

Usages :

Works with simple text...

# Encode a short message
$ ./sepyrot.py --encode "Hello I am a message"
Ury+b2V4nz8n9zrf+ntr

# Decode a short message
$ ./sepyrot.py --decode "Ury+b2V4nz8n9zrf+ntr"
Hello I am a message

...And with files as well

# Encode a text file (which works with multiple lines indeed)
$ ./sepyrot.py --encode "$(cat textfile.txt)" > encoded_textfile.txt

# Decode an encoded text file
$ ./sepyrot.py --decode "$(cat encoded_textfile.txt)" > decoded_textfile.txt

Tips

  • You can also use -e and -d instead of --encode and --decode

Issues :

  • Special characters make the script crash with Python < 3. With Python 3 they are just not rot13 encoded and stay clear in the encoded message
  • Cannot encode/decode messages that include numbers, it'll replace them with spaces in decoded message
You can’t perform that action at this time.