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