coldroom:
How far into the login process are you getting? I can't really suggest anything if I don't know what's broken.
I'd suggest that you run a network analyzer during a manual login and compare it with the traffic you get with your script and find out what the differences are.
Anyway, a few suggestions:
- Perhaps you should use put when you write the ^Y. It may be that the newline after the ^Y is preventing the switch from waking up and talking to you.
- Don't use useless variable names (e.g. $var_0). Either give them a good name like $ctrl_Y or just skip them like so: $retcod=$t->print(chr(25));
- Read the documentation so you can use the telnet session object correctly, the print method doesn't return what you think it does.
- Is the line selection character really 'C'? If so, you might want to send 'C' rather than making future maintainers figure it out from chr(67).
...roboticus