mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-22 04:54:26 +01:00
Fixing getDefaultInterfaceMAC
This commit is contained in:
parent
32842f5b2b
commit
00f71a4d76
@ -262,10 +262,17 @@ def getGatewayIP():
|
|||||||
return gatewayIP
|
return gatewayIP
|
||||||
|
|
||||||
def getDefaultInterfaceMAC():
|
def getDefaultInterfaceMAC():
|
||||||
getDefaultInterfaceMACManually = False
|
|
||||||
try:
|
try:
|
||||||
defaultInterfaceMac = get_if_hwaddr(defaultInterface)
|
defaultInterfaceMac = get_if_hwaddr(defaultInterface)
|
||||||
return defaultInterfaceMac
|
if defaultInterfaceMac == "" or not defaultInterfaceMac:
|
||||||
|
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
|
||||||
|
else:
|
||||||
|
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))
|
||||||
|
Loading…
Reference in New Issue
Block a user