forked from p15670423/monkey
Agent: Remove disused is_running_on_island() function
This commit is contained in:
parent
c0d1df6252
commit
c1c04d804f
|
@ -4,9 +4,7 @@ import socket
|
||||||
import struct
|
import struct
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from common.network.network_utils import get_host_from_network_location
|
from infection_monkey.network.info import get_routes
|
||||||
from infection_monkey.config import WormConfiguration
|
|
||||||
from infection_monkey.network.info import get_routes, local_ips
|
|
||||||
|
|
||||||
DEFAULT_TIMEOUT = 10
|
DEFAULT_TIMEOUT = 10
|
||||||
BANNER_READ = 1024
|
BANNER_READ = 1024
|
||||||
|
@ -117,13 +115,3 @@ def get_interface_to_target(dst):
|
||||||
paths.sort()
|
paths.sort()
|
||||||
ret = paths[-1][1]
|
ret = paths[-1][1]
|
||||||
return ret[1]
|
return ret[1]
|
||||||
|
|
||||||
|
|
||||||
def is_running_on_island():
|
|
||||||
current_server_without_port = get_host_from_network_location(WormConfiguration.current_server)
|
|
||||||
running_on_island = is_running_on_server(current_server_without_port)
|
|
||||||
return running_on_island and WormConfiguration.depth == WormConfiguration.max_depth
|
|
||||||
|
|
||||||
|
|
||||||
def is_running_on_server(ip: str) -> bool:
|
|
||||||
return ip in local_ips()
|
|
||||||
|
|
Loading…
Reference in New Issue