1
Inicie el símbolo del sistema de Windows. Haga clic en " Inicio", " Ejecutar" . Tipo " cmd.exe " y presionar " Enter".
2
Ejecute el shell de CPAN . En el símbolo del sistema escriba : " perl- MCPAN -e shell" y presionar " Enter".
3
instalar Net :: Telnet. En el símbolo del sistema, escriba "instalar Net :: Telnet :: Cisco " y presionar " Enter".
4
Inicie un editor de código o Bloc de notas .
5
Uso el siguiente código para iniciar una conexión Telnet y pedirá el host: Usa
Net :: Telnet ;
$ telnet = new Net :: Telnet ( Timeout = > 10 , Errmode = > , 'die ' ), $ telnet- > open ( '< nombreDeServidor ');
$ telnet- > waitfor ( ' /login : $ /i ');
$ telnet- > print (' $ telnet- > waitfor ( ' /password : $ /i '); $ telnet- > print ( '< login_password '); $ telnet- > waitfor ('/\\ $ $ /i '); $ telnet- > print ( "anfitrión" ) ; $ salida = $ telnet- > waitfor ('/\\ $ $ /i '); print $ salida; Guarde el archivo . Utilice la extensión de PL .
6