On 06/06/2008, Uwe Fischer <mistuwefischer@web.de> wrote:
> Hello Pierre,
>
> how would you do that for a Windows Telnet Server?
>
>
> Another question I have is also related to the Windows Telnet Server implementation.
I recognized some kind of "control characters" in the response of the Windows Telnet Server.
It looks like this:
>
> ***************************************************************************
> [1;1H*===============================================================
> [2;1HMicrosoft Telnet Server.
> [3;1H*===============================================================
> [4;1HD:\Users\username>
> [5;1H [K [6;1H [K [7;1H [K [8;1H [K [9;1H [K [10;1H [K [11;1H [K [12;1H [K [13;1H [K
[14;1H [K [15;1H [K [16;1H [K [17;1H [K [18;1H [K [19;1H [K [20;1H [K [21;1H [K [22;1H [K
[23;1H [K [24;1H [K [25;1H [K [4;17H
These look like terminal control characters, e.g. for clearing screen
and cursor positioning.
A real terminal (or a proper terminal emulator) will process these.
You'll need to read the Telnet server documentation to find out how to
get rid of these; sometimes it is possible to set the terminal type to
"dumb".
>
> ***************************************************************************
>
>
> Does anybody know its meaning and how to get rid of these control characters to get
a "clean" output?
>
> Thanks and best regards,
> Mitja
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Pierre Brico" <pierre.brico@tsdsoftware.eu>
>
> > Gesendet: 05.06.08 10:23:08
>
> > An: "Commons Users List" <user@commons.apache.org>
> > Betreff: Re: [Telnet] how to determine the prompt?
>
>
> > Hello Uwe,
> >
> > You can use whatever you want for prompt. For exemple, you can use a
> > (unique) sequence like:
> >
> > PS1="#HELLO WORLD123456789#>"
> > export PS1
> >
> > So if you receive the string (with a '\n' a
> >
> > #HELLO WORLD123456789#>
> >
> > after your command, that means the command is finished.
> >
> > On Tue, Jun 3, 2008 at 2:05 PM, Uwe Fischer <mistuwefischer@web.de> wrote:
> >
> > > Hello Pierre,
> > >
> > > thanks for your answer.
> > > Yes, I did what you mention. But it's not "really" solving my issue. The
> > > problem I face is that the devices I attach to can have the "#" or ">"
> > > characters maintained in a user welcome messages when logging in. E.g., the
> > > following welcome message is displayed when logging on to the device:
> > > ############################################
> > > Welcome at "hostname". In case of any issues contact Uwe
> > > ############################################
> > >
> > > How can one distinguish the "#" character when used in a comment and when
> > > used to indicate the prompt?
> > >
> > > Another problem could occur when somebody would redirect stdout of a Unix
> > > system to a file, e.g.:
> > > ls -l > output_list.txt
> > >
> > > Any ideas?
> > >
> > > Thanks and best regards,
> > > Uwe
> > >
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: "Pierre Brico" <pierre.brico@tsdsoftware.eu>
> > > > Gesendet: 03.06.08 11:11:37
> > > > An: "Commons Users List" <user@commons.apache.org>
> > > > Betreff: Re: [Telnet] how to determine the prompt?
> > >
> > >
> > > > Hello Uwe,
> > > >
> > > > Did you try to change the command prompt before executing the command.
> > > You
> > > > just should send commands to the shell like this:
> > > >
> > > > PS1="#>"
> > > > export PS1
> > > >
> > > > And you will get the "#>" as prompt.
> > > >
> > > > Pierre
> > > >
> > > > On Tue, Jun 3, 2008 at 10:50 AM, Uwe Fischer <mistuwefischer@web.de>
> > > wrote:
> > > >
> > > > > Hello all,
> > > > >
> > > > > I'm looking for a solution to a problem that bothers me for quite
some
> > > time
> > > > > now and I hope somebody here can help me out.
> > > > > I'm using the telnet api to connect to various systems, which works
> > > fine.
> > > > > The problem I face is, how can I determine that a command has run
to
> > > its
> > > > > end if there is no static "prompt" character like "#" or ">",
but
> > > > > dynamically changing prompt characters?
> > > > >
> > > > > I have read through the Telnet specification but couldn't find anything
> > > > > that deals with this kind of problem. But surely there must be a
> > > solution to
> > > > > this. I have found another thread in this mailing list concerning
a
> > > similar
> > > > > issue, posted by: Anthony Webster Thu, 28 Feb 2008 10:54:35 GMT.
> > > > > Unfortunately none has answered it yet.
> > > > >
> > > > > Thanking in advance,
> > > > > U.F.
> > > > >
> > > > >
> > > > > ______________________________________________________________
> > > > > Jeden Monat 1 hochkarätiger maxdome-Blockbuster GRATIS!
> > > > > Exklusiv für alle WEB.DE Nutzer. http://www.blockbuster.web.de
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > > > > For additional commands, e-mail: user-help@commons.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > _______________________________________________________________________
> > > Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
> > > kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: user-help@commons.apache.org
> > >
> > >
> >
> >
>
>
>
> _______________________________________________________________
> Schon gehört? Der neue WEB.DE MultiMessenger kann`s mit allen:
> http://www.produkte.web.de/messenger/?did=3016
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
|