forked from p15670423/monkey
Agent: Use 'relay_port' for relay local port
This commit is contained in:
parent
b74c42ff07
commit
33da121465
|
@ -181,9 +181,9 @@ class InfectionMonkey:
|
|||
|
||||
config = control_channel.get_config()
|
||||
|
||||
local_port = get_free_tcp_port()
|
||||
relay_port = get_free_tcp_port()
|
||||
self._relay = TCPRelay(
|
||||
local_port,
|
||||
relay_port,
|
||||
IPv4Address(self._cmd_island_ip),
|
||||
self._cmd_island_port,
|
||||
client_disconnect_timeout=config.keep_tunnel_open_time,
|
||||
|
|
|
@ -18,7 +18,7 @@ class TCPRelay(Thread, InterruptableThreadMixin):
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
local_port: int,
|
||||
relay_port: int,
|
||||
dest_addr: IPv4Address,
|
||||
dest_port: int,
|
||||
client_disconnect_timeout: float,
|
||||
|
@ -28,7 +28,7 @@ class TCPRelay(Thread, InterruptableThreadMixin):
|
|||
relay_filter = RelayConnectionHandler(self._pipe_spawner, self._user_handler)
|
||||
self._connection_handler = TCPConnectionHandler(
|
||||
bind_host="",
|
||||
bind_port=local_port,
|
||||
bind_port=relay_port,
|
||||
client_connected=[
|
||||
relay_filter.handle_new_connection,
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue