-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
83 lines (73 loc) · 2.58 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
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
import encode
import decode
import hashing
import hashcracker
import symetric
import asymetric
def encode_decode():
print("1: Message encoding ")
print("2: Message Decoding ")
print("3: Return ")
while True:
choix_1 = int(input("please type your choice : "))
try:
if choix_1 in [1, 2, 3]:
if choix_1 == 1:
encode.encodeing()
break
if choix_1 == 2:
decode.decoding()
break
elif choix_1 == 3:
menu()
break
else:
print("Please provide integer between 1 and 3")
except ValueError:
print("Please provide integer")
break
def menu():
print(
" ##### ###### \n"
"# ##### # # ##### ##### #### # # #### # # \n"
"# # # # # # # # # # # # # # # # \n"
"# # # # # # # # # ###### # # ## \n"
"# ##### # ##### # # # # # # # ## \n"
" # # # # # # # # # # # # # # \n"
" #### # # # # # #### ###### #### # # \n"
)
print("1: Message encoding /decoding ")
print("2: Hashing ")
print("3: Cracking Hashs ")
print("4: Symetric encryption / decryption ")
print("5: Asymetric encryption / decryption ")
print("6: Quit ")
while True:
choix = int(input("Donner votre choix : "))
try:
if choix in [1, 2, 3, 4, 5]:
if choix == 1:
encode_decode()
break
elif choix == 2:
hashing.hashing()
break
elif choix == 3:
hashcracker.hash_cracking_menu()
break
elif choix == 4:
symetric.menu_symetric()
break
elif choix == 5:
asymetric.menu_asymetric()
break
elif choix == 6:
print("Goodbye ")
pass
break
else:
print("Please provide integer between 1 and 6")
except ValueError:
print("Please provide integer")
break
# menu()