Minor Bugfixes

This commit is contained in:
k4m4 2017-01-22 11:03:56 +02:00
parent 8b8a6c55d6
commit 7928e302e8
1 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ except:
# User is probably on windows # User is probably on windows
pass pass
if notRoot: if notRoot:
raise SystemExit sys.exit(1)
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy! logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy!
try: try:
@ -31,7 +31,7 @@ try:
except: 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}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) 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)
raise SystemExit sys.exit(1)
def heading(): def heading():
sys.stdout.write(GREEN + """ sys.stdout.write(GREEN + """
@ -259,12 +259,12 @@ def getGatewayIP():
def getDefaultInterfaceMAC(): def getDefaultInterfaceMAC():
try: try:
defaultInterfaceMac = get_if_hwaddr(defaultInterface) defaultInterfaceMac = get_if_hwaddr(defaultInterface)
return defaultInterfaceMac return defaultInterfaceMac
except: except:
print("\n{0}ERROR: Default Interface MAC Address could not be obtained. Please enter MAC manually.{1}\n").format(RED, END) print("\n{0}ERROR: Default Interface MAC Address could not be obtained. Please enter MAC manually.{1}\n").format(RED, END)
header = ('{0}kickthemout{1}> {2}Enter MAC Address {3}(MM:MM:MM:SS:SS:SS): '.format(BLUE, WHITE, RED, END)) header = ('{0}kickthemout{1}> {2}Enter MAC Address {3}(MM:MM:MM:SS:SS:SS): '.format(BLUE, WHITE, RED, END))
defaultInterfaceMac = raw_input(header) defaultInterfaceMac = raw_input(header)
return defaultInterfaceMac return defaultInterfaceMac
def resolveMac(mac): def resolveMac(mac):
try: try:
@ -292,7 +292,7 @@ def main():
if hostsList[0][0] == defaultGatewayIP: 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( 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) GREEN, RED, GREEN, RED, GREEN, END)
raise SystemExit sys.exit(1)
else: else:
print( 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( "\n{0}{1}WARNING: There are {2}0{3} hosts up on you network.\n\tIt looks like something went wrong {4}:/{5}").format(
@ -300,7 +300,7 @@ def main():
print( 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( "\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) RED, BLUE, END)
raise SystemExit sys.exit(1)
try: try:
@ -314,7 +314,7 @@ def main():
if choice.upper() == 'E' or choice.upper() == 'EXIT': if choice.upper() == 'E' or choice.upper() == 'EXIT':
print('\n{0}Thanks for dropping by.' print('\n{0}Thanks for dropping by.'
'\nCatch ya later!{1}').format(GREEN, END) '\nCatch ya later!{1}').format(GREEN, END)
raise SystemExit sys.exit(1)
elif choice == '1': elif choice == '1':
kickoneoff() kickoneoff()
elif choice == '2': elif choice == '2':