#!/usr/bin/perl
use Net::Telnet;

$username = 'admin';
$passwd = '';

$t = new Net::Telnet(
    Timeout => 10,
    Prompt => '/Summit5i:.*$/',
);
$t->open('192.168.0.1');
$t->login($username, $passwd);

for($x = 1; $x < 9999999999; ++$x)
{
    print "Trying: $x\n";
    @lines = $t->cmd("enable license fullL3 $x");

    if(!grep(/ERROR/, @lines))
    {
	print @lines;
	exit;
    }
}
