Autocomplete over telnet connection
Some of the servers I work with lets me autocomplete particular commands.
For example, when I type:
it autocompletes it for me as:
So by typing
PHP Code:
ch[space]do[space][space]
in essence, i get:
PHP Code:
change document attributes
(attributes is the only valid argument after document, so it was autofilled as the second space)
I know how to do this if i gave it in as an input for a function, but I don't know how to do this over a telnet connection. Is it possible for Java to even do this? are there any libraries or packages I should be looking at in particular?
At this point, any sort of hint or theory will be most helpful. Thanks
Re: Autocomplete over telnet connection
How does this relate to java programming?
Re: Autocomplete over telnet connection
I'm writing a server in Java and I'm wondering whether I can duplicate this effect.
Re: Autocomplete over telnet connection
I'm not familiar with what port telnet connects to? Is it a general purpose tool that can connect to any port?
How does it get feed back from the server to auto complete?
What kind of server does the auto complete for you?
Re: Autocomplete over telnet connection
Telnet - Wikipedia, the free encyclopedia is more of a network protocol really and does not have any designated port. Sometimes applications/servers expose a telnet port for administrating the server, such an example is mail servers which also allow you to connect to port 25 in most cases and actually type in your email.
// Json
Re: Autocomplete over telnet connection
That's interesting. I'll have to research it.
On WinXP telnet is a command: open a command prompt and enter telnet and it says:
Quote:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>
Microsoft Telnet> ?
Commands may be abbreviated. Supported commands are:
c - close close current connection
d - display display operating parameters
o - open hostname [port] connect to hostname (default port 23).
q - quit exit telnet
set - set set options (type 'set ?' for a list)
sen - send send strings to server
st - status print status information
u - unset unset options (type 'unset ?' for a list)
?/h - help print help information
Microsoft Telnet> o 127.0.0.1 8080
Connecting To 127.0.0.1...
I thought telnet was a general purpose tool that would allow you to do FTP manually for example.
Re: Autocomplete over telnet connection
Well, the most common application of telnet/SSH is remote management. For example, if you're on the road and you need to say, read log files, or install new software, you would telnet in. There isn't really a web interface for everything, and even if there was, SSH is less resource intensive than a full featured browser. The servers I work with are to manage commercial printers. They don't have a full variety of commands (like mkdir, chmod, ls, etc etc), but instead, they have their own command set (start printing, stop printing, list documents, change document, etc).
In a way, you can think of the autocompletion like when you're on the command prompt (since it looks like you're in WinXP) and you type cd <folder name> .... but instead of typing out the entire folder name (say, cd myfolder), simply type cd my[tab] (press tab), and WinXP should autocomplete the folder name and show cd myfolder instead.
If you'd like an example of a telnet server that people won't mind you connecting to, you can try googling for 'MUDs' ... these are telnet servers made for entertainment purposes, and they more or less won't mind a random connection :)