mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: remove pslist and use sudo-prompt to close game if needed
This commit is contained in:
parent
0f5db4f34e
commit
1397e3932d
14 changed files with 51 additions and 114 deletions
|
@ -44,17 +44,17 @@ class Handler(BaseHTTPRequestHandler):
|
|||
self.end_headers()
|
||||
return
|
||||
|
||||
process_path = list(set([proc.info["exe"] for proc in psutil.process_iter(['exe'])]))
|
||||
process_list = [proc.info for proc in psutil.process_iter(['exe', 'pid', 'username'])]
|
||||
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "application/json")
|
||||
self.end_headers()
|
||||
|
||||
self.wfile.write(json.dumps(process_path).encode('utf-8'))
|
||||
self.wfile.write(json.dumps(process_list).encode('utf-8'))
|
||||
|
||||
def do_POST(self):
|
||||
global downloader
|
||||
|
||||
|
||||
if self.path == "/action":
|
||||
if self.headers.get(self.rpc_password_header) != rpc_password:
|
||||
self.send_response(401)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue