Resolve Issue #31

This commit is contained in:
k4m4 2017-01-21 13:23:14 +02:00
parent 3442a2f825
commit 8b8a6c55d6

View File

@ -256,6 +256,16 @@ def getGatewayIP():
gatewayIP = raw_input(header) gatewayIP = raw_input(header)
return gatewayIP 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): def resolveMac(mac):
try: try:
url = "http://macvendors.co/api/vendorname/" url = "http://macvendors.co/api/vendorname/"
@ -324,7 +334,7 @@ if __name__ == '__main__':
defaultInterface = getDefaultInterface() defaultInterface = getDefaultInterface()
defaultGatewayIP = getGatewayIP() defaultGatewayIP = getGatewayIP()
defaultInterfaceMac = get_if_hwaddr(defaultInterface) defaultInterfaceMac = getDefaultInterfaceMAC()
scanNetwork() scanNetwork()
main() main()