forked from p15670423/monkey
Agent: Replace get_local_network_interfaces
Replaced get_local_network_interfaces() with get_network_interfaces()
This commit is contained in:
parent
b10327af5c
commit
a954df3ed8
|
@ -41,7 +41,7 @@ from infection_monkey.master import AutomatedMaster
|
||||||
from infection_monkey.master.control_channel import ControlChannel
|
from infection_monkey.master.control_channel import ControlChannel
|
||||||
from infection_monkey.model import VictimHostFactory
|
from infection_monkey.model import VictimHostFactory
|
||||||
from infection_monkey.network.firewall import app as firewall
|
from infection_monkey.network.firewall import app as firewall
|
||||||
from infection_monkey.network.info import get_local_network_interfaces
|
from infection_monkey.network.info import get_network_interfaces
|
||||||
from infection_monkey.network_scanning.elasticsearch_fingerprinter import ElasticSearchFingerprinter
|
from infection_monkey.network_scanning.elasticsearch_fingerprinter import ElasticSearchFingerprinter
|
||||||
from infection_monkey.network_scanning.http_fingerprinter import HTTPFingerprinter
|
from infection_monkey.network_scanning.http_fingerprinter import HTTPFingerprinter
|
||||||
from infection_monkey.network_scanning.mssql_fingerprinter import MSSQLFingerprinter
|
from infection_monkey.network_scanning.mssql_fingerprinter import MSSQLFingerprinter
|
||||||
|
@ -240,7 +240,7 @@ class InfectionMonkey:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_local_network_interfaces() -> List[IPv4Interface]:
|
def _get_local_network_interfaces() -> List[IPv4Interface]:
|
||||||
local_network_interfaces = get_local_network_interfaces()
|
local_network_interfaces = get_network_interfaces()
|
||||||
for interface in local_network_interfaces:
|
for interface in local_network_interfaces:
|
||||||
logger.debug(f"Found local interface {str(interface)}")
|
logger.debug(f"Found local interface {str(interface)}")
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,6 @@ class NetworkAddress:
|
||||||
|
|
||||||
|
|
||||||
def get_network_interfaces() -> List[IPv4Interface]:
|
def get_network_interfaces() -> List[IPv4Interface]:
|
||||||
return get_local_network_interfaces()
|
|
||||||
|
|
||||||
|
|
||||||
def get_local_network_interfaces() -> List[IPv4Interface]:
|
|
||||||
return [IPv4Interface(f"{i['addr']}/{i['netmask']}") for i in get_host_subnets()]
|
return [IPv4Interface(f"{i['addr']}/{i['netmask']}") for i in get_host_subnets()]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue