4 ms·
~/work/...> telnet towel.blinkenlights.nl zsh: command not found: telnet
by tgv 9mo ago
~/work/...> telnet towel.blinkenlights.nl
zsh: command not found: telnet
- MonkeyClub 9mo agoMay be a case of PEBKAC.
- Bender 9mo agoSearch your OS repositories for something like inetutils-telnet.
- tgv 9mo agoI know. It's just that out-of-the-box, telnet isn't even installed anymore.
- Bender 9mo agotelnet isn't even installed anymore. This is expected. Telnet is not encrypted and people are discouraged from using the client or the inetd daemon. It is assumed that if someone installs it manually it is more likely they have a reason to do so and hopefully understand the risks. It will always exist in repositories as there are still a myriad of enterprise appliances that use telnet for management and likely will be the case for the foreseeable future.
- fragmede 9mo agonetcat is though
- chasd00 9mo agoi bet this is something an ai could help with. "write a simple telnet client in python. It only needs to connect to the host and display what the host sends. conform to any connection initialization requirements per rfc 854". That would probably get you close. /edit front page of google did this and it worked for me. Need to do a pip install telnetlib3 import telnetlib3 import sys def simple_telnet_client(host, port=23): """ Connects to a telnet server and prints incoming data. Compliant with RFC 854 (via telnetlib handling of NVTs). """ try: # Initialize connection print(f"Connecting to {host}:{port}...") tn = telnetlib3.Telnet(host, port) # Read and display output indefinitely until connection closes while True: # read_eager() reads data already available without blocking data = tn.read_eager() if data: sys.stdout.write(data.decode('ascii', errors='ignore')) sys.stdout.flush() # Check if socket is closed if tn.get_socket() is None: break except ConnectionRefusedError: print("Connection refused.") except Exception as e: print(f"An error occurred: {e}") finally: if 'tn' in locals(): tn.close() print("\nConnection closed.") if __name__ == "__main__": # Example usage: # simple_telnet_client("telehack.com", 23) # Replace with desired host host = input("Enter host: ") simple_telnet_client(host)
- tgv 9mo agoapt/brew/your-package-manager install telnet is simpler and more reliable.