mirror of
https://github.com/k4m4/kickthemout.git
synced 2025-07-15 14:09:03 +02:00
Merge 1812f2af53
into 861aea2102
This commit is contained in:
commit
c022f92cc8
1 changed files with 10 additions and 4 deletions
|
@ -27,7 +27,7 @@ def shutdown():
|
||||||
|
|
||||||
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy!
|
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Shut up scapy!
|
||||||
try:
|
try:
|
||||||
from scapy.config import conf
|
from scapy.config import conf
|
||||||
conf.ipv6_enabled = False
|
conf.ipv6_enabled = False
|
||||||
from scapy.all import *
|
from scapy.all import *
|
||||||
import scan, spoof, nmap
|
import scan, spoof, nmap
|
||||||
|
@ -184,6 +184,8 @@ def getDefaultInterfaceMAC():
|
||||||
# retrieve gateway IP
|
# retrieve gateway IP
|
||||||
def getGatewayIP():
|
def getGatewayIP():
|
||||||
global stopAnimation
|
global stopAnimation
|
||||||
|
if options.gateway:
|
||||||
|
return options.gateway
|
||||||
try:
|
try:
|
||||||
getGateway, timeout = sr1(IP(dst="github.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False, timeout=4)
|
getGateway, timeout = sr1(IP(dst="github.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False, timeout=4)
|
||||||
if timeout:
|
if timeout:
|
||||||
|
@ -578,7 +580,7 @@ def kickalloff():
|
||||||
hostname = "N/A"
|
hostname = "N/A"
|
||||||
vendor = resolveMac(mac)
|
vendor = resolveMac(mac)
|
||||||
print(" [{}{}{}] {}{}{}\t{}{}\t{} ({}{}{}){}".format(YELLOW, str(i), WHITE, RED, str(onlineIPs[i]), BLUE, mac, GREEN, vendor, YELLOW, hostname, GREEN, END))
|
print(" [{}{}{}] {}{}{}\t{}{}\t{} ({}{}{}){}".format(YELLOW, str(i), WHITE, RED, str(onlineIPs[i]), BLUE, mac, GREEN, vendor, YELLOW, hostname, GREEN, END))
|
||||||
|
|
||||||
if options.packets is not None:
|
if options.packets is not None:
|
||||||
print("\n{}Spoofing started... {}( {} pkts/min )".format(GREEN, END, str(options.packets)))
|
print("\n{}Spoofing started... {}( {} pkts/min )".format(GREEN, END, str(options.packets)))
|
||||||
else:
|
else:
|
||||||
|
@ -683,14 +685,14 @@ def main():
|
||||||
t = threading.Thread(target=scanningAnimation, args=('Scanning your network, hang on...',))
|
t = threading.Thread(target=scanningAnimation, args=('Scanning your network, hang on...',))
|
||||||
t.daemon = True
|
t.daemon = True
|
||||||
t.start()
|
t.start()
|
||||||
|
|
||||||
# commence scanning process
|
# commence scanning process
|
||||||
try:
|
try:
|
||||||
scanNetwork()
|
scanNetwork()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
shutdown()
|
shutdown()
|
||||||
stopAnimation = True
|
stopAnimation = True
|
||||||
|
|
||||||
print("\nOnline IPs: ")
|
print("\nOnline IPs: ")
|
||||||
for i in range(len(onlineIPs)):
|
for i in range(len(onlineIPs)):
|
||||||
mac = ""
|
mac = ""
|
||||||
|
@ -740,6 +742,10 @@ if __name__ == '__main__':
|
||||||
callback=targetList, type='string',
|
callback=targetList, type='string',
|
||||||
dest='targets', help='specify target IP address(es) and perform attack')
|
dest='targets', help='specify target IP address(es) and perform attack')
|
||||||
|
|
||||||
|
parser.add_option('-g', '--gateway', action='callback',
|
||||||
|
callback=(lambda option, opt, value, parser: setattr(parser.values, option.dest, value)), type='string',
|
||||||
|
dest='gateway', help='specify gateway IP address')
|
||||||
|
|
||||||
(options, argv) = parser.parse_args()
|
(options, argv) = parser.parse_args()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue