https://github.com/mauricelambert/viginerebreaker
This package implements a viginere breaker.
https://github.com/mauricelambert/viginerebreaker
attack-statistic cipher-breaker pypi-package python3 viginere
Last synced: 4 months ago
JSON representation
This package implements a viginere breaker.
- Host: GitHub
- URL: https://github.com/mauricelambert/viginerebreaker
- Owner: mauricelambert
- License: gpl-3.0
- Created: 2021-11-09T07:32:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-10T08:21:36.000Z (over 2 years ago)
- Last Synced: 2025-01-14T09:14:44.752Z (5 months ago)
- Topics: attack-statistic, cipher-breaker, pypi-package, python3, viginere
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

# ViginereBreaker
## Description
This package implements a viginere breaker.
## Requirements
This package require :
- python3
- python3 Standard Library## Installation
```bash
pip install ViginereBreaker
```## Usages
### Command line
#### Module
```bash
python3 -m ViginereBreaker cipher.txt
```#### Python executable
```bash
python3 ViginereBreaker.pyz cipher.txt
```#### Command
##### Basic
```bash
ViginereBreaker cipher.txt
ViginereBreaker cipher.txt -k 4 -a "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -s "{\"E\":10,\"A\":7}"
```### Python script
```python
from ViginereBreaker import ViginereBreaker
from codecs import encodetext=encode("""
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
antidisestablishmentarianism
counterimmunoelectrophoresis
oesophagogastroduodenoscopy
ethylenediaminetetraacetate
hexadecyltrimethylammonium
diisopropylfluorophosphate
ethylenediaminetetraacetic
uvulopalatopharyngoplasty
great-great-granddaughter
styrene-butadiene-styrene
cholangiopancreatography
tetracyanoquinodimethane
oligodeoxyribonucleotide
phosphatidylethanolamine
proto-industrialization
hypergammaglobulinaemia
politico-administrative
intracerebroventricular
pancreaticoduodenectomy
electro-encephalography
electroencephalographic
polytetrafluoroethylene
lysophosphatidylcholine
first-come-first-served
""", 'rot_13').upper() # rot_13 -> key="N"breaker = ViginereBreaker(text, statistics={"E": 11, "A": 9})
print(breaker.breaker())# {1: [['N']], 2: [['N'], ['N']], 4: [['N'], ['N'], ['N'], ['N']]}
# ViginereBreaker try to find a key with multiple key lengths
# The ciphertext with the key 'N' or 'NN' or 'NNNN' is identical
```## Example
Using CustomCrypto:
- [test_viginere_breaker.py](https://github.com/mauricelambert/ViginereBreaker/blob/main/test_viginere_breaker.py)
- [text.txt](https://github.com/mauricelambert/ViginereBreaker/blob/main/text.txt)
- [cipher.txt](https://github.com/mauricelambert/ViginereBreaker/blob/main/cipher.txt)## Links
- [Github Page](https://github.com/mauricelambert/ViginereBreaker/)
- [Documentation](https://mauricelambert.github.io/info/python/security/ViginereBreaker.html)
- [Pypi package](https://pypi.org/project/ViginereBreaker/)
- [Executable](https://mauricelambert.github.io/info/python/security/ViginereBreaker.pyz)## Licence
Licensed under the [GPL, version 3](https://www.gnu.org/licenses/).