Net::Telnet vers une machine win32 [Perl] - Perl - Programmation
Marsh Posté le 05-03-2004 à 16:46:57
Taz a écrit : il faut que la machine ait un serveur telnet |
jfais un telnet sur la machine et ca fonctionne
dans mon input.log, j'ai bien mon résultat du dir
mais jai rien dans mon @lines
Marsh Posté le 05-03-2004 à 19:00:25
Réponse:
Connecting to a Remote MS-Windows Machine
By default MS-Windows doesn't come with a TELNET server. However third party TELNET servers are available. Unfortunately many of these servers falsely claim to be a TELNET server. This is especially true of the so-called "Microsoft Telnet Server" that comes installed with some newer versions MS-Windows.
When a TELNET server first accepts a connection, it must use the ASCII control characters carriage-return and line-feed to start a new line (see RFC854). A server like the "Microsoft Telnet Server" that doesn't do this, isn't a TELNET server. These servers send ANSI terminal escape sequences to position to a column on a subsequent line and to even position while writing characters that are adjacent to each other. Worse, when sending output these servers resend previously sent command output in a misguided attempt to display an entire terminal screen.
Connecting Net::Telnet to one of these false TELNET servers makes your job of parsing command output very difficult. It's better to replace a false TELNET server with a real TELNET server. The better TELNET servers for MS-Windows allow you to avoid the ANSI escapes by turning off something some of them call console mode.
Marsh Posté le 05-03-2004 à 16:32:17
je tente de passer une commande à une machine win32 et de récupérer l'output. Dans mon Inputfile, tout ce déroule à merveille, mais j'ai pourant rien dans mon array. Fonctionne sous unix en modifiant le nom de machine et le prompt