🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #994

Telnet Server just a note and a proposal

#994
From: Colin B Maharaj
Date: Fri, 22 Jun 2007 09:43
41 lines
2380 bytes
Hi all I had been struggling with the IdTelnetServer all week.
By default, the windows Telnet client echos what you type on screen.

What happens next is that is when you try to authenticate, naturally
the username ands password gets echoed to the screen along with your 
entire session.

What I did was this in the onconnect.....

//---------------------------------------------------------------------------
void __fastcall TDataModule1::TelnetConnect(TIdPeerThread *AThread)
{
   unsigned char s[4];
   s[0]=(unsigned char)255;
   s[1]=(unsigned char)254;
   s[2]=(unsigned char)1;
   s[3]=NULL;
   AThread->Connection->Write(s);
   Sleep(250);
   AThread->Connection->ReadBuffer(s, 3);
   AnsiString init="Connected to Server. You have 3 Login Attempts...\r\n";
   AThread->Connection->WriteLn(init);
}
//---------------------------------------------------------------------------

Those three characters are telnet protocol commands that tell
the telnet client not to echo characters. Check the RFC.

The ReadBuffer command is required because the three characters
that comprise the command gets echoed into the password field
for some reason.

What I want to propose is to do this in the original indy source, or 
have an option echo on/off in the property editor.

BTW: I use Indy 9.0.50 on BCB6 Ent. And I do not have Indy 10 maybe
one of you folks can test to see if it has the same issue.

(just my 2 cents)
Colin B Maharaj
Trinidad, WI.
Technical Details
Message-ID: <467b99a3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,27acd896331d1920,start
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 22 Jun 2007 05:43:00 -0400
From: Colin B Maharaj <noreply@myhost.com>
User-Agent: Thunderbird 1.5.0.12 (Windows/20070509)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Telnet Server just a note and a proposal
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 000751-2, 06/21/2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 190.58.14.113
Message-ID: <467b99a3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1182505379 190.58.14.113 (22 Jun 2007 02:42:59 -0700)
Lines: 42
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail