mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-26 01:36:17 -04:00
Add MultiBombe
Runs the Bombe multiple times with different rotor specs. Edits the core BombeMachine a little to add the ability to switch rotors without rewiring everything
This commit is contained in:
parent
8c757d1e03
commit
3eb44708e5
7 changed files with 411 additions and 13 deletions
|
@ -85,7 +85,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "Bombe: 4 rotor",
|
||||
input: "LUOXGJSHGEDSRDOQQX",
|
||||
expectedMatch: /LHSC \(plugboard: SS\)/,
|
||||
expectedMatch: /LHSC \(plugboard: SS\): HHHSSSGQUUQPKSEKWK/,
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bombe",
|
||||
|
|
47
tests/operations/tests/MultipleBombe.mjs
Normal file
47
tests/operations/tests/MultipleBombe.mjs
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Bombe machine tests.
|
||||
* @author s2224834
|
||||
* @copyright Crown Copyright 2019
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "Multi-Bombe: 3 rotor",
|
||||
input: "BBYFLTHHYIJQAYBBYS",
|
||||
expectedMatch: /LGA \(plugboard: SS\): VFISUSGTKSTMPSUNAK/,
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Multiple Bombe",
|
||||
"args": [
|
||||
// I, II and III
|
||||
"User defined", "EKMFLGDQVZNTOWYHXUSPAIBRCJ<R\nAJDKSIRUXBLHWTMCQGZNPYFVOE<F\nBDFHJLCPRTXVZNYEIWGAKMUSQO<W",
|
||||
"User defined", "",
|
||||
"User defined", "AY BR CU DH EQ FS GL IP JX KN MO TZ VW", // B
|
||||
"THISISATESTMESSAGE", 0,
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
/*
|
||||
* This is too slow to run regularly
|
||||
{
|
||||
name: "Multi-Bombe: 4 rotor",
|
||||
input: "LUOXGJSHGEDSRDOQQX",
|
||||
expectedMatch: /LHSC \(plugboard: SS\): HHHSSSGQUUQPKSEKWK/,
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Multiple Bombe",
|
||||
"args": [
|
||||
// I, II and III
|
||||
"User defined", "EKMFLGDQVZNTOWYHXUSPAIBRCJ<R\nAJDKSIRUXBLHWTMCQGZNPYFVOE<F\nBDFHJLCPRTXVZNYEIWGAKMUSQO<W",
|
||||
"User defined", "LEYJVCNIXWPBQMDRTAKZGFUHOS", // Beta
|
||||
"User defined", "AE BN CK DQ FU GY HW IJ LO MP RX SZ TV", // B thin
|
||||
"THISISATESTMESSAGE", 0,
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
*/
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue