From 20dbeb2f38684c65ff0a4b99012c161295708e88 Mon Sep 17 00:00:00 2001 From: AL-LCL Date: Fri, 19 May 2023 11:01:49 +0200 Subject: NeoRAT --- foreign/parse/crash_exception_handling.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 foreign/parse/crash_exception_handling.py (limited to 'foreign/parse/crash_exception_handling.py') diff --git a/foreign/parse/crash_exception_handling.py b/foreign/parse/crash_exception_handling.py new file mode 100644 index 0000000..0012927 --- /dev/null +++ b/foreign/parse/crash_exception_handling.py @@ -0,0 +1,27 @@ +import sys + + +def crash_exception_handling(func): + def func_wrapper(*args): + try: + number_of_arguments = len(args) + + if number_of_arguments == 0: + func() + elif number_of_arguments == 1: + func(args[0]) + elif number_of_arguments == 2: + func(args[0], args[1]) + elif number_of_arguments == 3: + func(args[0], args[1], args[2]) + elif number_of_arguments == 4: + func(args[0], args[1], args[2], args[3]) + elif number_of_arguments == 5: + func(args[0], args[1], args[2], args[3], args[4]) + elif number_of_arguments == 6: + func(args[0], args[1], args[2], args[3], args[4], args[5]) + elif number_of_arguments == 7: + func(args[0], args[1], args[2], args[3], args[4], args[5], args[6]) + except: + sys.exit(0) + return func_wrapper \ No newline at end of file -- cgit v1.2.3