Poor Woman's Telnet Server |
There are not many free telnet servers for the non Unix world. For windows you can use inetd under cygwin. Or you can try this project which uses Dieter Wimberger's telnetd2 framework.
This program was quickly hacked together and provides a simple telnet server which runs at least under Windows and Unix. It should run anywhere where a Java runtime envirionment is available. (For non Windows or non Unix operating systems you must adopt the call of the system shell.)
Of course it is not advisable to run such an program on an production server. This (or any other) telnet server is a major security hole. But for software development and testing purposes this program can satisfy some needs.
PWTS doesn't require a password and starts a system shell at the "/" directory. The user has the same rights as the user that started PWTS.
If you need a telnet server and have java just start the Poor Woman's Telnet Server and you can access your system with every telnet client.
PWTS tries to start a external system shell and redirects the stdin
,
stdout
and stderr
streams from the external shell process to the
telnet terminal connection. Currently PWTS starts cmd.exe
on Windows
systems and /bin/sh
on all other operating systems.
The input from the terminal is line bufferd to enable simple line
editing functionality. A drawback of this behaviour is that read
requests of the external process that wait for a single character are
not directly supported. If the external process waits for an 'y'
you
have to type in "y<CR>"
.
This should be no problem for getting the 'y'
. But a subsequent read
character request from the external process gets the CR
character.
The stderr
output is merged into the terminal output (in red color)
as long stderr
characters are available.
If you have any adaptions for other operating systems or further improvements I would be delighted to hear from you.
If you edit a line that is bigger than a the screen width you can't get back.
Characters that can be typed in correctly are not recalled from buffer (for example German umlauts).There is an error report for java version "1.4.2" on gij (GNU libgcj) version 4.0.0 20050519 (Red Hat 4.0.0-8). An NullPointerException occured. More details are still unknown.
If you find a bug you can send me an email or add it to the bug list at http://sourceforge.net/projects/pwts
You can download this program at the Sourceforge download page.
The pwts service package is a special release for Windows. It uses the Java Service Wrapper to run PWTS as an Windows Service. Just install your own telnet server daemon under Windows.
This program uses additional libraries that stand under different licenses. Unblushingly used was the source code of the Java TelnetD library (embeddable telnet daemon) that is copyrighted by Dieter Wimberger. For logging purposes used are the Commons-Logging library and Log4J.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License.
Copyright (C) 2006 by Michael Meyling