#2710 - commit before changing branch
This commit is contained in:
@@ -145,7 +145,6 @@ class Terminal(Service):
|
||||
def validate_user(self, user: Dict[str]) -> bool:
|
||||
return True if user.get("username") in self.user_connections else False
|
||||
|
||||
|
||||
def _ssh_process_logoff(self, dest_ip_address: IPv4Address, user_account: dict, **kwargs) -> bool:
|
||||
"""Process the logoff attempt. Return a bool if succesful or unsuccessful."""
|
||||
|
||||
@@ -164,7 +163,11 @@ class Terminal(Service):
|
||||
"""Send confirmation of successful disconnect"""
|
||||
transport_message = SSHTransportMessage.SSH_MSG_SERVICE_SUCCESS
|
||||
connection_message = SSHConnectionMessage.SSH_MSG_CHANNEL_CLOSE
|
||||
payload: SSHPacket = SSHPacket(transport_message=transport_message, connection_message=connection_message, ssh_output=RequestResponse(status="success"))
|
||||
payload: SSHPacket = SSHPacket(
|
||||
transport_message=transport_message,
|
||||
connection_message=connection_message,
|
||||
ssh_output=RequestResponse(status="success"),
|
||||
)
|
||||
self.send(payload=payload)
|
||||
|
||||
def receive(self, payload: SSHPacket, session_id: str, **kwargs) -> bool:
|
||||
@@ -191,7 +194,6 @@ class Terminal(Service):
|
||||
self.send(payload=result, session_id=session_id)
|
||||
return True
|
||||
|
||||
|
||||
# %% Outbound
|
||||
|
||||
def login(self, dest_ip_address: IPv4Address) -> bool:
|
||||
@@ -268,7 +270,6 @@ class Terminal(Service):
|
||||
self.connected = False
|
||||
return True
|
||||
|
||||
|
||||
def send(
|
||||
self,
|
||||
payload: SSHPacket,
|
||||
@@ -276,4 +277,3 @@ class Terminal(Service):
|
||||
session_id: Optional[str] = None,
|
||||
) -> bool:
|
||||
return super().send(payload=payload, dest_ip_address=dest_ip_address, dest_port=Port.SSH, session_id=session_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user