From b5345a38d9aa8c840816111f68cd41a0fe0579f0 Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Tue, 6 Sep 2022 10:05:41 -0400 Subject: [PATCH] Agent: Rename TCPConnectionHandler parameters Co-authored-by: Mike Salvatore --- .../network/relay/tcp_connection_handler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/monkey/infection_monkey/network/relay/tcp_connection_handler.py b/monkey/infection_monkey/network/relay/tcp_connection_handler.py index 6064e378b..d8c7b8337 100644 --- a/monkey/infection_monkey/network/relay/tcp_connection_handler.py +++ b/monkey/infection_monkey/network/relay/tcp_connection_handler.py @@ -10,19 +10,19 @@ class TCPConnectionHandler(Thread): def __init__( self, - local_port: int, - local_host: str = "", + bind_host: str, + bind_port: int, client_connected: List[Callable[[socket.socket], None]] = [], ): - self.local_port = local_port - self.local_host = local_host + self.local_port = bind_port + self.local_host = bind_host self._client_connected = client_connected super().__init__(name="TCPConnectionHandler", daemon=True) self._stopped = Event() def run(self): l_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - l_socket.bind((self.local_host, self.local_port)) + l_socket.bind((self.bind_host, self.bind_port)) l_socket.settimeout(PROXY_TIMEOUT) l_socket.listen(5)