| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# SMB Perl library, Copyright (C) 2014-2018 Mikhael Goikhman, migo@cpan.org |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify |
|
4
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
|
5
|
|
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or |
|
6
|
|
|
|
|
|
|
# (at your option) any later version. |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
|
9
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11
|
|
|
|
|
|
|
# GNU General Public License for more details. |
|
12
|
|
|
|
|
|
|
# |
|
13
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
|
14
|
|
|
|
|
|
|
# along with this program. If not, see . |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package SMB::Header; |
|
17
|
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
985
|
use strict; |
|
|
2
|
|
|
|
|
7
|
|
|
|
2
|
|
|
|
|
66
|
|
|
19
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
69
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
15
|
use parent 'SMB'; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
13
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new ($%) { |
|
24
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
|
25
|
0
|
|
|
|
|
|
my %options = @_; |
|
26
|
|
|
|
|
|
|
|
|
27
|
0
|
|
0
|
|
|
|
$options{code} // die "No code for $class"; |
|
28
|
0
|
|
0
|
|
|
|
$options{mid} // die "No message id for $class"; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
return $class->SUPER::new( |
|
31
|
|
|
|
|
|
|
%options, |
|
32
|
|
|
|
|
|
|
code => $options{code}, |
|
33
|
|
|
|
|
|
|
status => $options{status} || 0, |
|
34
|
|
|
|
|
|
|
uid => $options{uid} || 0, |
|
35
|
|
|
|
|
|
|
tid => $options{tid} || 0, |
|
36
|
|
|
|
|
|
|
mid => $options{mid}, |
|
37
|
|
|
|
|
|
|
flags => $options{flags} || 0, |
|
38
|
|
|
|
|
|
|
signature => $options{signature}, |
|
39
|
0
|
|
0
|
|
|
|
); |
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub is_response ($) { |
|
43
|
0
|
|
|
0
|
0
|
|
die "Pure virtual method is called"; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub is_signed ($) { |
|
47
|
0
|
|
|
0
|
0
|
|
die "Pure virtual method is called"; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub is_chained ($) { |
|
51
|
0
|
|
|
0
|
0
|
|
die "Pure virtual method is called"; |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |