After upgrading to 3.13 from 3.10 my Net::Telnet perl scripts don’t work anymore.
Seems like telnet server was changed, but I can’t find anything about it in the changelog.
2.9 also works fine.
The ploblem is apparently with terminal type handling, 2.9 says “terminal type is network”, 3.13 just hangs after the MikroTik banner.
Scripting/console is changed between 2.9 and 3.0, but there should not be too much difference between 3.10 and 3.13 console functions.
We’ve also seen this with 3.x. Try hitting enter (send “\r\n”) a few times. It also happens with mac telnet.
There is nothing to “hit”, the problem is with perl scripts (which worked fine with 2.9 and even with older 3.x versions).
Yes, there should not be too much difference, but seems like there is ![]()
Once again, the script does not receive command prompt, MT telnet server just hangs after login banner.
try to provide login parameters in you scripts.
Seems like nobody really reads my message ![]()
The script that works with 2.9 and 3.10 does NOT work with 3.13 due to some change in the console code.
It hangs after login (there is a “logged in via telnet” message in the /log).
Please paste the entire script here, or send it to support, so we can check what is wrong with ROS 3.13
#!/usr/bin/perl
use strict;
use Net::Telnet;
unless (@ARGV > 2) { exit 2; }
my $nasip = shift(@ARGV);
my $community = shift(@ARGV);
my $login = shift(@ARGV);
my ($user,$pass,$t);
($user,$pass)=split(/:/,$community,2);
$t = new Net::Telnet (Timeout => 5,
Errmode => "return",
# Dump_Log => '/tmp/telnet.log',
Prompt => '/> $/');
if ($t->errmsg){
exit 24;
}
$t->open($nasip);
if ($t->errmsg){
exit 24;
}
$t->login($user, $pass);
if ($t->errmsg){
exit 24; #returns here with timeout in 3.13
}
$t->cmd("/interface pppoe-server");
$t->cmd("remove [find user=\"$login\"]");
$t->cmd("/quit");
$t->close();
exit 0;
Here it is. The script is used to disconnect pppoe users
usage: disconnect.pl :
Doesn’t work in 3.14 either
Have you tried it?
None of these scripts will work unless console colors and terminal detection is disabled
yesss, exactly =)
What’s new in 3.0rc14:
*) console - added login parameters, passed as part of login name, after ‘+’;
can be used to disable colors (+c) and terminal autodetection (+t), e.g.
“admin+ct”;
Yes, it works with +ct, but the script must work with both 2.9 and 3.x. (and worked before 3.13).
Anyway, this is sort of a solution, thanks ![]()