import socket

HOST = "torang-munara.my.id"
PORT = 5364
IAC = b"\xff"
DO_SUPPRESS_GO_AHEAD = IAC + b"\xfd\x03"

with socket.create_connection((HOST, PORT), timeout=5) as sock:
    sock.settimeout(4)
    sock.sendall(DO_SUPPRESS_GO_AHEAD)
    try:
        data = sock.recv(128)
    except socket.timeout:
        data = b""

print("telnet_control_response=" + ("yes" if IAC in data else "no"))
