Fix keyboard exception in initial scanning process

This commit is contained in:
k4m4 2018-04-25 17:22:03 +03:00
parent 3fa1955ce4
commit 7930fefb73
No known key found for this signature in database
GPG Key ID: A85C514862FA7B26
1 changed files with 5 additions and 2 deletions

View File

@ -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()