From 7930fefb732860cb6212f25929febd73f9081ed3 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Wed, 25 Apr 2018 17:22:03 +0300 Subject: [PATCH] Fix keyboard exception in initial scanning process --- kickthemout.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 391a986..73421f7 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -257,12 +257,15 @@ def scanNetwork(): # call scanning function from scan.py hostsList = scan.scanNetwork(getDefaultInterface(True)) except KeyboardInterrupt: - pass + shutdown() except: print("\n\n{}ERROR: Network scanning failed. Please check your requirements configuration.{}".format(RED, END)) print("\n{}If you still cannot resolve this error, please submit an issue here:\n\t{}https://github.com/k4m4/kickthemout/issues\n\n{}Details: {}{}{}".format(RED, BLUE, RED, GREEN, str(sys.exc_info()[1]), END)) os._exit(1) - regenOnlineIPs() + try: + regenOnlineIPs() + except KeyboardInterrupt: + shutdown()