line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/env perl
|
2
|
|
|
|
|
|
|
package Net::Telnet::Netgear::Packet::String;
|
3
|
2
|
|
|
2
|
|
780
|
use strict;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
66
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings;
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
54
|
|
5
|
2
|
|
|
2
|
|
8
|
use parent "Net::Telnet::Netgear::Packet";
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
9
|
|
6
|
2
|
|
|
2
|
|
103
|
use Carp;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
116
|
|
7
|
2
|
|
|
2
|
|
932
|
use MIME::Base64;
|
|
2
|
|
|
|
|
1236
|
|
|
2
|
|
|
|
|
364
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @CARP_NOT = qw ( Net::Telnet::Netgear::Packet );
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new
|
12
|
|
|
|
|
|
|
{
|
13
|
6
|
|
|
6
|
1
|
11
|
my ($self, $content, $is_base64) = @_;
|
14
|
6
|
50
|
|
|
|
16
|
Carp::croak "The Telnet packet is missing." unless defined $content;
|
15
|
6
|
|
|
|
|
30
|
bless { is_base64 => defined $is_base64, content => $content }, $self;
|
16
|
|
|
|
|
|
|
}
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub from_base64
|
19
|
|
|
|
|
|
|
{
|
20
|
3
|
|
|
3
|
1
|
6
|
shift->new (shift, 1);
|
21
|
|
|
|
|
|
|
}
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub get_packet
|
24
|
|
|
|
|
|
|
{
|
25
|
7
|
100
|
|
7
|
1
|
661
|
$_[0]->{is_base64} ? decode_base64 ($_[0]->{content}) : $_[0]->{content};
|
26
|
|
|
|
|
|
|
}
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1;
|