Event Log: server: SB TTYPE SEND
Event Log: client: SB TTYPE IS XTERM
####
use Net::Telnet;
use Net::Telnet::Options;
# Create Telnet Object
my $t = new Net::Telnet(Dump_log => 't_dump.txt',
Output_log => 't_input.txt',
Input_log => 't_output.txt',
Errmode => 'return',
Timeout => '10',
);
# Create Telnet Options Object
my $nto = Net::Telnet::Options->new();
# Accept and deal with incoming TERM TYPE option requests
$nto->acceptDoOption('TTYPE', {'SB' => \&ttype_sb_callback } );
sub ttype_sb_callback
{
my ($cmd, $subcmd, $data, $pos) = @_;
my $socket = "23";
$nto->sendOpt($socket, 'SB', 24, 'IS', 'VT102');
return ;
}
$t->open($host);
$t->waitfor('/login:/');
$t->print("$username");
####
($prematch, $match) = $t->waitfor(Match => "/Welcome/");
unless (defined $match) {
print $t->errmsg;
}