-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
217 lines (192 loc) · 7.34 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
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
import os, pyfiglet
import sys
from colorama import Fore
import random
black = '\033[30m'
red = '\033[31m'
green = '\033[32m'
orange = '\033[33m'
blue = '\033[34m'
purple = '\033[35m'
cyan = '\033[36m'
lightgrey = '\033[37m'
darkgrey = '\033[90m'
lightred = '\033[91m'
lightgreen = '\033[92m'
yellow = '\033[93m'
lightblue = '\033[94m'
pink = '\033[95m'
lightcyan = '\033[96m'
all_col = [red, green, orange, cyan, lightred, lightgreen, yellow, lightcyan,lightblue,pink]
ran = random.choice(all_col)
def banner():
os.system("clear")
en = pyfiglet.figlet_format("Black\nEncryptor\n")
print(ran, en)
print(ran + "\n\n\tV_3.0\t\n")
print("\n\n")
print(Fore.CYAN, "- " * 4, " [+] Follow me on Instagram @saadkhan041 ", "- " * 4)
print(Fore.LIGHTYELLOW_EX, "\n", "- " * 4, " [+] Follow me on Instagram @coding_memz ", "- " * 4)
print(Fore.LIGHTRED_EX, "\n", "- " * 4, "[+] Github: https://github.com/Saadkhan041/ ", "- " * 3)
banner()
def encrypt():
text = input(ran + "\nEnter the text to Encrypt: ")
text = text.replace("A", "Ç")
text = text.replace("a", "ü")
text = text.replace("B", "é")
text = text.replace("b", "â")
text = text.replace("C", "ä")
text = text.replace("c", "ç")
text = text.replace("D", "à")
text = text.replace("d", "å")
text = text.replace("E", "ý")
text = text.replace("e", "ø")
text = text.replace("F", "•")
text = text.replace("f", "þ")
text = text.replace("G", "Ú")
text = text.replace("g", "Ý")
text = text.replace("H", "Þ")
text = text.replace("h", "Ã")
text = text.replace("I", "Û")
text = text.replace("i", "š")
text = text.replace("J", "˜")
text = text.replace("j", "Š")
text = text.replace("K", "Ÿ")
text = text.replace("k", "Ø")
text = text.replace("L", "ë")
text = text.replace("l", "™")
text = text.replace("M", "Ü")
text = text.replace("m", "ê")
text = text.replace("N", "ï")
text = text.replace("n", "Ù")
text = text.replace("O", "è")
text = text.replace("o", "¾")
text = text.replace("P", "È")
text = text.replace("p", "æ")
text = text.replace("Q", "ã")
text = text.replace("q", "►")
text = text.replace("R", "ƒ")
text = text.replace("r", "‰")
text = text.replace("S", "╨")
text = text.replace("s", "Ë")
text = text.replace("T", "Æ")
text = text.replace("t", "î")
text = text.replace("U", "ð")
text = text.replace("u", "À")
text = text.replace("V", "ô")
text = text.replace("v", "£")
text = text.replace("W", "¥")
text = text.replace("w", "õ")
text = text.replace("X", "Á")
text = text.replace("x", "ì")
text = text.replace("Y", "Â")
text = text.replace("y", "Ê")
text = text.replace("Z", "¢")
text = text.replace("z", "ö")
text = text.replace("0", "û")
text = text.replace("1", "ÿ")
text = text.replace("2", "ò")
text = text.replace("3", "├")
text = text.replace("4", "┌")
text = text.replace("5", "⌂")
text = text.replace("6", "║")
text = text.replace("7", "≤")
text = text.replace("8", "ù")
text = text.replace("9", "á")
text = text.replace(" ", "»")
print(ran + "\n\n\tGetting things ready- - - - - - \t\n\n")
print(ran + "Copy below text and send:\n")
print(cyan +text, "\n")
def decrypt():
text = input(ran + "\nEnter the text to Decrypt: ")
text = text.replace("Ç", "A")
text = text.replace("ü", "a")
text = text.replace("é", "B")
text = text.replace("â", "b")
text = text.replace("ä", "C")
text = text.replace("ç", "c")
text = text.replace("à", "D")
text = text.replace("å", "d")
text = text.replace("ý", "E")
text = text.replace("ø", "e")
text = text.replace("•", "F")
text = text.replace("þ", "f")
text = text.replace("Ú", "G")
text = text.replace("Ý", "g")
text = text.replace("Þ", "H")
text = text.replace("Ã", "h")
text = text.replace("Û", "I")
text = text.replace("š", "i")
text = text.replace("˜", "J")
text = text.replace("Š", "j")
text = text.replace("Ÿ", "K")
text = text.replace("Ø", "k")
text = text.replace("ë", "L")
text = text.replace("™", "l")
text = text.replace("Ü", "M")
text = text.replace("ê", "m")
text = text.replace("ï", "N")
text = text.replace("Ù", "n")
text = text.replace("è", "O")
text = text.replace("¾", "o")
text = text.replace("È", "P")
text = text.replace("æ", "p")
text = text.replace("ã", "Q")
text = text.replace("►", "q")
text = text.replace("ƒ", "R")
text = text.replace("‰", "r")
text = text.replace("╨", "S")
text = text.replace("Ë", "s")
text = text.replace("Æ", "T")
text = text.replace("î", "t")
text = text.replace("ð", "U")
text = text.replace("À", "u")
text = text.replace("ô", "V")
text = text.replace("£", "v")
text = text.replace("¥", "W")
text = text.replace("õ", "w")
text = text.replace("Á", "X")
text = text.replace("ì", "x")
text = text.replace("Â", "Y")
text = text.replace("Ê", "y")
text = text.replace("¢", "Z")
text = text.replace("ö", "z")
text = text.replace("û", "0")
text = text.replace("ÿ", "1")
text = text.replace("ò", "2")
text = text.replace("├", "3")
text = text.replace("┌", "4")
text = text.replace("⌂", "5")
text = text.replace("║", "6")
text = text.replace("≤", "7")
text = text.replace("ù", "8")
text = text.replace("á", "9")
text = text.replace("»", " ")
print(ran + "\n\n\tGetting things ready- - - - - - \t\n\n")
print(ran + "Your decrypted text:\n")
print(cyan + text, "\n")
def exit():
sys.exit()
cont =" "
while cont != "n" and "no":
print(ran + "\n\t\t[1] Encrypt Text\n\t\t[2] Decrypt Text\n\t\t[3] Exit\n ")
choice = input(ran + "Enter your choice: ")
if choice == "1":
encrypt()
elif choice == "2":
decrypt()
elif choice == "3":
print(ran + "\n\tDont Forget to do following tasks :-)\t\n")
print(Fore.CYAN, "- " * 4, " [+] Follow me on Instagram @saadkhan041 ", "- " * 4)
print(Fore.LIGHTYELLOW_EX, "\n", "- " * 4, " [+] Follow me on Instagram @coding_memz ", "- " * 4)
print(Fore.LIGHTRED_EX, "\n", "- " * 4, "[+] Github: https://github.com/Saadkhan041/ ", "- " * 3)
exit()
else:
print(ran + "\nInvalid option")
exit()
cont = input(ran + "\nDo you want to continue? [y/n]:")
if cont == "y":
os.system("clear")
banner()
else:
pass