A python telnet entry level question

Eddie Corns eddie at holyrood.ed.ac.uk
Mon Apr 26 09:22:04 EDT 2004


claird at lairds.com (Cameron Laird) writes:

>In article <c685ob$da5$1 at scotsman.ed.ac.uk>,
>Eddie Corns <eddie at holyrood.ed.ac.uk> wrote:
>			.
>			.
>			.
>>You are maybe being too specific in what you match for.  At least one of my
>>machines prompts:
>>
>>  Pasword for <username>:
>>
>>rather than just "Password: ".  I tend to match things like
>>
>>"ogin"  (in case of Login vs login)
>>"assword" (will this get filtered out by censoring s/w?)
>>
>>Eddie

>This sort of tolerance can lead to its own problems (though
>I entirely agree you're right to recommend it).  Some logins
>are so sensitive to timing (in essence) that matching
>"assword" rather than "assword:" results in the telnetd 
>ignoring the first character or two of response.

>So what to do?  At this level, there is *no* good answer.
>The most enlightened thought is simply to recognize that
>telnet forces one into a cascade of heuristic hacks.

And then you get unhelpful router manufacturers that put code in to check
whether passwords are typed too fast (or regularly spaced) and ignore them
because they're obviously not dealing with a human!  Took me ages to figure
out why my scripts were failing (then about 10 seconds to defeat it).

Yes, using telnet is more art than science but it's a lot better now than
before we had expect (for heavy duty jobs) and telnetlib (for simpler jobs).

Eddie



More information about the Python-list mailing list