-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.py
58 lines (43 loc) · 1.41 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
__author__ = 'vdata'
from Extracting import *
from Embedding import *
from Omega import *
import time
def Main():
chars = [
'a', 'b', ',', 'c', 'd', 'e', '!', 'f',
'g', 'h', 'i', 'j', '/', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', '.', 't',
'u', '$', 'v', 'w', 'x', 'y', 'z', '?'
]
omega = Omega()
counter = 0
i = 0
SecChar = SecChar1 = ""
EM = Embedding()
SecretMssg = raw_input("Please Enter Your Secret Message: ")
print("Message Length: "+ str(len(SecretMssg)))
#EM.GenCoverMsg(SecretMssg)
FinalCover = EM.Embed(SecretMssg)
print "--------------------------- "
print FinalCover
print "Extracting Process: "
CoverMsg = raw_input("Please Enter The Cover MSG: ")
EX = Extracting()
timer = time.time()
EX.Extract_Key(CoverMsg)
print "Timer : " + str(time.time() - timer)
EX.Extract_Secret_Chars()
''' for i in range(len(chars)):
SecChar = chars[i]
print(SecChar + "\n")
char1, char2 = omega.FindCoverChars(SecChar)
print("Char1: " + char1 + " " + "Char2: " + char2 + "\n")
SecChar1 = omega.FindSecChar(char1, char2)
print("Original Char: " + SecChar1)
if SecChar == SecChar1:
counter += 1
print("Counter " + str(counter))
'''
if __name__ == "__main__":
Main()