Simple code to connect and login to HP Procurve use(ing) Expect below, generates following output to STDOUT and PATH/FILE
[2J[?7l[3;23r[?6l[24;27H[?25h[24;27H[?6l[1;24r[?7l[2J[24;27H[1;24r[24;27H[24;1HConnecting to Tacacs server[?25h[24;1H[24;1H [?25h[24;1H[?25h[24;1H[24;1HUsername: [?25h[24;1H[?25h[24;11H[24;11H[?25h[24;11H[1;1H[?25l[24;11H[24;1H [?25h[24;11H
Question is how do I get rid of what looks to be non-printable flow-control? I reviewed IO::Stty and have either not understood or implemented incorrectly as I have tried $object->('sane') with no luck, nor gotten a response from $object->stty('-a')
######### Start up an Expect session ################ my $exp=Expect->new; $exp->raw_pty(0); $exp->stty('sane'); print "exp settings:".$exp->stty('-a')."<<<----\n"; $exp->spawn("telnet $dev->{IP}"); $exp->log_file("$dev->{DEVICE_CONF_PATH}/$dev->{IP}.log"); if($DEBUG){ $exp->log_stdout(1); }
In reply to Expecting non-print chars from HP Procurve by sgrey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |