DHCP poisoner now takes into account the requested IP of clients WPAD server address

Specifying interface is now optional
This commit is contained in:
byt3bl33d3r 2015-07-30 16:56:11 +02:00
parent 87bca5e7dd
commit 8270f337ad
6 changed files with 48 additions and 48 deletions

View file

@ -24,7 +24,7 @@ import sys
from commands import getstatusoutput
from core.logger import logger
from core.sergioproxy.ProxyPlugins import ProxyPlugins
from scapy.all import get_if_addr, get_if_hwaddr
from scapy.all import get_if_addr, get_if_hwaddr, get_working_if
formatter = logging.Formatter("%(asctime)s [Utils] %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
log = logger().setup_logger("Utils", formatter)
@ -45,6 +45,11 @@ def set_ip_forwarding(value):
file.write(str(value))
file.close()
def get_iface():
iface = get_working_if()
log.debug("Interface {} seems to be up and running")
return iface
def get_ip(interface):
try:
ip_address = get_if_addr(interface)