From 6f13ce5d890e26a161a2d5c576dcae442912c7d2 Mon Sep 17 00:00:00 2001 From: Sebastian Lenzlinger <74497638+sebaschi@users.noreply.github.com> Date: Sun, 11 Jun 2023 15:31:49 +0200 Subject: [PATCH] Integrate kernel detector in to main program. Add option to run kernel detector --- src/keylogger_detector.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/keylogger_detector.py b/src/keylogger_detector.py index 26aac6f..347b88d 100755 --- a/src/keylogger_detector.py +++ b/src/keylogger_detector.py @@ -13,6 +13,7 @@ from utils import ( kill_processes, kill_process ) +from kernel_detector import run_kernel_detection # Global variables/CLI options @@ -22,6 +23,8 @@ safe_option = False add_white_list_option = False add_black_list_option = False debug_option = False +kernel_detection_option = False + # Functions def debug(option, to_print): @@ -38,6 +41,7 @@ def print_help(): print(' -w, --add-white-list\t\t\tActivate prompt to add program names to the whitelist') #For some reason this line gets messed up in display print(' -b, --add-black-list\t\t\tAutomatically add program names chosen to kill to the blacklist') print(' -d, --debug\t\t\tDebug mode. Print debug statements') + print(' -k, --kernel-detection\t\t\tRun the kernel keylogger detector, too') def set_input_options(): """ @@ -69,6 +73,8 @@ def set_input_options(): add_black_list_option = True elif arg == '-d' or arg == '--debug': debug_option = True + elif arg == '-k' or arg == '--kernel-detection': + kernel_detection_option = True def confirm_kill_procces(process_name, times=0): @@ -286,6 +292,9 @@ def detect_keyloggers(): if __name__ == '__main__': detect_keyloggers() + if kernel_detection_option: + print("[Info] Starting kernel detection") + run_kernel_detection()