mirror of
https://github.com/k4m4/kickthemout.git
synced 2025-07-15 14:09:03 +02:00
Fix ValueError #284
Scapy return a new tuple for routes : (dst_int, msk_int, gw_str, iff, ifaddr, metric), so fix the code.
This commit is contained in:
parent
7930fefb73
commit
2991496ee3
1 changed files with 2 additions and 2 deletions
|
@ -151,7 +151,7 @@ def getDefaultInterface(returnNet=False):
|
|||
return net
|
||||
|
||||
iface_routes = [route for route in scapy.config.conf.route.routes if route[3] == scapy.config.conf.iface and route[1] != 0xFFFFFFFF]
|
||||
network, netmask, _, interface, address = max(iface_routes, key=lambda item:item[1])
|
||||
network, netmask, _, interface, address, _ = max(iface_routes, key=lambda item:item[1])
|
||||
net = to_CIDR_notation(network, netmask)
|
||||
if net:
|
||||
if returnNet:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue