Monday, July 18, 2011

Something You Can See!

This week, I spent more time making pickles than I did writing code. But I did write a little demo that interacts with a Telnet client. I've packaged KrumLib as an executable jar, with the demo as its run target. You can download it here. I'd like confirmation that it works on Windows and Mac, although I don't know why it wouldn't. More importantly, I'd like confirmation that it works with various Telnet clients.

The demo opens port 12345 and listens for a Telnet connection. When it receives one, it prompts the user (via Telnet) for a user name and password. After receiving the user's responses, it prints a diagnostic message and exits. The conversation looks like this:

Enter your name: foo
Enter your password:
Your name is foo and your password is bar

Details I would like confirmed include:
  1. The name is echoed one character at a time (not all at once when the user presses enter) and each character is echoed only once

  2. The password is not echoed at all, except in the diagnostic message

  3. The backspace key works as you'd expect, and deletions made with backspace are reflected in the name and password printed in the diagnostic message

  4. The arrow keys do not move the cursor, and also do not cause escape codes (gibberish) to be printed on the terminal

  5. Each line of text begins on the left column of the screen

If you send feedback, please let me know what Telnet client you're using.


  1. Just tested on Win7 Pro x64 with Java 6 update 26 and Putty. Works, though Putty closed after entering the password.

  2. I think Putty defaults to closing its window when the connection closes. I probably should have put a delay in there. Thanks for testing!