Closed mssalvatore closed 1 year ago
This is what I've done already:
from ipaddress import IPv4Address
from common.base_models import InfectionMonkeyBaseModel
class SocketAddress(InfectionMonkeyBaseModel):
"""
Combination of IP address and port
Attributes:
:param ip_address: IP address
:param port: Port
"""
ip_address: IPv4Address
port: int
Refactor
Component(s) to be refactored
Explanation
A more specific data type is needed to define an IP/Port combination representing the Island server. We'll define a new type called
common.types.SocketAddress
. It should look something like:Tasks
common.types.SocketAddress
(0d) @ilija-lazoroski--servers
cli argument intoSequence[SocketAddress]
(0d) @cakekoaIIslandAPIClient
andHTTPIslandAPIClient
to useSocketAddress
instead ofstr
(0d) @cakekoa_running_on_island()
to useSocketAddress
(0.0d) @cakekoaSocketAddress
(0d) - @shreyamalviyaTCPRelay.__init__()
TCPPipeSpawner.__init__()
sent_remove_from_waitlist_control_message_to_relays()
notify_disconnect()
AgentRegistrationData
to useSocketAddress
forcc_server
(0d) - @shreyamalviya