Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Feb : Telnet prompts

www.cryer.info
Managed Newsgroup Archive

Telnet prompts

Subject:Telnet prompts
Posted by:"Martin James" (mjames_falc..@dial.pipex.com)
Date:Wed, 2 Feb 2005 15:02:51

This protocol is a PITA.

While auto-connecting to a telnet server, it is fairly easy to detect the
login and password prompts - these are often the standard 'login: ' and
'password: ' strings and, if not, can be specified by the user.  They can be
expected at specific places in the authorisation exchange.

But what about the normal user prompt that is displayed when connected &
authorised?

Thsi can change during use, eg. it is often set to the curent directory on
the server. Though always appearing on a line of its own,  it can be
terminated  with '>', '$', '%' etc. There is always the possibility that it
may appear in the received text stream without actually signifying
end-of-output.

Human telnetters recognise it using a massive parallel processor with 10^12
threshold logic gates & an aaptive OS/pattern-recogniser developed over tens
of thousands of years.

How am I supposed to detect it with my Pentium & D5?  I realise that I can
'type ahead' and do not have to wait for the return of the prompt before
sending the next command, but this leads to problems if a command is errored
by the server.

This is all the fault of hashed-up Unix nerds.in the 60's, designing
protocols on beer mats after too many Buds. :(

Rgds,
Martin

Replies:

www.cryer.info
Managed Newsgroup Archive