[Tutor] A Telnet problem

W X Liu csmwxl at bath.ac.uk
Sun Sep 5 23:39:34 CEST 2004


Quoting Roger Merchberger <zmerch at 30below.com>:

> Rumor has it that W X Liu may have mentioned these words:
> >Hi friends:
> >
> >I am writing a program to connect a MUD(Telnet) server, here is the
> program:
> >
> >import telnetlib
> >a=telnetlib.Telnet(host='mudlib.anarres.org',port='5000')
> >a.read_until('login:')
>                 ^
> Are you sure they're lowercase? Case sensitivity will create havoc here...
> ;-)
I am sure that "login" are lowcase.
> It's better to do this:
> 
> >a.read_until('ogin:')
> 
> A trick from the old BBS dayz... ;-)
> 
> >b=str('abb'+chr(10))
> 
> Why are you adding this?
I have to 'enter' them after inputing.
> >a.write(b+ "\n")
> 
> And this... Are you *sure* that the server's hosted on a Winders PC & 
> *requires* a Winders line-ending? Most telnet servers don't...

What's Winders line ending?

> >b=str('528950'+chr(10))
> >a.read_until('password:')
> >a.write(b+ "\n")
> 
> You know cleartext passwords are a security no-no, right? ;-)
> 
> >But it doesn't work, who can help me to fix it? Thanks a lot.
> 
> When I was working with telnetlib, I was connecting to a USRobotics modem 
> server, but telnets being telnets, this is what I had to do to to get the 
> computer to recognize the text:
> 
> >b=str('528950')
> >a.read_until('assword:')
> >a.write(b+ "\r")
>               ^^
> Note the \r -> This is what worked for me for a line-ending when working 
> with telnetlib, but I have never connected to anything else other than that 
> USR box.
>

Basically, there is a webpage to introduct this MUD, you may look at it...:

http://docs.anarres.org/Playing%3AQuickStart 



More information about the Tutor mailing list