From 5b85021fb4c554843549cba5e2c3930613d34319 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 10 Jan 2017 23:41:31 +0200 Subject: [PATCH] Resolve Issue #8 --- kickthemout.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index d4d03c8..2304f96 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -233,13 +233,13 @@ def getDefaultInterface(): def getGatewayIP(): try: - getGateway_p = sr1(IP(dst="google.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False) - return getGateway_p.src + getGateway_p = sr1(IP(dst="google.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False) + return getGateway_p.src except: - print("\n{0}ERROR: Gateway IP could not be obtained. Please enter IP manually.{2}\n").format(RED, END) - header = ('{0}kickthemout{1}> {2}Enter Gateway IP {3}(e.g. 192.168.1.1): '.format(BLUE, WHITE, RED, END)) - gatewayIP = raw_input(header) - return gatewayIP + print("\n{0}ERROR: Gateway IP could not be obtained. Please enter IP manually.{2}\n").format(RED, END) + header = ('{0}kickthemout{1}> {2}Enter Gateway IP {3}(e.g. 192.168.1.1): '.format(BLUE, WHITE, RED, END)) + gatewayIP = raw_input(header) + return gatewayIP def resolveMac(mac): try: