O programa é capaz de codificar, decodificar e quebrar textos codificados com cifra vigenere.
O programa recebe os textos por STDIN, por conveniencia
podemos escrever os textos em um arquivo e pipar o texto com
o comando cat
. Podemos também rodar o programa escrever o
input e depois finalizar com o .
# exemplo_en.txt
regulating the circulation. whenever i
find myself growing grim about the mouth; whenever it is a damp,
drizzly november in my soul; whenever i find myself involuntarily
pausing before coffin warehouses, and bringing up the rear of every
funeral i meet; and especially whenever my hypos get such an upper
hand of me, that it requires a strong moral principle to prevent me
from deliberately stepping into the street, and methodically knocking
people's hats off--then, i account it high time to get to sea as soon
as i can. this is my substitute for pistol and ball. with a
philosophical flourish cato throws himself upon his sword; i quietly
take to the ship. there is nothing surprising in this. if they but
knew it, almost all men in their degree, some time or other, cherish
very nearly the same feelings towards the ocean with me.
Para encryptar.
cat exemplo_en.txt | python3 main.py encrypt arara
Para decryptar.
cat exemplo_en.txt | python3 main.py encrypt arara \
| python3 main.py decrypt arara
Para atacar portugues e inglês
cat exemplo_en.txt | python3 main.py encrypt arara \
| python3 main.py break
Para atacar ingles
cat exemplo_en.txt | python3 main.py encrypt arara \
| python3 main.py break en
Para atacar portugues
cat exemplo_pt.txt | python3 main.py encrypt arara \
| python3 main.py break pt