the-lambda-way / bruteforce-enigma Goto Github PK
View Code? Open in Web Editor NEWA tool for cracking and bruteforcing Enigma ciphers.
License: MIT License
A tool for cracking and bruteforcing Enigma ciphers.
License: MIT License
[crxunch@mac] bruteforce-enigma % make crack_enigma
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
Building build/bruteforce.o .../usr/bin/time: illegal option -- -
usage: time [-al] [-h | -p] [-o file] utility [argument ...]
make: *** [build/bruteforce.o] Error 1
process_begin: CreateProcess(NULL, g++ -std=c++20 -pthread -Iinclude/ -Iexternal/ -MM include/bruteforce-enigma.h, ...) failed.
process_begin: CreateProcess(NULL, g++ -std=c++20 -pthread -Iinclude/ -Iexternal/ -MM include/bruteforce-enigma.h, ...) failed.
File not found - TESTS/
File not found - -NAME
process_begin: CreateProcess(NULL, g++ -std=c++20 -pthread -Iinclude/ -Iexternal/ -MM include/bruteforce-enigma.h, ...) failed.
process_begin: CreateProcess(NULL, g++ -std=c++20 -pthread -Iinclude/ -Iexternal/ -MM include/bruteforce-enigma.h, ...) failed.
process_begin: CreateProcess(NULL, g++ -std=c++20 -pthread -Iinclude/ -Iexternal/ -MM include/bruteforce-enigma.h, ...) failed.
process_begin: CreateProcess(NULL, g++ -std=c++20 -pthread -Iinclude/ -Iexternal/ -MM include/bruteforce-enigma.h, ...) failed.
'printf' is not recognized as an internal or external command,
operable program or batch file.
make: *** [crack_enigma] Error 1
It should be made more clear in the README that to solve for unknown rotors including VI, VII, and VIII, kriegsmarine_model
should be passed to smart_decipher/bruteforce_decipher instead of m3_model
. I was under the impression that m3_model
would have contained the extra rotors, based on some other tools.
Hello .... on Linux Debian it cracking really fast but only with the given "plug" and given "rotors" ....
is there a way to rewrite your code to crack this one: https://github.com/Smiril/Kortin-Enigma.git
the given Cyper "FTMW" is translated to "THAT" with plug "AT ME"
should be "TEST" and not "THAT" ... yes there are differences in rotors and this "MSG" is from an 5 rotor ...
means 5 order (1-9), 5 rings (A-Z), 5 pos(A-Z) , 1 reflector 26(A-Z)once , 1 notch 5(A-Z)once , 1 plug 10(A-Z)once
translated: 5 ROTORS(5x26LETTERS), 5 WHEEL(5x1-9), 5 START(5xA-Z), 5 RINGS (5xA-Z), 1 REFLECTOR(26LETTERS), 1 NOTCH(5LETTERS), 1 PLUG(10LETTERS)
the Turing Code is also different from your code in my version ...
your output below ...
Breaking enigma...
# Score Refl Rotor Order Ring Pos Rotor Pos Text
1 -2.574637 UKWC IV IV IV 5 0 0 4 9 23 THAT
2 -2.574637 UKWC IV IV IV 3 0 0 2 9 23 THAT
3 -2.574637 UKWC IV IV IV 4 0 0 3 9 23 THAT
4 -2.574637 UKWC IV IV IV 6 0 0 5 9 23 THAT
5 -2.574637 UKWC IV IV IV 1 0 0 0 9 23 THAT
6 -2.574637 UKWC IV IV IV 11 0 0 10 9 23 THAT
7 -2.574637 UKWC IV IV IV 12 0 0 11 9 23 THAT
8 -2.574637 UKWC I I II 0 8 0 14 3 13 THAT
9 -2.574637 UKWC I I II 0 7 0 14 2 13 THAT
10 -2.574637 UKWC I I II 0 6 0 14 1 13 THAT
Elapsed time: 0.16 seconds
E.g. there is encrypted text and plugboard. I have successfully decrypted the text:
# Score Refl Rotor Order Ring Pos Rotor Pos Text
1 -130.689911 UKWB V II III 3 1 0 25 4 21 SOMEDECRYPTEDTEXT
But I'm unable to decrypt that same text in online enigma simulators using listed settings.
0
mean? All ring pos in simulators start with 1
. Are ring and rotor pos have 0
-based indexes?may is this machine specific or code specific?
`clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
Building build/bruteforce.o .../bin/sh: -f: command not found
real 0m0.002s
user 0m0.000s
sys 0m0.001s
make: *** [build/bruteforce.o] Error 127`
hello ... the fork from /bin/sh -f
is simply in dir this by .
is simply in dir parent by ..
and then fork /bin/sh
this means .../bin/sh -f
had a dir /Users/USERNAME/github/bruteforce-enigma
in linux /home/USERNAME/github/bruteforce-enigma
in folder GitHub is no folder bin with binary sh
In the Readme.md, section Cracking unknown ring and rotor positions, there's a code
EnigmaBase base {ETW_ABCDEF, m3_IV, m3_V, m3_II, UKWB};
HighScores scores = smart_decipher(base, plug, ct);
But UKWB
is undefined. It seems m3_UKVB
should be used instead. And when compiling, I get the following errors:
.../include/bruteforce-enigma.h:352:66: error: no matching function for call to 'smart_decipher_positions<std::vector<int, std::allocator<int> >, 10, double (*)(const std::vector<int, std::allocator<int> >&)>(const basic_enigma_base<EnigmaKey>&, const Plugboard&, const std::vector<int>&, double (*&)(const std::vector<int>&))'
...
.../include/bruteforce-enigma.h:354:7: error: could not convert '{ct, <expression error>}' from '<brace-enclosed initializer list>' to 'HighScores<10, EnigmaKey>'
I'm compiling under Windows with TDM-GCC-64 (g++ v10.3.0). Sorry, I'm almost total zero in C++. What should I do to fix errors?
what should be the method used to decipher a ciphertext only (no plug,rotor,ring known) + I tried some of the functions got the rotos I, IV, III while i used a python script to bruteforce rotors using IOC and got III,IV,I, what is the order of the rotor output by the tool ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.