-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenigma.txt
196 lines (143 loc) · 6.46 KB
/
enigma.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
==============================================================================
The list of outputs produced by my program - James Marsh:
==============================================================================
Please note all tests are commented out in the main method. Uncomment for testing.
OUTPUTS FOR SPECIFIED TESTS:
================================================
Test One: BADGER
Test Two: SNAKE
Test Three: THEQUICKBROWNFOXJUMPEDOVERTHELAZYDOG
================================================
OUTPUTS FOR SPECIFIED CHALLENGES:
=============================================================================================================================================
Challenge One (Note this answer includes all incoherent strings as well as the correct string, the Bombe could only look for a correct answer
and would require a human to choose the most sensible solution):
HUMAN SPECIFIED ANSWER:
Found: DAISYDAISYGIVEMEYOURANSWERDO
Plug end one: D & plug end two: T
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
ALL COMPUTED ANSWERS CONTAINING KEYWORD:
Found: TSISYTASSYGIVEMFYOURANSWERTO
Plug end one: D & plug end two: B
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVEMEYOUMANSWERTO
Plug end one: D & plug end two: C
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVEMEYOURANSWERTO
Plug end one: D & plug end two: D
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYDIVEMEYOURANSWERTO
Plug end one: D & plug end two: G
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVEMEYOURANSWERTO
Plug end one: D & plug end two: H
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TADSYTADSYGDVEMEYOURANSWERTS
Plug end one: D & plug end two: I
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVEMEYOURANSWERTO
Plug end one: D & plug end two: K
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVEMEYOTRANSWERTO
Plug end one: D & plug end two: L
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVEDEYOURANSWERTO
Plug end one: D & plug end two: M
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVESEYDURANSWERTD
Plug end one: D & plug end two: O
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: DAISYDAISYGIVEMEYOURANSWERDO
Plug end one: D & plug end two: T
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVNMEYODRANSWERTO
Plug end one: D & plug end two: U
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYIAISYGBDEMEYOURANSWERTO
Plug end one: D & plug end two: V
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TAISYTAISYGIVEMESOURANSWERTO
Plug end one: D & plug end two: X
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Found: TATSYTAISYGIVEMEYOURANSWERTO
Plug end one: D & plug end two: Z
Plug end one: S & plug end two: A
Rotor position: 8 & Rotor Type: IV
Rotor position: 4 & Rotor Type: III
Rotor position: 21 & Rotor Type: II
Challenge Two:
Found: WELLALWAYSBETOGETHERHOWEVERFARITSEEMSWELLALWAYSBETOGETHERTOGETHERINELECTRICDREAMS
Plug end one: H & plug end two: L
Plug end one: G & plug end two: P
Rotor position: 3 & Rotor Type: V
Rotor position: 9 & Rotor Type: III
Rotor position: 15 & Rotor Type: II
Challenge Three:
Found: WELLALWAYSBETOGETHERHOWEVERFARITSEEMSWELLALWAYSBETOGETHERTOGETHERINELECTRICDREAMS
Plug end one: H & plug end two: L
Plug end one: G & plug end two: P
Rotor position: 3 & Rotor Type: V
Rotor position: 9 & Rotor Type: III
Rotor position: 15 & Rotor Type: II
=============================================================================================================================================
EXTENSIONS INSTRUCTIONS
=============================================================================================================================================
The tasks I completed were:
- Example extension one (extend your machine to allow a user to type a message a key at a time and have a
translation of the key appear in the command line.)
- Example extension two (You could add a command line interface you your machine to allow the user to specify the plugs in
the machine and the type and initial positions of the rotors.) In addition to this I also added extensive
error checking and validation as well as implementing the extension one inside extension two so users can
key by key encode using their defined enigma machine.
//////////////////////////////////////////////////////////////////////////////////////////////////////////
For both extensions you may wish follow the on screen prompts to navigate the solution.
@@ INFORMATION THAT YOU ARE NOT PROMPTED WITH @@
NOTE: THE POSSIABLE VALID INPUTS FOR ROTOR INCLUDE = "I", "II", "III", "IV", "V" (not case sensitive)!
NOTE: THE POSSIABLE VALID INPUTS FOR REFLECTOR INCLUDE = "REFLECTORI", "REFLECTORII" (not case sensitive)!
//////////////////////////////////////////////////////////////////////////////////////////////////////////
=============================================================================================================================================