#!/usr/bin/perl -w use strict; use Net::Telnet; my $username = "admin"; my $password = 'admin1'; my $hostname = 'server.com'; my $t ; sleep 1; $t = Net::Telnet->new( Timeout => 5, Prompt => '/%/', Host => $hostname); $t->open($hostname); $t -> waitfor('/login:/'); $t->print('admin'); $t->waitfor('/Password:/'); $t->print('admin1'); print "script is now here\n";
In reply to writing output to screen with telnet.pm by splatohara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |