-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
199 lines (128 loc) · 3.99 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
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
# Imports system commands
import os
# import requests
import requests
# Imports eel, An Electron like GUI for Python.
import eel
# Initializes eel
eel.init("web")
# sudo setup
@eel.expose
def gsudo():
os.system("winget install gerardog.gsudo")
# Files and folders
@eel.expose
def openHosts():
os.system(
'sudo cmd.exe /c "attrib -r %WINDIR%\\system32\\drivers\\etc\\hosts && notepad.exe %WINDIR%\\system32\\drivers\\etc\\hosts"'
)
@eel.expose
def openOfficeAddins():
os.system("explorer.exe %AppData%\\Microsoft\\AddIns")
@eel.expose
def openCurrentUserStartMenu():
os.system("explorer.exe %AppData%\\Microsoft\\Windows\\Start Menu")
@eel.expose
def openAllUserStartMenu():
os.system("explorer.exe C:\\ProgramData\\Microsoft\\Windows\\Start Menu")
@eel.expose
def openSentTo():
os.system("explorer.exe %Appdata%\\Microsoft\\Windows\\SendTo")
@eel.expose
def openCurrentUserStartup():
os.system(
"explorer.exe %AppData%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
)
@eel.expose
def openAllUsersStartup():
os.system(
"explorer.exe C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp"
)
@eel.expose
def openWordStartup():
os.system("explorer.exe %AppData%\\Microsoft\\Word\\STARTUP")
@eel.expose
def openPSReadLineHistory():
os.system(
"notepad %AppData%\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt"
)
@eel.expose
def openAccountPictures():
os.system("explorer shell:AccountPictures")
@eel.expose
def openVirtualDisks():
os.system("explorer %ProgramData%\\Microsoft\\Windows\\Virtual Hard Disks")
@eel.expose
def openApplicationsFolder():
os.system("explorer shell:AppsFolder")
@eel.expose
def superGodMode():
os.system(
'powershell -Command "irm https://cdn.jsdelivr.net/gh/ThioJoe/Windows-Super-God-Mode@main/Super_God_Mode.ps1 | iex"'
)
# Settings and Utilities
@eel.expose
def openFolderOptions():
os.system("explorer shell:::{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}")
@eel.expose
def openInternetOptions():
os.system("explorer shell:::{A3DD4F92-658A-410F-84FD-6FBBBEF2FFFE}")
@eel.expose
def openSoundOptions():
os.system("explorer shell:::{F2DDFC82-8F12-4CDD-B7DC-D4FE1425AA4D}")
@eel.expose
def openPowerOptions():
os.system("explorer shell:::{025A5937-A6BE-4686-A844-36FE4BEC8B6D}")
@eel.expose
def openOptionalFeatures():
os.system("start %WINDIR%\\System32\\OptionalFeatures.exe")
@eel.expose
def openControlPanel():
os.system("start control.exe")
@eel.expose
def openGodMode():
os.system("explorer.exe shell:::{ed7ba470-8e54-465e-825c-99712043e01c}")
@eel.expose
def fKeySender():
response = requests.get(
"https://api.github.com/repos/ThioJoe/F-Key-Sender/releases/latest"
).json()
url = response["assets"][0]["browser_download_url"]
os.system(
f"powershell -Command Start-BitsTransfer -Source {url} -Destination $env:TEMP && %TEMP%\\F_Key_Sender.exe"
)
@eel.expose
def titusWinutil():
os.system('sudo powershell -Command "irm https://christitus.com/win | iex"')
@eel.expose
def dotnetInstaller():
os.system('sudo cmd.exe /c "scripts\\dotnet.bat"')
@eel.expose
def updatePrograms():
os.system("winget upgrade --all")
# Repair Tools
@eel.expose
def shutdown():
os.system("shutdown /s /t 0")
@eel.expose
def restart():
os.system("shutdown /r /t 0")
@eel.expose
def repairSystemFiles():
os.system("sudo sfc /scannow && pause")
@eel.expose
def repairWindowsComponents():
os.system("sudo dism /online /cleanup-image /restorehealth && pause")
@eel.expose
def wsreset():
os.system("sudo wsreset.exe")
@eel.expose
def restartWinNat():
os.system('sudo cmd.exe /c "net stop winnat && net start winnat"')
@eel.expose
def killNotRespondingApps():
os.system('sudo taskkill.exe /F /FI "status eq NOT RESPONDING" && pause')
@eel.expose
def cleanupTempFiles():
os.system('sudo cmd /c "scripts\\cleanuptemp.bat"')
eel.start("index.html", mode="edge")