version 1.21, 2006/10/05 18:10:39 |
version 1.24, 2007/01/17 19:00:51 |
|
|
package Net::Telnet::Trango; |
package Net::Telnet::Trango; |
# $RedRiver: Trango.pm,v 1.20 2006/09/12 02:20:39 andrew Exp $ |
# $RedRiver: Trango.pm,v 1.23 2007/01/08 22:16:29 mike Exp $ |
use strict; |
use strict; |
use warnings; |
use warnings; |
use base 'Net::Telnet'; |
use base 'Net::Telnet'; |
|
|
|
|
use Net::Telnet::Trango; |
use Net::Telnet::Trango; |
my $t = new Net::Telnet::Trango ( Timeout => 5 ); |
my $t = new Net::Telnet::Trango ( Timeout => 5 ); |
|
|
$t->open( Host => $fox ) or die "Error connecting: $!"; |
$t->open( Host => $fox ) or die "Error connecting: $!"; |
|
|
$t->login('password') or die "Couldn't log in: $!"; |
$t->login('password') or die "Couldn't log in: $!"; |
|
|
# Do whatever |
# Do whatever |
|
|
$t->exit; |
$t->exit; |
$t->close; |
$t->close; |
|
|
|
|
|
|
None |
None |
|
|
|
=head1 METHODS |
|
|
|
=over |
|
|
=cut |
=cut |
|
|
our $VERSION = '0.01'; |
our $VERSION = '0.01'; |
|
|
|
|
=pod |
=pod |
|
|
=head1 METHODS |
=back |
|
|
=head2 ACCESSORS |
=head2 ACCESSORS |
|
|
|
|
|
|
=item su_password |
=item su_password |
|
|
C<su_password('all'|suid, 'new_password')> |
C<su_password('new_password'[, 'suid'])> If no suid is specified, |
|
the default is "all". |
|
|
=cut |
=cut |
|
|
sub su_password |
sub su_password |
{ |
{ |
my $self = shift; |
my $self = shift; |
my $su = shift || '!'; |
|
my $new_pass = shift || ''; |
my $new_pass = shift || ''; |
|
my $su = shift || 'all'; |
unless (defined $su) { |
|
warn "No su passed!" |
|
#return undef; |
|
} |
|
|
|
unless (defined $new_pass) { |
unless (defined $new_pass) { |
warn "No new password!" |
warn "No new password!" |