Trivial uses of Telnet

Did you know that most of what people do on the internet is powered by technologies which are based around ideas that are ten or more years old? Did you also know that most of these technologies are based around the idea that commands and outputs are all simple text? Did you know that most web applications simply give you an interface that issues these commands behind the scenes?

Is that "no" I hear you saying? Well given that there are all these technologies out there and that all you need to use them is the right commands, wouldn't it be great if you had a way to talk to these systems? Wouldn't it also be great if you already had this tool and it was installed on every machine you are likely to see?

Is that "yes" I hear you saying? Well in that case I give you telnet. This is a very simple program, at an incredibly simplified level it sends the keys you press along a connection to another machine which is waiting for that input, this machine then responds if it is necessary and the cycle repeats until either side closes the connection.

Now for this to work you have to have something that wants to be connected to (referred to as a listening process) so that a complete connection can be made. So far this is all well and good but it doesn't quite inspire you yet, correct?

Right, what if I were to give you a quick summary of what this document will show you? Interested now? Good.

From here on it gets technical - I will try to explain in as much detail as I can but on somethings you will simply have to trust me.

Telnet - the basics

First of all call up a command prompt, this is the easiest place to launch multiple telnet sessions from. Next just type telnet - this should fire off the basic application - if you are under 9X it fires off as a windows application, if you are under NT it fires off as a DOS-type application. If get the NT version remember to turn local echo on as otherwise you don't get to see what you type, which makes life a little hard - for myself on a w2k machine this meant I needed to type SET LOCAL_ECHO to set that option.

The easiest way to make telnet connect is just to type from your prompt TELNET {address} {port} where {address} is the DNS or TCP/IP address of the machine you want to connect to and {port} is the port you want to establish the actual connection with.

Once you have a connection everything become pretty similar no matter what method you use since all the responses are dictated by the server.

NetCat - the basics

First of all call up a command prompt, this is the easiest place to launch multiple netcat sessions from.

The easiest way to make netcat connect is just to type from your prompt NC -v -v {address} {port} where {address} is the DNS or TCP/IP address of the machine you want to connect to and {port} is the port you want to establish the actual connection with, additionally with netcat you have the friendly names of services at your disposal so instead of typing 80 you can just type http if you wanted to connect to a webserver. The double "-v"'s simply makes netcat tell you exactly what is going on.

Once you have a connection everything become pretty similar no matter what method you use since all the responses are dictated by the server.

Netcat has the advantage of not actually sending data until you hit return so you can edit to your hearts content without fearing you have messed up the command with illegal characters, it can also remember past commands but most of all the fact that you can use friendly service names is an incredibly useful feature.

Continued on page 2 - "Browsing the web without a browser - making use of the HTTP protocol."

Table of contents:
Evolved
Code
ASP, SQL & VB meet the internet.

Navigate

Home Parent Directory Meta-Search

Technical

ASP Scripts SQL Scripts VB Programs Show All

Guides

Show All

Other

Contact Site News About Legal Sitemap Links