From de20d0ac992e4b649a4bc0418661fbe0557890d0 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Wed, 25 Jan 2017 17:36:59 +0200 Subject: [PATCH] Update kickthemout.py --- kickthemout.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 166f19e..34990af 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -22,7 +22,7 @@ except: # User is probably on windows pass if notRoot: - sys.exit(1) + raise SystemExit logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy! try: @@ -31,7 +31,7 @@ try: except: print("\n{0}ERROR: Requirements have not been properly satisfied. Please try running:\n\t{1}$ sudo pip install -r requirements.txt{2}").format(RED, GREEN, END) print("\n{0}If you still get the same error, please submit an issue here:\n\t{1}https://github.com/k4m4/kickthemout/issues\n{2}").format(RED, BLUE, END) - sys.exit(1) + raise SystemExit def heading(): sys.stdout.write(GREEN + """ @@ -293,7 +293,7 @@ def main(): if hostsList[0][0] == defaultGatewayIP: print("\n{0}{1}WARNING: There are {2}0{3} hosts up on you network except your gateway.\n\tYou can't kick anyone off {4}:/{5}\n").format( GREEN, RED, GREEN, RED, GREEN, END) - sys.exit(1) + raise SystemExit else: print( "\n{0}{1}WARNING: There are {2}0{3} hosts up on you network.\n\tIt looks like something went wrong {4}:/{5}").format( @@ -301,7 +301,7 @@ def main(): print( "\n{0}If you are experiencing this error multiple times, please submit an issue here:\n\t{1}https://github.com/k4m4/kickthemout/issues\n{2}").format( RED, BLUE, END) - sys.exit(1) + raise SystemExit try: @@ -315,7 +315,7 @@ def main(): if choice.upper() == 'E' or choice.upper() == 'EXIT': print('\n{0}Thanks for dropping by.' '\nCatch ya later!{1}').format(GREEN, END) - sys.exit(1) + raise SystemExit elif choice == '1': kickoneoff() elif choice == '2':