gateway: Fix setup TELNET windows size for server without auth

This commit is contained in:
remittor
2025-04-20 12:34:50 +03:00
parent a854c4a6a3
commit a702295a8d
+2
View File
@@ -810,6 +810,8 @@ class Gateway():
tn.sock.sendall(IAC + SB + NAWS + b'\x03\xE8\x00\x20' + IAC + SE) tn.sock.sendall(IAC + SB + NAWS + b'\x03\xE8\x00\x20' + IAC + SE)
if idx > 0: if idx > 0:
tn.prompt = obj.group() tn.prompt = obj.group()
tn.write(b"echo 123 >/dev/null\n")
tn.read_until(b'\r\n' + tn.prompt, timeout = 2)
return tn return tn
tn.write(f"{self.login}\n".encode('ascii')) tn.write(f"{self.login}\n".encode('ascii'))
idx, obj, output = tn.expect([p_passw, prompt], timeout=2) idx, obj, output = tn.expect([p_passw, prompt], timeout=2)