From 532ce523e0da2a798bcfa1633f201821c59fd871 Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Fri, 20 Jan 2017 11:56:29 +0100 Subject: [PATCH 1/2] README: Simplify install steps on macOS --- README.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 72f1c8c..5986f54 100644 --- a/README.rst +++ b/README.rst @@ -30,9 +30,7 @@ If you would like to install KickThemOut on a Mac, please run the following:: $ sudo pip install pcapy - $ brew install libdnet - - $ brew install scapy + $ brew install libdnet scapy Keep in mind that you might be asked to run some commands after executing the previous step. Moving on:: From 8b8a6c55d6d860ab85b0e5feda90116afa38442f Mon Sep 17 00:00:00 2001 From: k4m4 Date: Sat, 21 Jan 2017 13:23:14 +0200 Subject: [PATCH 2/2] Resolve Issue #31 --- kickthemout.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/kickthemout.py b/kickthemout.py index 287023f..40096eb 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -256,6 +256,16 @@ def getGatewayIP(): gatewayIP = raw_input(header) return gatewayIP +def getDefaultInterfaceMAC(): + try: + defaultInterfaceMac = get_if_hwaddr(defaultInterface) + return defaultInterfaceMac + except: + 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)) + defaultInterfaceMac = raw_input(header) + return defaultInterfaceMac + def resolveMac(mac): try: url = "http://macvendors.co/api/vendorname/" @@ -324,7 +334,7 @@ if __name__ == '__main__': defaultInterface = getDefaultInterface() defaultGatewayIP = getGatewayIP() - defaultInterfaceMac = get_if_hwaddr(defaultInterface) + defaultInterfaceMac = getDefaultInterfaceMAC() scanNetwork() main()