~cedric/pyenigma

0e3956118442a01f65d7cbfb9beb130d67897635 — Cédric Bonhomme 1 year, 3 months ago 62c77a4
pyEnigma is now ready for use with poetry
8 files changed, 2 insertions(+), 331 deletions(-)

D CHANGELOG.rst
D MANIFEST.in
D Pipfile
D Pipfile.lock
D README.rst
M bin/enigma
D setup.cfg
D setup.py
D CHANGELOG.rst => CHANGELOG.rst +0 -19
@@ 1,19 0,0 @@
Release History
===============

0.2.1 (2018-12-01)
------------------

* dependencies upgraded for CVE-2018-18074;
* some useless code removed.


0.2 (2018-02-28)
----------------

* pyEnigma is ready for use with pipenv and pipsi.

0.1 (2017-03-15)
----------------

* first release on pypi.

D MANIFEST.in => MANIFEST.in +0 -7
@@ 1,7 0,0 @@
# binary files
recursive-include bin *

#Misc
include COPYING
include README.rst
include CHANGELOG.rst

D Pipfile => Pipfile +0 -19
@@ 1,19 0,0 @@
[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[requires]
python_version = "3.6"


[dev-packages]

"pep8" = "*"
coverage = "*"
coveralls = "*"


[packages]


D Pipfile.lock => Pipfile.lock +0 -115
@@ 1,115 0,0 @@
{
    "_meta": {
        "hash": {
            "sha256": "99a5558e67f65014d9d91cb7e9f452a2c6224c1a0da64265fd9806c0b4968fbd"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.6"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {
        "certifi": {
            "hashes": [
                "sha256:59b7658e26ca9c7339e00f8f4636cdfe59d34fa37b9b04f6f9e9926b3cece1a5",
                "sha256:b26104d6835d1f5e49452a26eb2ff87fe7090b89dfcaee5ea2212697e1e1d7ae"
            ],
            "version": "==2019.3.9"
        },
        "chardet": {
            "hashes": [
                "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
                "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
            ],
            "version": "==3.0.4"
        },
        "coverage": {
            "hashes": [
                "sha256:3684fabf6b87a369017756b551cef29e505cb155ddb892a7a29277b978da88b9",
                "sha256:39e088da9b284f1bd17c750ac672103779f7954ce6125fd4382134ac8d152d74",
                "sha256:3c205bc11cc4fcc57b761c2da73b9b72a59f8d5ca89979afb0c1c6f9e53c7390",
                "sha256:465ce53a8c0f3a7950dfb836438442f833cf6663d407f37d8c52fe7b6e56d7e8",
                "sha256:48020e343fc40f72a442c8a1334284620f81295256a6b6ca6d8aa1350c763bbe",
                "sha256:5296fc86ab612ec12394565c500b412a43b328b3907c0d14358950d06fd83baf",
                "sha256:5f61bed2f7d9b6a9ab935150a6b23d7f84b8055524e7be7715b6513f3328138e",
                "sha256:68a43a9f9f83693ce0414d17e019daee7ab3f7113a70c79a3dd4c2f704e4d741",
                "sha256:6b8033d47fe22506856fe450470ccb1d8ba1ffb8463494a15cfc96392a288c09",
                "sha256:7ad7536066b28863e5835e8cfeaa794b7fe352d99a8cded9f43d1161be8e9fbd",
                "sha256:7bacb89ccf4bedb30b277e96e4cc68cd1369ca6841bde7b005191b54d3dd1034",
                "sha256:839dc7c36501254e14331bcb98b27002aa415e4af7ea039d9009409b9d2d5420",
                "sha256:8f9a95b66969cdea53ec992ecea5406c5bd99c9221f539bca1e8406b200ae98c",
                "sha256:932c03d2d565f75961ba1d3cec41ddde00e162c5b46d03f7423edcb807734eab",
                "sha256:988529edadc49039d205e0aa6ce049c5ccda4acb2d6c3c5c550c17e8c02c05ba",
                "sha256:998d7e73548fe395eeb294495a04d38942edb66d1fa61eb70418871bc621227e",
                "sha256:9de60893fb447d1e797f6bf08fdf0dbcda0c1e34c1b06c92bd3a363c0ea8c609",
                "sha256:9e80d45d0c7fcee54e22771db7f1b0b126fb4a6c0a2e5afa72f66827207ff2f2",
                "sha256:a545a3dfe5082dc8e8c3eb7f8a2cf4f2870902ff1860bd99b6198cfd1f9d1f49",
                "sha256:a5d8f29e5ec661143621a8f4de51adfb300d7a476224156a39a392254f70687b",
                "sha256:aca06bfba4759bbdb09bf52ebb15ae20268ee1f6747417837926fae990ebc41d",
                "sha256:bb23b7a6fd666e551a3094ab896a57809e010059540ad20acbeec03a154224ce",
                "sha256:bfd1d0ae7e292105f29d7deaa9d8f2916ed8553ab9d5f39ec65bcf5deadff3f9",
                "sha256:c62ca0a38958f541a73cf86acdab020c2091631c137bd359c4f5bddde7b75fd4",
                "sha256:c709d8bda72cf4cd348ccec2a4881f2c5848fd72903c185f363d361b2737f773",
                "sha256:c968a6aa7e0b56ecbd28531ddf439c2ec103610d3e2bf3b75b813304f8cb7723",
                "sha256:df785d8cb80539d0b55fd47183264b7002077859028dfe3070cf6359bf8b2d9c",
                "sha256:f406628ca51e0ae90ae76ea8398677a921b36f0bd71aab2099dfed08abd0322f",
                "sha256:f46087bbd95ebae244a0eda01a618aff11ec7a069b15a3ef8f6b520db523dcf1",
                "sha256:f8019c5279eb32360ca03e9fac40a12667715546eed5c5eb59eb381f2f501260",
                "sha256:fc5f4d209733750afd2714e9109816a29500718b32dd9a5db01c0cb3a019b96a"
            ],
            "index": "pypi",
            "version": "==4.5.3"
        },
        "coveralls": {
            "hashes": [
                "sha256:baa26648430d5c2225ab12d7e2067f75597a4b967034bba7e3d5ab7501d207a1",
                "sha256:ff9b7823b15070f26f654837bb02a201d006baaf2083e0514ffd3b34a3ffed81"
            ],
            "index": "pypi",
            "version": "==1.7.0"
        },
        "docopt": {
            "hashes": [
                "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
            ],
            "version": "==0.6.2"
        },
        "idna": {
            "hashes": [
                "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
                "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
            ],
            "version": "==2.8"
        },
        "pep8": {
            "hashes": [
                "sha256:b22cfae5db09833bb9bd7c8463b53e1a9c9b39f12e304a8d0bba729c501827ee",
                "sha256:fe249b52e20498e59e0b5c5256aa52ee99fc295b26ec9eaa85776ffdb9fe6374"
            ],
            "index": "pypi",
            "version": "==1.7.1"
        },
        "requests": {
            "hashes": [
                "sha256:502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e",
                "sha256:7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b"
            ],
            "version": "==2.21.0"
        },
        "urllib3": {
            "hashes": [
                "sha256:4c291ca23bbb55c76518905869ef34bdd5f0e46af7afe6861e8375643ffee1a0",
                "sha256:9a247273df709c4fedb38c711e44292304f73f39ab01beda9f6b9fc375669ac3"
            ],
            "version": "==1.24.2"
        }
    }
}

D README.rst => README.rst +0 -114
@@ 1,114 0,0 @@
pyEnigma
========

.. image:: https://img.shields.io/pypi/pyversions/pyenigma.svg?style=flat-square
    :target: https://pypi.python.org/pypi/pyenigma

.. image:: https://img.shields.io/pypi/v/pyenigma.svg?style=flat-square
    :target: https://github.com/cedricbonhomme/pyenigma/releases/latest

.. image:: https://img.shields.io/pypi/l/pyenigma.svg?style=flat-square
    :target: https://www.gnu.org/licenses/gpl-3.0.html

.. image:: https://img.shields.io/travis/cedricbonhomme/pyEnigma/master.svg?style=flat-square
    :target: https://travis-ci.org/cedricbonhomme/pyEnigma

.. image:: https://img.shields.io/coveralls/cedricbonhomme/pyEnigma/master.svg?style=flat-square
   :target: https://coveralls.io/github/cedricbonhomme/pyEnigma?branch=master


`pyEnigma <https://github.com/cedricbonhomme/pyEnigma>`_, a  Python Enigma
cypher machine simulator.


Usage
-----

As a Python library
'''''''''''''''''''

.. code:: bash

    $ pipenv install pyenigma
    ✨ 🐍✨


.. code:: python

    Python 3.6.4 (default, Feb 23 2018, 13:45:58)
    [GCC 7.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from pyenigma import enigma
    >>> from pyenigma import rotor
    >>> print(rotor.ROTOR_GR_III)

        Name: III
        Model: German Railway (Rocket)
        Date: 7 February 1941
        Wiring: JVIUBHTCDYAKEQZPOSGXNRMWFL
    >>>
    >>> engine = enigma.Enigma(rotor.ROTOR_Reflector_A, rotor.ROTOR_I,
                                    rotor.ROTOR_II, rotor.ROTOR_III, key="ABC",
                                    plugs="AV BS CG DL FU HZ IN KM OW RX")
    >>> print(engine)

        Reflector:
        Name: Reflector A
        Model: None
        Date: None
        Wiring: EJMZALYXVBWFCRQUONTSPIKHGD

        Rotor 1:
        Name: I
        Model: Enigma 1
        Date: 1930
        Wiring: EKMFLGDQVZNTOWYHXUSPAIBRCJ
        State: A

        Rotor 2:
        Name: II
        Model: Enigma 1
        Date: 1930
        Wiring: AJDKSIRUXBLHWTMCQGZNPYFVOE
        State: B

        Rotor 3:
        Name: III
        Model: Enigma 1
        Date: 1930
        Wiring: BDFHJLCPRTXVZNYEIWGAKMUSQO
        State: C
    >>> secret = engine.encipher("Hello World")
    >>> print(secret)
    Qgqop Vwoxn


As a program
''''''''''''

.. code:: bash

    $ pipsi install pyenigma
    ✨ 🍰✨


.. code:: bash

    $ echo "Hello World" | enigma ABC A  I II III "AV BS CG DL FU HZ IN KM OW RX"
    Qgqop Vwoxn

    $ echo "Qgqop Vwoxn" | enigma ABC A  I II III "AV BS CG DL FU HZ IN KM OW RX"
    Hello World


License
-------

pyEnigma is under `GPLv3 <http://www.gnu.org/licenses/gpl-3.0.txt>`_ license.


Author
------

* `Christophe Goessen <https://github.com/cgoessen>`_ (initial author)
* `Cédric Bonhomme <https://www.cedricbonhomme.org>`_

M bin/enigma => bin/enigma +2 -1
@@ 16,7 16,8 @@ def usage():
    print('\t$ echo "Hello World" | enigma ABC A  I II III "AV BS CG DL FU HZ IN KM OW RX"')
    print("\tImweq Ltzda")

if __name__ == "__main__":

def main():
    # Point of entry in execution mode
    try:
        key = sys.argv[1]

D setup.cfg => setup.cfg +0 -2
@@ 1,2 0,0 @@
[metadata]
description-file = README.rst

D setup.py => setup.py +0 -54
@@ 1,54 0,0 @@
#!/usr/bin/env python
#-*- coding: utf-8 -*-

import os
import sys

import pyenigma

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

packages = [
    'pyenigma'
]

scripts = [
    'bin/enigma'
]

requires = []

with open('README.rst', 'r') as f:
    readme = f.read()
with open('CHANGELOG.rst', 'r') as f:
    changelog = f.read()

setup(
    name='pyEnigma',
    version=pyenigma.__version__,
    description='Python Enigma cypher machine simulator.',
    long_description=readme + '\n\n' + changelog,
    author='Christophe Goessen, Cédric Bonhomme',
    author_email='cedric@cedricbonhomme.org',
    url='https://github.com/cedricbonhomme/pyEnigma',
    packages=packages,
    package_dir={'pyenigma': 'pyenigma'},
    include_package_data=True,
    scripts=scripts,
    install_requires=requires,
    license='GPLv3',
    zip_safe=False,
    classifiers=(
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'Topic :: Security',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3.6',
        'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)'
    ),
)