mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-25 14:34:23 +01:00
commit
29ac161434
@ -41,7 +41,7 @@ MacOS Installation
|
|||||||
|
|
||||||
If you would like to install KickThemOut on a Mac, please run the following::
|
If you would like to install KickThemOut on a Mac, please run the following::
|
||||||
|
|
||||||
$ sudo python -m pip install pcapy
|
$ sudo pip install pcapy
|
||||||
|
|
||||||
$ brew install libdnet scapy nmap
|
$ brew install libdnet scapy nmap
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ If you would like to install KickThemOut on a Mac, please run the following::
|
|||||||
|
|
||||||
$ cd kickthemout/
|
$ cd kickthemout/
|
||||||
|
|
||||||
$ sudo python -m pip install -r requirements.txt
|
$ sudo pip install -r requirements.txt
|
||||||
|
|
||||||
**NOTE**: You need to have `Homebrew <http://brew.sh/>`_ installed before running the Mac OS installation.
|
**NOTE**: You need to have `Homebrew <http://brew.sh/>`_ installed before running the Mac OS installation.
|
||||||
|
|
||||||
|
@ -352,20 +352,15 @@ def getDefaultInterface(returnNet=False):
|
|||||||
if netmask < 16:
|
if netmask < 16:
|
||||||
return None
|
return None
|
||||||
return net
|
return net
|
||||||
for network, netmask, _, interface, address in scapy.config.conf.route.routes:
|
|
||||||
# loop through IPs (skip if local)
|
iface_routes = [route for route in scapy.config.conf.route.routes if route[3] == scapy.config.conf.iface and route[1] != 0xFFFFFFFF]
|
||||||
if network == 0 or interface == 'lo' or address == '127.0.0.1' or address == '0.0.0.0':
|
network, netmask, _, interface, address = max(iface_routes, key=lambda item:item[1])
|
||||||
continue
|
net = to_CIDR_notation(network, netmask)
|
||||||
if netmask <= 0 or netmask == 0xFFFFFFFF:
|
if net:
|
||||||
continue
|
if returnNet:
|
||||||
net = to_CIDR_notation(network, netmask)
|
return net
|
||||||
if interface != scapy.config.conf.iface:
|
else:
|
||||||
continue
|
return interface
|
||||||
if net:
|
|
||||||
if returnNet:
|
|
||||||
return net
|
|
||||||
else:
|
|
||||||
return interface
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user