-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
48 lines (26 loc) · 1.04 KB
/
main.py
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
"""
there is an encode decode interface, basically a super class crypto.
Then there are subclasses for all different used ciphers
There there is a function in each subclass that return informations about
For every decode solution run a tokenize
then try to find english words in tokenized sentence
if there is a good match, offer that as solution
"""
"""
all cipher do inherit from super class cipher, that is were you want to start
ceaser cipher is commented in order to show how cipher.solve should work
"""
import solver
# TODO: in the end there will be one big scheduler that will take all the cipher classes and mix them in possible uses and test sentence as long as it did not find solution
def loadTask():
global sentences
sentences = open("twoTabOut.txt").read().splitlines()
while '' in sentences:
sentences.remove('')
def main():
# load sentences that you want to decrypt
loadTask()
solv = solver.Solver()
solv.solve(sentences)
if __name__ == "__main__":
main()