Agent: Rename on_potential_new_user to add_potential_user

This commit is contained in:
Ilija Lazoroski 2022-09-01 13:38:31 +02:00
parent a754963222
commit 43a1ddb714
3 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ class TCPRelay(Thread):
with self._lock:
return self._relay_users.copy()
def on_potential_new_user(self, user_address: IPv4Address):
def add_potential_user(self, user_address: IPv4Address):
"""
Notify TCPRelay that a new user may try and connect.

View File

@ -41,6 +41,6 @@ def _(
if telemetry.propagation_result is True:
tunnel.set_wait_for_exploited_machines()
if relay:
relay.on_potential_new_user(str(telemetry.host["ip_addr"]))
relay.add_potential_user(str(telemetry.host["ip_addr"]))
telemetry_messenger.send_telemetry(telemetry)

View File

@ -57,7 +57,7 @@ def test_user_removed_on_request(tcp_relay):
# new_user = "0.0.0.1"
# relay.start()
# relay.on_potential_new_user(new_user)
# relay.add_potential_user(new_user)
# relay.stop()
# assert not join_or_kill_thread(relay, 0.1) # Should be waiting