Git Product home page Git Product logo

enigma's People

Contributors

gremmie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

enigma's Issues

Test cases not working in command line or with key files

Hi. I can run your test program (in Python) fine:

[kipingram@lenovo]$ python test
BLA
THEXRUSSIANSXAREXCOMINGX

I modified it to print message key - that's the BLA above. As you see, the plaintext emerges.

But, when I try to use the command line utility as follows, it fails:

[kipingram@lenovo]$ ./pyenigma.py -r II IV V -u B -i 1 20 11 -p AV BS CG DL FU HZ IN KM OW RX -s WXC -t KCH
JRA

I've stared at the test program until I'm blue in the face, and as far as I can tell I've properly carried the settings over to the command line.

Any thoughts? I did this with a key file as well, and got JRA there too.

Here is the key "settings" part of the test python:

machine = EnigmaMachine.from_key_sheet(
       rotors='II IV V',
       reflector='B',
       ring_settings=[1, 20, 11],
       plugboard_settings='AV BS CG DL FU HZ IN KM OW RX')

# set machine initial starting position
machine.set_display('WXC')

# decrypt the message key
msg_key = machine.process_text('KCH')

Also, I modified the provided little keys.txt file so that today (the 10th) was one of the lines, and I tried to put in the same settings as above:

10 II IV V 1 20 11 AV BS CG DL FU HZ IN KM OW RX B
30 Beta II IV I A A A V 1/20 2/12 4/6 7/10 8/13 14/23 15/16 17/25 18/26 22/24 B-Thin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.