curl-users
Re: curl and telnet
Date: Tue, 20 Dec 2005 13:15:50 +0100
Samuel =?iso-8859-1?B?RO1heiBHYXJj7WE=?= wrote:
>
> With "linux telnet daemon" I done it using a file with user and password.
>
> From linux:
>
> cat myscript_with_user_info.txt | curl telnet://host
>
> From windows:
>
> type myscript_with_user_info.txt | curl telnet://host
>
> The problem is you must include "exit" or "quit" command as last line in
> your .txt file.
>
> Another problem found is that some telnet daemons read stdin in non-standard
> way and I can't use that syntax.
>
> The problem, I think, to manage login info is that is very dependant on the
> device telnet daemon running on it. For example, an spanish telnet daemon,
> prompt the user using "usuario:" or "Usuario:" keyword. I think another
> internationalized telnet daemons could do that in another language.
>
> I think, under telnet, there are not a standarized way to do that.
>
> Regards,
>
> Philippe Baudry writes:
>
> > hi
> >
> > curl allows telnet functionnality
> >
> > syntax is curl telnet://<remote>
> >
> > curl doesn t manage the user password, and it is to user to catch the
> > prompt and send the user identification.
> > why?
> >
> > interest of curl is i think a complete protocal connect management from
> > just a command line, as it does for http, ftp,..
> >
> > with telnet, this advantage is not implemented, and a simple script
> > including telnet command seems to do the same
> >
> > i have done some test, and can t find a solution , from a script
> > including curl telnet, to pass automaticaly the user/id to continue the
> > telnet connexion
> >
> > so should be possible to have an improvement of telnet in curl including
> > the management of user identificatin while connection (even if it is
> > not in the protocol and can t be treated directly)
> > as
> >
> > curl telnet://<remote> -u <user/pass>
> >
> > curl will do the telnet connexion, will cath the return prompt, send the
> > user/id , test the results, etc , to return finaly the command result
> >
> > it should be nice for me, because i should have a telnet command
> > inheriting of curl benefits( (proxy management, ...)
> >
> > in it is not, how can i from a shell script including curl telnet
> > syntax, provide the user/id in continue
> >
> > thanks for an answer
> >
> > --
> > Philippe Baudry
>
>
> Samuel DÃaz GarcÃa
> Director Gerente
> ArcosCom Wireless, S.L.L.
>
> CIF: B11828068
> c/ Romero Gago, 19
> Arcos de la Frontera
> 11630 - Cadiz
>
> http://www.arcoscom.com
>
> mailto:samueldg_at_arcoscom.com
> msn: samueldg_at_arcoscom.com
>
> Móvil: 651 93 72 48
> Tlfn.: 956 70 13 15
> Fax: 956 70 34 83
hi, and thanks a lot for your answer
i had tried your solution ( same if you redirect the stdin ) giving the
info via a file
if i write a file containing the 2 lines
user1
password1
behaviour is always the same: when starting your command,curl process
starts telnet session, takes in account the first line of the file, but
keeps blocked waiting the second line( here the passwd);
connexion is the rejected by time out
is there a way to pass the second line of the file. have you an exemple
of the specified file you pass in parameter
thanks by advance
-- Philippe BaudryReceived on 2005-12-20