This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_KillSwitch/main.py

16 lines
354 B
Python
Raw Normal View History

2023-01-31 13:27:10 +00:00
# Project: Telegram PC kill switch bot
# Author: Stanislav Mykhailenko
# License: Unlicense
import ctypes, sys
from tg import startBot
def main() -> None:
if ctypes.windll.shell32.IsUserAnAdmin():
startBot()
else:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, " ".join(sys.argv), None, 1)
if __name__ == '__main__':
main()