From b6ed64a06d7a97b56de74e6bfce1c10fd3dd378e Mon Sep 17 00:00:00 2001 From: k4m4 Date: Sun, 1 Jan 2017 21:19:50 +0200 Subject: [PATCH 01/39] kickSOMEOff + kickALLOff Enhancements --- kickthemout.py | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index b666d33..847efa9 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -97,7 +97,7 @@ def kickoneoff(): one_target_mac = host[1] if one_target_mac == "": print("\nIP address is not up. Please try again.") - return + break # TODO: Test "break" print("\n{0}Target mac => '{1}" + one_target_mac + "{2}'{3}\n").format(GREEN, RED, GREEN, END) print("{0}Spoofing started... {1}\n").format(GREEN, END) @@ -129,13 +129,12 @@ def kicksomeoff(): if host[0] == onlineIPs[i]: mac = host[1] vendor = resolveMac(mac) - print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t" + vendor + "\n{4}").format(YELLOW, WHITE, - RED, GREEN, END) + print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t" + vendor + "\n{4}").format(YELLOW, WHITE, RED, GREEN, END) canBreak = False while not canBreak: try: - choice = raw_input("\nChoose the targets (separate by a ','): ") + choice = raw_input("\nChoose devices to target(comma-separated): ") canBreak = True except KeyboardInterrupt: return @@ -145,7 +144,7 @@ def kicksomeoff(): some_ipList = "" for i in some_targets: try: - some_ipList = some_ipList + GREEN + "'" + RED + onlineIPs[int(i)] + GREEN + "', " + some_ipList += GREEN + "'" + RED + onlineIPs[int(i)] + GREEN + "', " except KeyboardInterrupt: return except: @@ -193,6 +192,8 @@ def kickalloff(): vendor = resolveMac(mac) print(str("{0}"+ str(onlineIPs[i]) + "{1}\t" + vendor + "{2}").format(RED, GREEN, END)) + print("\n{0}Targets: {1}" + ','.join(onlineIPs)).format(GREEN, END) + print("\n{0}Spoofing started... {1}\n").format(GREEN, END) try: reScan = 0 @@ -222,34 +223,25 @@ def getDefaultInterface(): if (arg <= 0 or arg >= 0xFFFFFFFF): raise ValueError("illegal netmask value", hex(arg)) return 32 - int(round(math.log(0xFFFFFFFF - arg, 2))) - def to_CIDR_notation(bytes_network, bytes_netmask): network = scapy.utils.ltoa(bytes_network) netmask = long2net(bytes_netmask) net = "%s/%s" % (network, netmask) if netmask < 16: return None - return net - for network, netmask, _, interface, address in scapy.config.conf.route.routes: - # skip loopback network and default gw if network == 0 or interface == 'lo' or address == '127.0.0.1' or address == '0.0.0.0': continue - if netmask <= 0 or netmask == 0xFFFFFFFF: continue - net = to_CIDR_notation(network, netmask) - if interface != scapy.config.conf.iface: continue - if net: return interface - def getGatewayIP(): getGateway_p = sr1(IP(dst="google.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False) return getGateway_p.src @@ -264,7 +256,9 @@ def resolveMac(mac): vendor = vendor[:25] return vendor except: - return "RESOLVING_ERROR" + return "[-] Error Resolving Mac Address" + return "[-] Exiting..." + raise SystemExit def main(): @@ -272,10 +266,8 @@ def main(): print( "\n{0}Using interface '{1}" + defaultInterface + "{2}' with mac address '{3}" + defaultInterfaceMac + "{4}'.\nGateway IP: '{5}" - + defaultGatewayIP + "{6}'. {7}" + str(len(hostsList)) + "{8} hosts are up.{9}").format(GREEN, RED, GREEN, RED, - GREEN, RED, GREEN, RED, - GREEN, END) - + + defaultGatewayIP + "{6}'. {7}" + str(len(hostsList)) + "{8} hosts are up.{9}").format(GREEN, RED, GREEN, RED, GREEN, + RED, GREEN, RED, GREEN, END) try: while True: @@ -315,5 +307,4 @@ if __name__ == '__main__': defaultInterfaceMac = get_if_hwaddr(defaultInterface) scanNetwork() - - main() + main() \ No newline at end of file From 84d7c89adb811ec9b793d6d56862b525b8d4ae69 Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Sun, 1 Jan 2017 21:23:02 +0200 Subject: [PATCH 02/39] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2635d1e..511255c 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ KickThemOut =========== -`KickThemOut `_ - **Kick Devices Off Your Network** +`KickThemOut `_ - **Kick Devices Off Your LAN Network** From 7a34ce2b9fe8012349cbca18e64c98aee139bf01 Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Sun, 1 Jan 2017 21:50:23 +0200 Subject: [PATCH 03/39] Update kickthemout.py --- kickthemout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 847efa9..46006c8 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -97,7 +97,7 @@ def kickoneoff(): one_target_mac = host[1] if one_target_mac == "": print("\nIP address is not up. Please try again.") - break # TODO: Test "break" + return # TODO: FIX print("\n{0}Target mac => '{1}" + one_target_mac + "{2}'{3}\n").format(GREEN, RED, GREEN, END) print("{0}Spoofing started... {1}\n").format(GREEN, END) @@ -307,4 +307,4 @@ if __name__ == '__main__': defaultInterfaceMac = get_if_hwaddr(defaultInterface) scanNetwork() - main() \ No newline at end of file + main() From c9eff97abe94832bff448acc345bdbfcfebeaa33 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Sun, 1 Jan 2017 22:04:11 +0200 Subject: [PATCH 04/39] Update kickthemout.py --- kickthemout.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 46006c8..377478c 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -13,7 +13,6 @@ import scan, spoof from time import sleep import urllib2 as urllib - logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy! from scapy.all import * @@ -97,10 +96,10 @@ def kickoneoff(): one_target_mac = host[1] if one_target_mac == "": print("\nIP address is not up. Please try again.") - return # TODO: FIX + return # TODO: Test "break" - print("\n{0}Target mac => '{1}" + one_target_mac + "{2}'{3}\n").format(GREEN, RED, GREEN, END) - print("{0}Spoofing started... {1}\n").format(GREEN, END) + # print("\n{0}Target mac => '{1}" + one_target_mac + "{2}'{3}\n").format(GREEN, RED, GREEN, END) # {TESTING} + print("{0}Spoofing started... {1}").format(GREEN, END) try: while True: spoof.sendPacket(defaultInterfaceMac, defaultGatewayIP, one_target_ip, one_target_mac) @@ -112,7 +111,7 @@ def kickoneoff(): spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, one_target_ip, one_target_mac) rearp = rearp + 1 time.sleep(0.5) - print("\n{0}Re-arped{1} target.{2}").format(RED, GREEN, END) + print("{0}Re-arped{1} target.{2}").format(RED, GREEN, END) def kicksomeoff(): @@ -174,8 +173,7 @@ def kicksomeoff(): spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1]) rearp = rearp + 1 time.sleep(0.5) - print("\n{0}Re-arped{1} targets.{2}").format(RED, GREEN, END) - + print("{0}Re-arped{1} targets.{2}").format(RED, GREEN, END) def kickalloff(): os.system("clear||cls") @@ -190,9 +188,9 @@ def kickalloff(): if host[0] == onlineIPs[i]: mac = host[1] vendor = resolveMac(mac) - print(str("{0}"+ str(onlineIPs[i]) + "{1}\t" + vendor + "{2}").format(RED, GREEN, END)) + print(str(" {0}"+ str(onlineIPs[i]) + "{1}\t" + vendor + "{2}").format(RED, GREEN, END)) - print("\n{0}Targets: {1}" + ','.join(onlineIPs)).format(GREEN, END) + print("\n{0}Targets: {1}" + ', '.join(onlineIPs)).format(GREEN, END) # {TESTING} print("\n{0}Spoofing started... {1}\n").format(GREEN, END) try: @@ -215,7 +213,7 @@ def kickalloff(): spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1]) rearp = rearp + 1 time.sleep(0.5) - print("\n{0}Re-arped{1} targets.{2}").format(RED, GREEN, END) + print("{0}Re-arped{1} targets.{2}").format(RED, GREEN, END) def getDefaultInterface(): @@ -256,9 +254,7 @@ def resolveMac(mac): vendor = vendor[:25] return vendor except: - return "[-] Error Resolving Mac Address" - return "[-] Exiting..." - raise SystemExit + return "N/A" def main(): @@ -307,4 +303,4 @@ if __name__ == '__main__': defaultInterfaceMac = get_if_hwaddr(defaultInterface) scanNetwork() - main() + main() \ No newline at end of file From 76f8e3d68da6718ac9284f2170f536ef955aaa6a Mon Sep 17 00:00:00 2001 From: k4m4 Date: Sun, 1 Jan 2017 22:17:05 +0200 Subject: [PATCH 05/39] Update kickthemout.py --- kickthemout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 377478c..e8d405e 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -77,7 +77,7 @@ def kickoneoff(): if host[0] == onlineIPs[i]: mac = host[1] vendor = resolveMac(mac) - print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t"+ vendor + "\n{4}").format(YELLOW, WHITE, RED, GREEN, END) + print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t"+ vendor + "{4}").format(YELLOW, WHITE, RED, GREEN, END) canBreak = False while not canBreak: @@ -128,7 +128,7 @@ def kicksomeoff(): if host[0] == onlineIPs[i]: mac = host[1] vendor = resolveMac(mac) - print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t" + vendor + "\n{4}").format(YELLOW, WHITE, RED, GREEN, END) + print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t" + vendor + "{4}").format(YELLOW, WHITE, RED, GREEN, END) canBreak = False while not canBreak: From 5881fe106f0c7e794313ad0de3aa54eee97fb7a3 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Sun, 1 Jan 2017 22:19:42 +0200 Subject: [PATCH 06/39] Update kickthemout.py --- kickthemout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kickthemout.py b/kickthemout.py index e8d405e..552bf4d 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -99,7 +99,7 @@ def kickoneoff(): return # TODO: Test "break" # print("\n{0}Target mac => '{1}" + one_target_mac + "{2}'{3}\n").format(GREEN, RED, GREEN, END) # {TESTING} - print("{0}Spoofing started... {1}").format(GREEN, END) + print("\n{0}Spoofing started... {1}").format(GREEN, END) try: while True: spoof.sendPacket(defaultInterfaceMac, defaultGatewayIP, one_target_ip, one_target_mac) From 47e21e236ba4055bef6c29339aee6b4f3976c50c Mon Sep 17 00:00:00 2001 From: k4m4 Date: Sun, 1 Jan 2017 22:25:29 +0200 Subject: [PATCH 07/39] Update kickthemout.py --- kickthemout.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 552bf4d..dc1160c 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -63,7 +63,7 @@ def regenOnlineIPs(): defaultGatewayMac = host[1] -def kickoneoff(): +def kickoneoff(): # TODO: do not allow only one device!! os.system("clear||cls") print("\n{0}kickONEOff{1} selected...{2}\n").format(RED, GREEN, END) @@ -111,7 +111,7 @@ def kickoneoff(): spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, one_target_ip, one_target_mac) rearp = rearp + 1 time.sleep(0.5) - print("{0}Re-arped{1} target.{2}").format(RED, GREEN, END) + print("{0}Re-arped{1} target successfully.{2}").format(RED, GREEN, END) def kicksomeoff(): @@ -173,7 +173,7 @@ def kicksomeoff(): spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1]) rearp = rearp + 1 time.sleep(0.5) - print("{0}Re-arped{1} targets.{2}").format(RED, GREEN, END) + print("{0}Re-arped{1} targets successfully.{2}").format(RED, GREEN, END) def kickalloff(): os.system("clear||cls") @@ -213,7 +213,7 @@ def kickalloff(): spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1]) rearp = rearp + 1 time.sleep(0.5) - print("{0}Re-arped{1} targets.{2}").format(RED, GREEN, END) + print("{0}Re-arped{1} targets successfully.{2}").format(RED, GREEN, END) def getDefaultInterface(): From 2b661805da60bc5dde44edd7a3d7483f9ef45dae Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Sun, 1 Jan 2017 22:39:53 +0200 Subject: [PATCH 08/39] Update scan.py --- scan.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scan.py b/scan.py index 796d632..b2db304 100644 --- a/scan.py +++ b/scan.py @@ -13,7 +13,6 @@ def scanNetwork(): raise ValueError("illegal netmask value", hex(arg)) return 32 - int(round(math.log(0xFFFFFFFF - arg, 2))) - def to_CIDR_notation(bytes_network, bytes_netmask): network = scapy.utils.ltoa(bytes_network) netmask = long2net(bytes_netmask) @@ -23,7 +22,6 @@ def scanNetwork(): return net - def scan_and_print_neighbors(net, interface, timeout=1): hostsList = [] try: From 3a37cab65f28f246c159b4a606b40752b7d47125 Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Sun, 1 Jan 2017 22:41:32 +0200 Subject: [PATCH 09/39] Update spoof.py --- spoof.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spoof.py b/spoof.py index f5aafb3..829fa8e 100644 --- a/spoof.py +++ b/spoof.py @@ -17,7 +17,6 @@ from scapy.all import ( sendp ) - def sendPacket(my_mac, gateway_ip, target_ip, target_mac): ether = Ether() ether.src = my_mac From 2fd78cde78c44888b2cc57d7d855841633a973bf Mon Sep 17 00:00:00 2001 From: k4m4 Date: Mon, 2 Jan 2017 11:47:49 +0200 Subject: [PATCH 10/39] Update kickthemout.py --- kickthemout.py | 55 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index dc1160c..2359525 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -18,7 +18,6 @@ from scapy.all import * BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033[1;35m', '\033[1;32m', '\033[0m' - def heading(): sys.stdout.write(GREEN + """ █ █▀ ▄█ ▄█▄ █ █▀ ▄▄▄▄▀ ▄ █ ▄███▄ █▀▄▀█ ████▄ ▄ ▄▄▄▄▀ @@ -28,11 +27,10 @@ def heading(): █ ▐ ▀███▀ █ ▀ █ ▀███▀ █ █▄ ▄█ ▀ ▀ ▀ ▀ ▀ ▀▀▀ """ + END + BLUE + - '\n' + '{0}Kick Devices Off Your LAN ({1}KickThemOut{2}){3}'.format(YELLOW, RED, YELLOW, - BLUE).center(88) + - '\n' + 'Made With <3 by: {0}Nikolaos Kamarinakis ({1}k4m4{2}) & {0}David Schütz ({1}xdavidhu{2}){3}'.format( - YELLOW, RED, YELLOW, BLUE).center(67) + - '\n' + 'Version: {0}0.1{1}\n'.format(YELLOW, END).center(77)) + '\n' + '{0}Kick Devices Off Your LAN ({1}KickThemOut{2}){3}'.format(YELLOW, RED, YELLOW, BLUE).center(98) + + '\n' + 'Made With <3 by: {0}Nikolaos Kamarinakis ({1}k4m4{2}) & {0}David Schütz ({1}xdavidhu{2}){3}'.format( + YELLOW, RED, YELLOW, BLUE).center(111) + + '\n' + 'Version: {0}0.1{1}\n'.format(YELLOW, END).center(86)) def optionBanner(): @@ -47,21 +45,20 @@ def optionBanner(): print('\n\t{0}[{1}E{2}]{3} Exit KickThemOut\n').format(YELLOW, RED, YELLOW, WHITE) -def scanNetwork(): - global hostsList - hostsList = scan.scanNetwork() - regenOnlineIPs() - def regenOnlineIPs(): global onlineIPs global defaultGatewayMac - onlineIPs = [] for host in hostsList: onlineIPs.append(host[0]) if host[0] == defaultGatewayIP: defaultGatewayMac = host[1] +def scanNetwork(): + global hostsList + hostsList = scan.scanNetwork() + regenOnlineIPs() + def kickoneoff(): # TODO: do not allow only one device!! os.system("clear||cls") @@ -70,7 +67,6 @@ def kickoneoff(): # TODO: do not allow only one device!! scanNetwork() print("Online IPs: ") - for i in range(len(onlineIPs)): mac = "" for host in hostsList: @@ -96,9 +92,11 @@ def kickoneoff(): # TODO: do not allow only one device!! one_target_mac = host[1] if one_target_mac == "": print("\nIP address is not up. Please try again.") - return # TODO: Test "break" + return # print("\n{0}Target mac => '{1}" + one_target_mac + "{2}'{3}\n").format(GREEN, RED, GREEN, END) # {TESTING} + print("\n{0}Target: {1}" + one_target_ip).format(GREEN, END) + print("\n{0}Spoofing started... {1}").format(GREEN, END) try: while True: @@ -106,10 +104,10 @@ def kickoneoff(): # TODO: do not allow only one device!! time.sleep(15) except KeyboardInterrupt: print("\n{0}Re-arping{1} target...{2}").format(RED, GREEN, END) - rearp = 1 - while rearp != 10: + reArp = 1 + while reArp != 10: spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, one_target_ip, one_target_mac) - rearp = rearp + 1 + reArp += 1 time.sleep(0.5) print("{0}Re-arped{1} target successfully.{2}").format(RED, GREEN, END) @@ -121,7 +119,6 @@ def kicksomeoff(): scanNetwork() print("Online IPs: ") - for i in range(len(onlineIPs)): mac = "" for host in hostsList: @@ -138,7 +135,11 @@ def kicksomeoff(): except KeyboardInterrupt: return - some_targets = choice.split(",") + if ',' in choice: + some_targets = choice.split(",") + else: + print("\n{0}ERROR:{2} Please select more than 1 devices.{3}\n").format(RED, RED, END) + return some_ipList = "" for i in some_targets: @@ -164,14 +165,14 @@ def kicksomeoff(): time.sleep(15) except KeyboardInterrupt: print("\n{0}Re-arping{1} targets...{2}").format(RED, GREEN, END) - rearp = 1 - while rearp != 10: + reArp = 1 + while reArp != 10: for i in some_targets: ip = onlineIPs[int(i)] for host in hostsList: if host[0] == ip: spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1]) - rearp = rearp + 1 + reArp += 1 time.sleep(0.5) print("{0}Re-arped{1} targets successfully.{2}").format(RED, GREEN, END) @@ -199,19 +200,19 @@ def kickalloff(): for host in hostsList: if host[0] != defaultGatewayIP: spoof.sendPacket(defaultInterfaceMac, defaultGatewayIP, host[0], host[1]) - reScan = reScan + 1 + reScan += 1 if reScan == 4: reScan = 0 scanNetwork() time.sleep(15) except KeyboardInterrupt: print("\n{0}Re-arping{1} targets...{2}").format(RED, GREEN, END) - rearp = 1 - while rearp != 10: + reArp = 1 + while reArp != 10: for host in hostsList: if host[0] != defaultGatewayIP: spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1]) - rearp = rearp + 1 + reArp += 1 time.sleep(0.5) print("{0}Re-arped{1} targets successfully.{2}").format(RED, GREEN, END) @@ -229,7 +230,6 @@ def getDefaultInterface(): return None return net for network, netmask, _, interface, address in scapy.config.conf.route.routes: - # skip loopback network and default gw if network == 0 or interface == 'lo' or address == '127.0.0.1' or address == '0.0.0.0': continue if netmask <= 0 or netmask == 0xFFFFFFFF: @@ -264,6 +264,7 @@ def main(): "\n{0}Using interface '{1}" + defaultInterface + "{2}' with mac address '{3}" + defaultInterfaceMac + "{4}'.\nGateway IP: '{5}" + defaultGatewayIP + "{6}'. {7}" + str(len(hostsList)) + "{8} hosts are up.{9}").format(GREEN, RED, GREEN, RED, GREEN, RED, GREEN, RED, GREEN, END) + try: while True: From 6615cc91622025414469e431519199a8ac637df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sch=C3=BCtz?= Date: Mon, 2 Jan 2017 22:30:26 +0100 Subject: [PATCH 11/39] minor fixes --- kickthemout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 2359525..0c9e645 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -79,13 +79,13 @@ def kickoneoff(): # TODO: do not allow only one device!! while not canBreak: try: choice = int(raw_input("\nChoose a target: ")) + one_target_ip = onlineIPs[choice] canBreak = True except KeyboardInterrupt: return except: - print("{0}[!] Please enter a number!{1}").format(RED, END) + print("{0}[!] Please enter a number from the list!{1}").format(RED, END) - one_target_ip = onlineIPs[choice] one_target_mac = "" for host in hostsList: if host[0] == one_target_ip: From ccc1fa851bf6cc1f6ad7badc283eea73cff688b9 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Mon, 2 Jan 2017 23:38:03 +0200 Subject: [PATCH 12/39] Update kickthemout.py, spoof.py, scan.py --- scan.py | 2 ++ spoof.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scan.py b/scan.py index b2db304..be45e55 100644 --- a/scan.py +++ b/scan.py @@ -4,6 +4,8 @@ # author: Benedikt Waldvogel # edited by: k4m4 & xdavidhu +import logging +logging.getLogger("scapy.runtime").setLevel(logging.ERROR) import scapy.config, scapy.layers.l2, scapy.route, socket, math, errno def scanNetwork(): diff --git a/spoof.py b/spoof.py index 829fa8e..0d72a98 100644 --- a/spoof.py +++ b/spoof.py @@ -8,7 +8,8 @@ Copyright (C) 2016 Nikolaos Kamarinakis (nikolaskam@gmail.com) & David Schütz ( See License at nikolaskama.me (https://nikolaskama.me/kickthemoutproject) """ -import sys +import sys, logging +logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import ( get_if_hwaddr, getmacbyip, From 271f2af93e5a660cf3f0b6ade995c19035c40e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sch=C3=BCtz?= Date: Mon, 2 Jan 2017 22:38:51 +0100 Subject: [PATCH 13/39] minor fixes --- kickthemout.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 0c9e645..fb55aba 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -131,16 +131,14 @@ def kicksomeoff(): while not canBreak: try: choice = raw_input("\nChoose devices to target(comma-separated): ") - canBreak = True + if ',' in choice: + some_targets = choice.split(",") + canBreak = True + else: + print("\n{0}ERROR:{1} Please select more than 1 devices from the list.{2}\n").format(RED, RED, END) except KeyboardInterrupt: return - if ',' in choice: - some_targets = choice.split(",") - else: - print("\n{0}ERROR:{2} Please select more than 1 devices.{3}\n").format(RED, RED, END) - return - some_ipList = "" for i in some_targets: try: From 45bee242c34e370d2f5f4cdabed79e1c71ed0526 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Mon, 2 Jan 2017 23:44:55 +0200 Subject: [PATCH 14/39] Update kickthemout.py --- kickthemout.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 0c9e645..6f8d185 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -191,8 +191,6 @@ def kickalloff(): vendor = resolveMac(mac) print(str(" {0}"+ str(onlineIPs[i]) + "{1}\t" + vendor + "{2}").format(RED, GREEN, END)) - print("\n{0}Targets: {1}" + ', '.join(onlineIPs)).format(GREEN, END) # {TESTING} - print("\n{0}Spoofing started... {1}\n").format(GREEN, END) try: reScan = 0 From 93cd437f159944ee4d1aed72c5054fd138fc0004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sch=C3=BCtz?= Date: Mon, 2 Jan 2017 23:30:16 +0100 Subject: [PATCH 15/39] minor fixes --- kickthemout.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index fb55aba..e6ee8e6 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -101,7 +101,7 @@ def kickoneoff(): # TODO: do not allow only one device!! try: while True: spoof.sendPacket(defaultInterfaceMac, defaultGatewayIP, one_target_ip, one_target_mac) - time.sleep(15) + time.sleep(10) except KeyboardInterrupt: print("\n{0}Re-arping{1} target...{2}").format(RED, GREEN, END) reArp = 1 @@ -160,7 +160,7 @@ def kicksomeoff(): for host in hostsList: if host[0] == ip: spoof.sendPacket(defaultInterfaceMac, defaultGatewayIP, host[0], host[1]) - time.sleep(15) + time.sleep(10) except KeyboardInterrupt: print("\n{0}Re-arping{1} targets...{2}").format(RED, GREEN, END) reArp = 1 @@ -189,8 +189,6 @@ def kickalloff(): vendor = resolveMac(mac) print(str(" {0}"+ str(onlineIPs[i]) + "{1}\t" + vendor + "{2}").format(RED, GREEN, END)) - print("\n{0}Targets: {1}" + ', '.join(onlineIPs)).format(GREEN, END) # {TESTING} - print("\n{0}Spoofing started... {1}\n").format(GREEN, END) try: reScan = 0 @@ -202,7 +200,7 @@ def kickalloff(): if reScan == 4: reScan = 0 scanNetwork() - time.sleep(15) + time.sleep(10) except KeyboardInterrupt: print("\n{0}Re-arping{1} targets...{2}").format(RED, GREEN, END) reArp = 1 From b29631b9a4ce336259442e98dab564cd5360282c Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 3 Jan 2017 00:39:49 +0200 Subject: [PATCH 16/39] Update kickthemout.py --- kickthemout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index e6ee8e6..d5a9d71 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -285,8 +285,8 @@ def main(): # EXECUTE kickalloff FUNCTION (FF:FF:FF:FF:FF:FF) elif choice.upper() == 'CLEAR': os.system("clear||cls") - # else: - # print('*INVALID OPTION*') + else: + print("\n{0}ERROR:{1} Please select a valid option.{2}\n").format(RED, RED, END) except KeyboardInterrupt: print('\n\n{0}Thanks for dropping by.' From 89e3943cfad79e801a1c559f3cb78bacefe4f84e Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 3 Jan 2017 00:45:30 +0200 Subject: [PATCH 17/39] Update kickthemout.py --- kickthemout.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index d5a9d71..42a8721 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -84,7 +84,7 @@ def kickoneoff(): # TODO: do not allow only one device!! except KeyboardInterrupt: return except: - print("{0}[!] Please enter a number from the list!{1}").format(RED, END) + print("\n{0}ERROR: Please enter a number from the list!{1}").format(RED, END) one_target_mac = "" for host in hostsList: @@ -125,7 +125,7 @@ def kicksomeoff(): if host[0] == onlineIPs[i]: mac = host[1] vendor = resolveMac(mac) - print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t" + vendor + "{4}").format(YELLOW, WHITE, RED, GREEN, END) + print(" [{0}" + str(i) + "{1}] {2}" + str(onlineIPs[i]) + "{3}\t" + vendor + "{4}").format(YELLOW, WHITE, RED, GREEN, END) canBreak = False while not canBreak: @@ -135,7 +135,7 @@ def kicksomeoff(): some_targets = choice.split(",") canBreak = True else: - print("\n{0}ERROR:{1} Please select more than 1 devices from the list.{2}\n").format(RED, RED, END) + print("\n{0}ERROR: Please select more than 1 devices from the list.{2}\n").format(RED, END) except KeyboardInterrupt: return @@ -286,7 +286,7 @@ def main(): elif choice.upper() == 'CLEAR': os.system("clear||cls") else: - print("\n{0}ERROR:{1} Please select a valid option.{2}\n").format(RED, RED, END) + print("\n{0}ERROR: Please select a valid option.{2}\n").format(RED, END) except KeyboardInterrupt: print('\n\n{0}Thanks for dropping by.' From d89627ab807218b852baf19fafe06e179b1c2053 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 3 Jan 2017 00:48:39 +0200 Subject: [PATCH 18/39] Update kickthemout.py, scan.py, spoof.py --- kickthemout.py | 6 +----- scan.py | 4 ++-- spoof.py | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 42a8721..7e9b1bc 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -60,7 +60,7 @@ def scanNetwork(): regenOnlineIPs() -def kickoneoff(): # TODO: do not allow only one device!! +def kickoneoff(): os.system("clear||cls") print("\n{0}kickONEOff{1} selected...{2}\n").format(RED, GREEN, END) @@ -94,7 +94,6 @@ def kickoneoff(): # TODO: do not allow only one device!! print("\nIP address is not up. Please try again.") return - # print("\n{0}Target mac => '{1}" + one_target_mac + "{2}'{3}\n").format(GREEN, RED, GREEN, END) # {TESTING} print("\n{0}Target: {1}" + one_target_ip).format(GREEN, END) print("\n{0}Spoofing started... {1}").format(GREEN, END) @@ -276,13 +275,10 @@ def main(): raise SystemExit elif choice == '1': kickoneoff() - # EXECUTE kickoneoff FUNCTION (SCAN & PARSE) elif choice == '2': kicksomeoff() - # EXECUTE kicksomeoff FUNCTION elif choice == '3': kickalloff() - # EXECUTE kickalloff FUNCTION (FF:FF:FF:FF:FF:FF) elif choice.upper() == 'CLEAR': os.system("clear||cls") else: diff --git a/scan.py b/scan.py index be45e55..ef3f5c9 100644 --- a/scan.py +++ b/scan.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -.- coding: utf-8 -.- # scan.py -# author: Benedikt Waldvogel +# author: Benedikt Waldvogel (MIT Licensed) # edited by: k4m4 & xdavidhu import logging @@ -61,4 +61,4 @@ def scanNetwork(): continue if net: - return scan_and_print_neighbors(net, interface) + return scan_and_print_neighbors(net, interface) \ No newline at end of file diff --git a/spoof.py b/spoof.py index 0d72a98..95c491e 100644 --- a/spoof.py +++ b/spoof.py @@ -40,4 +40,4 @@ def sendPacket(my_mac, gateway_ip, target_ip, target_mac): packet = ether / arp sendp(x=packet, verbose=False) - broadcastPacket() + broadcastPacket() \ No newline at end of file From 8fe636dd628d6fd34b2d39e85d100b259a1e5a74 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 3 Jan 2017 00:53:45 +0200 Subject: [PATCH 19/39] Update kickthemout.py --- kickthemout.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 7e9b1bc..58c2519 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -32,7 +32,6 @@ def heading(): YELLOW, RED, YELLOW, BLUE).center(111) + '\n' + 'Version: {0}0.1{1}\n'.format(YELLOW, END).center(86)) - def optionBanner(): print('\nChoose option from menu:\n') sleep(0.2) @@ -44,7 +43,6 @@ def optionBanner(): sleep(0.2) print('\n\t{0}[{1}E{2}]{3} Exit KickThemOut\n').format(YELLOW, RED, YELLOW, WHITE) - def regenOnlineIPs(): global onlineIPs global defaultGatewayMac @@ -59,7 +57,6 @@ def scanNetwork(): hostsList = scan.scanNetwork() regenOnlineIPs() - def kickoneoff(): os.system("clear||cls") @@ -211,7 +208,6 @@ def kickalloff(): time.sleep(0.5) print("{0}Re-arped{1} targets successfully.{2}").format(RED, GREEN, END) - def getDefaultInterface(): def long2net(arg): if (arg <= 0 or arg >= 0xFFFFFFFF): @@ -257,7 +253,7 @@ def main(): print( "\n{0}Using interface '{1}" + defaultInterface + "{2}' with mac address '{3}" + defaultInterfaceMac + "{4}'.\nGateway IP: '{5}" - + defaultGatewayIP + "{6}'. {7}" + str(len(hostsList)) + "{8} hosts are up.{9}").format(GREEN, RED, GREEN, RED, GREEN, + + defaultGatewayIP + "{6}' --> {7}" + str(len(hostsList)) + "{8} hosts are up.{9}").format(GREEN, RED, GREEN, RED, GREEN, RED, GREEN, RED, GREEN, END) try: From 22c9f9de8d84cee78f837dd3c8dc895a47a0dd99 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 3 Jan 2017 00:56:47 +0200 Subject: [PATCH 20/39] Update kickthemout.py --- kickthemout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 58c2519..923bda8 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -148,7 +148,7 @@ def kicksomeoff(): print("\n{0}Targets: {1}" + some_ipList).format(GREEN, END) - print("\n{0}Spoofing started... {1}\n").format(GREEN, END) + print("\n{0}Spoofing started... {1}").format(GREEN, END) try: while True: for i in some_targets: @@ -185,7 +185,7 @@ def kickalloff(): vendor = resolveMac(mac) print(str(" {0}"+ str(onlineIPs[i]) + "{1}\t" + vendor + "{2}").format(RED, GREEN, END)) - print("\n{0}Spoofing started... {1}\n").format(GREEN, END) + print("\n{0}Spoofing started... {1}").format(GREEN, END) try: reScan = 0 while True: From 9eedcdece6e51a75ef831c911dedaaf25a4290d4 Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Tue, 3 Jan 2017 01:40:23 +0200 Subject: [PATCH 21/39] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 5f383d0..0996b5d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Nikolaos Kamarinakis +Copyright (c) 2017 Nikolaos Kamarinakis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 9473bd66bcbd98ae5f0f95115b31abc15f78e8dd Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Tue, 3 Jan 2017 02:09:27 +0200 Subject: [PATCH 22/39] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 511255c..2635d1e 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ KickThemOut =========== -`KickThemOut `_ - **Kick Devices Off Your LAN Network** +`KickThemOut `_ - **Kick Devices Off Your Network** From 523992d33cd41dcb7d1e3bf25466a8bf701d1e12 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Thu, 5 Jan 2017 13:18:02 +0200 Subject: [PATCH 23/39] Update README.rst & Create requirements.txt --- README.rst | 50 +++++++++++++++++++++++++++++++++++++++++++++++- requirements.txt | 1 + 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/README.rst b/README.rst index 2635d1e..88aa16d 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,52 @@ KickThemOut -=========== +============ `KickThemOut `_ - **Kick Devices Off Your Network** + +A tool to kick devices out of your network and enjoy all the bandwidth for yourself. +It allows you to select specific or all devices and ARP spoof them off your local area network. + +Compatible with Python 2.6 & 2.7. + +Authors: `Nikolaos Kamarinakis `_ & `David Schütz `_ + +.. image:: https://nikolaskama.me/... + +Installation +------------- + +You can download KickThemOut by cloning the `Git Repo `_ and simply installing its requirements:: + + $ git clone https://github.com/k4m4/kickthemout.git + + $ cd kickthemout + + $ pip install -r requirements.txt + +Demo +----- + +Here's a short demo: + +.. image:: https://nikolaskama.me/content/images/2017/01/kickthemout_asciinema.png + :target: https://asciinema.org/a/98200 + +(For more demos click `here `_) + +Disclaimer +----------- + +KickThemOut is provided as is under the MIT Licence (as stated below). +It is built for educational purposes only. If you choose to use it otherwise, the developers will not be held responsible. +In brief, do not use it with evil intent. + +License +-------- + +Copyright (c) 2017 by `Nikolaos Kamarinakis `_ & `David Schütz `_. All rights reserved. + +KickThemOut is under the terms of the `MIT License `_, following all clarifications stated in the `license file `_. + + +For more information head over to the `official project page `_. +You can also go ahead and email me anytime at **nikolaskam{at}gmail{dot}com** or David at **xdavid{at}protonmail{dot}com**. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..93b351f --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +scapy \ No newline at end of file From 4be5f9b0b8534c73a4e34c8baecd7a25f3ca79bc Mon Sep 17 00:00:00 2001 From: k4m4 Date: Thu, 5 Jan 2017 13:20:59 +0200 Subject: [PATCH 24/39] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 88aa16d..b54bd0b 100644 --- a/README.rst +++ b/README.rst @@ -10,7 +10,7 @@ Compatible with Python 2.6 & 2.7. Authors: `Nikolaos Kamarinakis `_ & `David Schütz `_ -.. image:: https://nikolaskama.me/... +.. image:: https://nikolaskama.me/content/images/2017/01/kickthemout.png Installation ------------- From 6ae6d3cac355aa58f735acc3f08357a8d6cc344e Mon Sep 17 00:00:00 2001 From: k4m4 Date: Thu, 5 Jan 2017 13:24:20 +0200 Subject: [PATCH 25/39] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index b54bd0b..240b4ce 100644 --- a/README.rst +++ b/README.rst @@ -29,7 +29,7 @@ Demo Here's a short demo: .. image:: https://nikolaskama.me/content/images/2017/01/kickthemout_asciinema.png - :target: https://asciinema.org/a/98200 + :target: https://asciinema.org/a/98200?autoplay=1 (For more demos click `here `_) From 519b97ebd6abb4b8aeef307d663d4cc62154c5ea Mon Sep 17 00:00:00 2001 From: k4m4 Date: Thu, 5 Jan 2017 13:27:50 +0200 Subject: [PATCH 26/39] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 240b4ce..7d1c149 100644 --- a/README.rst +++ b/README.rst @@ -29,7 +29,7 @@ Demo Here's a short demo: .. image:: https://nikolaskama.me/content/images/2017/01/kickthemout_asciinema.png - :target: https://asciinema.org/a/98200?autoplay=1 + :target: https://asciinema.org/a/98200?autoplay=1&loop=1 (For more demos click `here `_) From 3b0aea337b77b642de7b2786ac940b6ec0457ced Mon Sep 17 00:00:00 2001 From: k4m4 Date: Thu, 5 Jan 2017 14:08:12 +0200 Subject: [PATCH 27/39] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7d1c149..8d861cd 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ KickThemOut `KickThemOut `_ - **Kick Devices Off Your Network** A tool to kick devices out of your network and enjoy all the bandwidth for yourself. -It allows you to select specific or all devices and ARP spoof them off your local area network. +It allows you to select specific or all devices and ARP spoofs them off your local area network. Compatible with Python 2.6 & 2.7. From 64bdb7090e0d39b50f355c968c3980246af77186 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Thu, 5 Jan 2017 14:27:16 +0200 Subject: [PATCH 28/39] Create CHANGES.rst file --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 CHANGES.rst diff --git a/CHANGES.rst b/CHANGES.rst new file mode 100644 index 0000000..f4047ac --- /dev/null +++ b/CHANGES.rst @@ -0,0 +1,4 @@ +0.1 (05.01.2017) +---------------- + +- Initial release. From ba4522ee6c4323373d9913457fd6ca65182939eb Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Thu, 5 Jan 2017 16:43:21 +0200 Subject: [PATCH 29/39] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 8d861cd..8541582 100644 --- a/README.rst +++ b/README.rst @@ -43,10 +43,10 @@ In brief, do not use it with evil intent. License -------- -Copyright (c) 2017 by `Nikolaos Kamarinakis `_ & `David Schütz `_. All rights reserved. +Copyright (c) 2017 by `Nikolaos Kamarinakis `_ & `David Schütz `_. Some rights reserved. KickThemOut is under the terms of the `MIT License `_, following all clarifications stated in the `license file `_. For more information head over to the `official project page `_. -You can also go ahead and email me anytime at **nikolaskam{at}gmail{dot}com** or David at **xdavid{at}protonmail{dot}com**. \ No newline at end of file +You can also go ahead and email me anytime at **nikolaskam{at}gmail{dot}com** or David at **xdavid{at}protonmail{dot}com**. From eae1da8fc203edd6312f229b3d98e71de634253c Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Tue, 10 Jan 2017 13:49:30 +0200 Subject: [PATCH 30/39] Create .travis.yml --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a304c84 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: python +python: + - "2.6" + - "2.7" +script: + - python -c "import kickthemout; import scan; import spoof" From fbee3161c38b84330fb6c849e98a1c3df6e7bd47 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 10 Jan 2017 23:39:09 +0200 Subject: [PATCH 31/39] Resolve Issue #8 --- bluettack.sh | 4 ++++ kickthemout.py | 13 +++++++++---- scan.pyc | Bin 0 -> 2376 bytes 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 bluettack.sh create mode 100644 scan.pyc diff --git a/bluettack.sh b/bluettack.sh new file mode 100644 index 0000000..61d0de4 --- /dev/null +++ b/bluettack.sh @@ -0,0 +1,4 @@ +service bluetooth start +btscanner +spooftooph -i hci0 -a A0:02:DC:11:4F:85 -n Car537 + diff --git a/kickthemout.py b/kickthemout.py index 923bda8..d4d03c8 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -232,8 +232,14 @@ def getDefaultInterface(): return interface def getGatewayIP(): - getGateway_p = sr1(IP(dst="google.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False) - return getGateway_p.src + try: + 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 def resolveMac(mac): try: @@ -284,7 +290,6 @@ def main(): print('\n\n{0}Thanks for dropping by.' '\nCatch ya later!{1}').format(GREEN, END) - if __name__ == '__main__': defaultInterface = getDefaultInterface() @@ -292,4 +297,4 @@ if __name__ == '__main__': defaultInterfaceMac = get_if_hwaddr(defaultInterface) scanNetwork() - main() \ No newline at end of file + main() diff --git a/scan.pyc b/scan.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7b429d7ccd9d058eaf629e51d8cf6d1772ebf4d0 GIT binary patch literal 2376 zcmb7GUvC>l5TCvC|2R!al-30ySqMuf0ZtkTg$Gm>ND!5Rsm_!{Q7h|WZ=AEwch2oP z#K?Y0D*lLfo_XR!@Dchw_yl|a_|070B#+5;C$qb=J2Sue&8F_Z%a!^^@j;iaejNOM zieY|&=;5EDi0F_=6Acvg9J*9AaAfMTuC9!7beLZpDBRGCH}n!6mKHW;IxH{r3LRFc z=hACCZ%S zth?09(Q8F>MdyE$l{}Eaz@sPz*3%0*-KLmm22VJp?Ebmfg@MC1m+)2OYp+AWDVNeW3(F#<@T+JhX0UI= z!9IX)dlh8b>MBSc3_u&hd=D`b4A^~5bccp{N;laJFtE6exL~;MLUFi2#X4lMm7@WY zL~ukkWB?1cQ&ekv?4cDx&@-+ED`p)cj3V6+qI#_DC@{nNSrAQhSmzz4kess|><_%L zo2E$$PedpBTz-eKwRz0bWD@rf0MRJ0C$beKeUFoqNs#tE=p@24pl!S`IyD<{I7}jV z4n`ZpusgITdX!A;28a?j$5YGnh?2O!g#d*>oCv8JzAgvIzB!&X4D%(#+hSxWfe^m} zQh@=?0J*Z_9Xs>@G~rSMU&Q}}N!*_0P#eClW%%ZX*=U&XJ~Sb+WGWOEZDPa7NY0T> z0#RB?tUW#{!5&SmHXTI%W0DSUuQ1rQ2*bthl`iWX0M-RPpEvG`8b@rC&R5TN{7#(M zz=lb@iZxS(AhoKh>OMx!3AsRB_Q&8d*h0f9miy>Bm!@y75k;qE+ytD=GBlTv?ozog z(F@Xa=YJ3|1Pymy{Z71EkR~b804BHOG_4@T5`kLrt=}?c$=W{VEvpou?XcV+K)Gb*F(s3B~ zC7iE=$Y|-XR2vD!j8in_ab`FkYqTZbVv_DqTOnaz+mpoDqiN9Vr9xYdPOK0(cQ`Zn zmIe~>+V1mR|64hs&qM1mXMEur;{&fcWpw;C%q%al8?zT0o4oV3i$m0kttwgA5r)Ri2DHz{8|vcv{&* zCDV7YMou}uQm(Fh?xrd@HH;N!-6=Q)^r(uZ#Zyi_ajgnQ&J+FuI?QlHMfJ PPZ&kR{ZUnq)Hlxmt*75+ literal 0 HcmV?d00001 From e0e378d8cfeda185ce834ee530fa9f76867ee302 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 10 Jan 2017 23:39:41 +0200 Subject: [PATCH 32/39] Resolve Issue #8 --- bluettack.sh | 4 ---- scan.pyc | Bin 2376 -> 0 bytes 2 files changed, 4 deletions(-) delete mode 100644 bluettack.sh delete mode 100644 scan.pyc diff --git a/bluettack.sh b/bluettack.sh deleted file mode 100644 index 61d0de4..0000000 --- a/bluettack.sh +++ /dev/null @@ -1,4 +0,0 @@ -service bluetooth start -btscanner -spooftooph -i hci0 -a A0:02:DC:11:4F:85 -n Car537 - diff --git a/scan.pyc b/scan.pyc deleted file mode 100644 index 7b429d7ccd9d058eaf629e51d8cf6d1772ebf4d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2376 zcmb7GUvC>l5TCvC|2R!al-30ySqMuf0ZtkTg$Gm>ND!5Rsm_!{Q7h|WZ=AEwch2oP z#K?Y0D*lLfo_XR!@Dchw_yl|a_|070B#+5;C$qb=J2Sue&8F_Z%a!^^@j;iaejNOM zieY|&=;5EDi0F_=6Acvg9J*9AaAfMTuC9!7beLZpDBRGCH}n!6mKHW;IxH{r3LRFc z=hACCZ%S zth?09(Q8F>MdyE$l{}Eaz@sPz*3%0*-KLmm22VJp?Ebmfg@MC1m+)2OYp+AWDVNeW3(F#<@T+JhX0UI= z!9IX)dlh8b>MBSc3_u&hd=D`b4A^~5bccp{N;laJFtE6exL~;MLUFi2#X4lMm7@WY zL~ukkWB?1cQ&ekv?4cDx&@-+ED`p)cj3V6+qI#_DC@{nNSrAQhSmzz4kess|><_%L zo2E$$PedpBTz-eKwRz0bWD@rf0MRJ0C$beKeUFoqNs#tE=p@24pl!S`IyD<{I7}jV z4n`ZpusgITdX!A;28a?j$5YGnh?2O!g#d*>oCv8JzAgvIzB!&X4D%(#+hSxWfe^m} zQh@=?0J*Z_9Xs>@G~rSMU&Q}}N!*_0P#eClW%%ZX*=U&XJ~Sb+WGWOEZDPa7NY0T> z0#RB?tUW#{!5&SmHXTI%W0DSUuQ1rQ2*bthl`iWX0M-RPpEvG`8b@rC&R5TN{7#(M zz=lb@iZxS(AhoKh>OMx!3AsRB_Q&8d*h0f9miy>Bm!@y75k;qE+ytD=GBlTv?ozog z(F@Xa=YJ3|1Pymy{Z71EkR~b804BHOG_4@T5`kLrt=}?c$=W{VEvpou?XcV+K)Gb*F(s3B~ zC7iE=$Y|-XR2vD!j8in_ab`FkYqTZbVv_DqTOnaz+mpoDqiN9Vr9xYdPOK0(cQ`Zn zmIe~>+V1mR|64hs&qM1mXMEur;{&fcWpw;C%q%al8?zT0o4oV3i$m0kttwgA5r)Ri2DHz{8|vcv{&* zCDV7YMou}uQm(Fh?xrd@HH;N!-6=Q)^r(uZ#Zyi_ajgnQ&J+FuI?QlHMfJ PPZ&kR{ZUnq)Hlxmt*75+ From 5b85021fb4c554843549cba5e2c3930613d34319 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Tue, 10 Jan 2017 23:41:31 +0200 Subject: [PATCH 33/39] 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: From dd2b29dfe69ed4d52cd03e18b1388f074ada7d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sch=C3=BCtz?= Date: Wed, 11 Jan 2017 07:13:26 +0100 Subject: [PATCH 34/39] Issue #9 fix --- kickthemout.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 2304f96..9e0f76d 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -236,10 +236,10 @@ def getGatewayIP(): 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: From 1c2eef2c1b7e4ccfc368ddfebe2eebd6cb64e700 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Wed, 11 Jan 2017 16:29:56 +0200 Subject: [PATCH 35/39] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 8541582..2a5dda4 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ It allows you to select specific or all devices and ARP spoofs them off your loc Compatible with Python 2.6 & 2.7. -Authors: `Nikolaos Kamarinakis `_ & `David Schütz `_ +Authors: `Nikolaos Kamarinakis `_ & `David Schütz `_. .. image:: https://nikolaskama.me/content/images/2017/01/kickthemout.png @@ -31,7 +31,7 @@ Here's a short demo: .. image:: https://nikolaskama.me/content/images/2017/01/kickthemout_asciinema.png :target: https://asciinema.org/a/98200?autoplay=1&loop=1 -(For more demos click `here `_) +(For more demos click `here `_.) Disclaimer ----------- From 2aa39a3f260b82e7f528f3b4253f8277cc06f357 Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Thu, 12 Jan 2017 00:03:52 +0200 Subject: [PATCH 36/39] Resolve Issue #8 --- kickthemout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kickthemout.py b/kickthemout.py index 9e0f76d..1a532a1 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -236,7 +236,7 @@ def getGatewayIP(): 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) + print("\n{0}ERROR: Gateway IP could not be obtained. Please enter IP manually.{1}\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 From a9b16b480ad3e462af035a0c80f12d14433a9d17 Mon Sep 17 00:00:00 2001 From: k4m4 Date: Fri, 13 Jan 2017 13:53:35 +0200 Subject: [PATCH 37/39] Update kickthemout.py --- kickthemout.py | 16 ++++++++++------ scan.pyc | Bin 0 -> 2376 bytes 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 scan.pyc diff --git a/kickthemout.py b/kickthemout.py index 1a532a1..260e840 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -9,14 +9,18 @@ See License at nikolaskama.me (https://nikolaskama.me/kickthemoutproject) """ import time, os, sys, logging, math -import scan, spoof from time import sleep import urllib2 as urllib -logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy! -from scapy.all import * - BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033[1;35m', '\033[1;32m', '\033[0m' +logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy! +try: + from scapy.all import * + import scan, spoof +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}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 def heading(): sys.stdout.write(GREEN + """ @@ -131,7 +135,7 @@ def kicksomeoff(): some_targets = choice.split(",") canBreak = True else: - print("\n{0}ERROR: Please select more than 1 devices from the list.{2}\n").format(RED, END) + print("\n{0}ERROR: Please select more than 1 devices from the list.{1}\n").format(RED, END) except KeyboardInterrupt: return @@ -284,7 +288,7 @@ def main(): elif choice.upper() == 'CLEAR': os.system("clear||cls") else: - print("\n{0}ERROR: Please select a valid option.{2}\n").format(RED, END) + print("\n{0}ERROR: Please select a valid option.{1}\n").format(RED, END) except KeyboardInterrupt: print('\n\n{0}Thanks for dropping by.' diff --git a/scan.pyc b/scan.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7b429d7ccd9d058eaf629e51d8cf6d1772ebf4d0 GIT binary patch literal 2376 zcmb7GUvC>l5TCvC|2R!al-30ySqMuf0ZtkTg$Gm>ND!5Rsm_!{Q7h|WZ=AEwch2oP z#K?Y0D*lLfo_XR!@Dchw_yl|a_|070B#+5;C$qb=J2Sue&8F_Z%a!^^@j;iaejNOM zieY|&=;5EDi0F_=6Acvg9J*9AaAfMTuC9!7beLZpDBRGCH}n!6mKHW;IxH{r3LRFc z=hACCZ%S zth?09(Q8F>MdyE$l{}Eaz@sPz*3%0*-KLmm22VJp?Ebmfg@MC1m+)2OYp+AWDVNeW3(F#<@T+JhX0UI= z!9IX)dlh8b>MBSc3_u&hd=D`b4A^~5bccp{N;laJFtE6exL~;MLUFi2#X4lMm7@WY zL~ukkWB?1cQ&ekv?4cDx&@-+ED`p)cj3V6+qI#_DC@{nNSrAQhSmzz4kess|><_%L zo2E$$PedpBTz-eKwRz0bWD@rf0MRJ0C$beKeUFoqNs#tE=p@24pl!S`IyD<{I7}jV z4n`ZpusgITdX!A;28a?j$5YGnh?2O!g#d*>oCv8JzAgvIzB!&X4D%(#+hSxWfe^m} zQh@=?0J*Z_9Xs>@G~rSMU&Q}}N!*_0P#eClW%%ZX*=U&XJ~Sb+WGWOEZDPa7NY0T> z0#RB?tUW#{!5&SmHXTI%W0DSUuQ1rQ2*bthl`iWX0M-RPpEvG`8b@rC&R5TN{7#(M zz=lb@iZxS(AhoKh>OMx!3AsRB_Q&8d*h0f9miy>Bm!@y75k;qE+ytD=GBlTv?ozog z(F@Xa=YJ3|1Pymy{Z71EkR~b804BHOG_4@T5`kLrt=}?c$=W{VEvpou?XcV+K)Gb*F(s3B~ zC7iE=$Y|-XR2vD!j8in_ab`FkYqTZbVv_DqTOnaz+mpoDqiN9Vr9xYdPOK0(cQ`Zn zmIe~>+V1mR|64hs&qM1mXMEur;{&fcWpw;C%q%al8?zT0o4oV3i$m0kttwgA5r)Ri2DHz{8|vcv{&* zCDV7YMou}uQm(Fh?xrd@HH;N!-6=Q)^r(uZ#Zyi_ajgnQ&J+FuI?QlHMfJ PPZ&kR{ZUnq)Hlxmt*75+ literal 0 HcmV?d00001 From 999ccc6b1a5f63aad6d9373c490c736cfafea45d Mon Sep 17 00:00:00 2001 From: k4m4 Date: Fri, 13 Jan 2017 14:00:31 +0200 Subject: [PATCH 38/39] Minor Bugfixes --- scan.pyc | Bin 2376 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 scan.pyc diff --git a/scan.pyc b/scan.pyc deleted file mode 100644 index 7b429d7ccd9d058eaf629e51d8cf6d1772ebf4d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2376 zcmb7GUvC>l5TCvC|2R!al-30ySqMuf0ZtkTg$Gm>ND!5Rsm_!{Q7h|WZ=AEwch2oP z#K?Y0D*lLfo_XR!@Dchw_yl|a_|070B#+5;C$qb=J2Sue&8F_Z%a!^^@j;iaejNOM zieY|&=;5EDi0F_=6Acvg9J*9AaAfMTuC9!7beLZpDBRGCH}n!6mKHW;IxH{r3LRFc z=hACCZ%S zth?09(Q8F>MdyE$l{}Eaz@sPz*3%0*-KLmm22VJp?Ebmfg@MC1m+)2OYp+AWDVNeW3(F#<@T+JhX0UI= z!9IX)dlh8b>MBSc3_u&hd=D`b4A^~5bccp{N;laJFtE6exL~;MLUFi2#X4lMm7@WY zL~ukkWB?1cQ&ekv?4cDx&@-+ED`p)cj3V6+qI#_DC@{nNSrAQhSmzz4kess|><_%L zo2E$$PedpBTz-eKwRz0bWD@rf0MRJ0C$beKeUFoqNs#tE=p@24pl!S`IyD<{I7}jV z4n`ZpusgITdX!A;28a?j$5YGnh?2O!g#d*>oCv8JzAgvIzB!&X4D%(#+hSxWfe^m} zQh@=?0J*Z_9Xs>@G~rSMU&Q}}N!*_0P#eClW%%ZX*=U&XJ~Sb+WGWOEZDPa7NY0T> z0#RB?tUW#{!5&SmHXTI%W0DSUuQ1rQ2*bthl`iWX0M-RPpEvG`8b@rC&R5TN{7#(M zz=lb@iZxS(AhoKh>OMx!3AsRB_Q&8d*h0f9miy>Bm!@y75k;qE+ytD=GBlTv?ozog z(F@Xa=YJ3|1Pymy{Z71EkR~b804BHOG_4@T5`kLrt=}?c$=W{VEvpou?XcV+K)Gb*F(s3B~ zC7iE=$Y|-XR2vD!j8in_ab`FkYqTZbVv_DqTOnaz+mpoDqiN9Vr9xYdPOK0(cQ`Zn zmIe~>+V1mR|64hs&qM1mXMEur;{&fcWpw;C%q%al8?zT0o4oV3i$m0kttwgA5r)Ri2DHz{8|vcv{&* zCDV7YMou}uQm(Fh?xrd@HH;N!-6=Q)^r(uZ#Zyi_ajgnQ&J+FuI?QlHMfJ PPZ&kR{ZUnq)Hlxmt*75+ From 8af0593ded0fce7266b41f5873ba5e92108dbdd4 Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Fri, 13 Jan 2017 14:06:14 +0200 Subject: [PATCH 39/39] Create .gitignore --- .gitignore | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92fd214 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +*.egg +*.manifest +*.spec +pip-log.txt +pip-delete-this-directory.txt +.scrapy +target/ +.python-version +venv/ +ENV/ +*.pyc +*.tmp +*.bak +*.cfg