line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id$ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# database::sinfp3 Brik |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
package Metabrik::Database::Sinfp3; |
7
|
1
|
|
|
1
|
|
657
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use base qw(Metabrik); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
663
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub brik_properties { |
13
|
|
|
|
|
|
|
return { |
14
|
0
|
|
|
0
|
1
|
|
revision => '$Revision$', |
15
|
|
|
|
|
|
|
tags => [ qw(unstable network sinfp scanner signature) ], |
16
|
|
|
|
|
|
|
author => 'GomoR ', |
17
|
|
|
|
|
|
|
license => 'http://opensource.org/licenses/BSD-3-Clause', |
18
|
|
|
|
|
|
|
attributes => { |
19
|
|
|
|
|
|
|
db => [ qw(sinfp3_db) ], |
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
commands => { |
22
|
|
|
|
|
|
|
active_signature_export => [ qw(sinfp3_db|OPTIONAL output|OPTIONAL) ], |
23
|
|
|
|
|
|
|
passive_signature_export => [ qw(sinfp3_db|OPTIONAL output|OPTIONAL) ], |
24
|
|
|
|
|
|
|
}, |
25
|
|
|
|
|
|
|
require_modules => { |
26
|
|
|
|
|
|
|
'Net::SinFP3::Plugin::Signature' => [ ], |
27
|
|
|
|
|
|
|
'Net::SinFP3::Global' => [ ], |
28
|
|
|
|
|
|
|
'Net::SinFP3::Log::Console' => [ ], |
29
|
|
|
|
|
|
|
'Net::SinFP3::Input::Null' => [ ], |
30
|
|
|
|
|
|
|
'Net::SinFP3::Search::Null' => [ ], |
31
|
|
|
|
|
|
|
'Net::SinFP3::Mode::Null' => [ ], |
32
|
|
|
|
|
|
|
'Net::SinFP3::DB::SinFP3' => [ ], |
33
|
|
|
|
|
|
|
'Net::SinFP3::Output::Export' => [ ], |
34
|
|
|
|
|
|
|
'Net::SinFP3::Output::ExportP' => [ ], |
35
|
|
|
|
|
|
|
'Net::SinFP3' => [ ], |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# |
41
|
|
|
|
|
|
|
# sinfp3.pl -input-null -db-sinfp3 -db-file FILE -mode-null -search-null -output Export |
42
|
|
|
|
|
|
|
# |
43
|
|
|
|
|
|
|
sub active_signature_export { |
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
45
|
0
|
|
|
|
|
|
my ($file) = @_; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
0
|
|
|
|
$file ||= $self->db; |
48
|
0
|
0
|
|
|
|
|
$self->brik_help_run_undef_arg('active_signature_export', $file) or return; |
49
|
0
|
0
|
|
|
|
|
$self->brik_help_run_file_not_found('active_signature_export', $file) or return; |
50
|
|
|
|
|
|
|
|
51
|
0
|
0
|
|
|
|
|
my $log = Net::SinFP3::Log::Console->new( |
52
|
|
|
|
|
|
|
level => 0, |
53
|
|
|
|
|
|
|
) or return $self->log->error("active_signature_export: log failed"); |
54
|
|
|
|
|
|
|
|
55
|
0
|
0
|
|
|
|
|
my $global = Net::SinFP3::Global->new( |
56
|
|
|
|
|
|
|
log => $log, |
57
|
|
|
|
|
|
|
) or return $self->log->error("active_signature_export: global failed"); |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
my $input = Net::SinFP3::Input::Null->new(global => $global); |
60
|
0
|
|
|
|
|
|
my $search = Net::SinFP3::Search::Null->new(global => $global); |
61
|
0
|
|
|
|
|
|
my $mode = Net::SinFP3::Mode::Null->new(global => $global); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
my $db = Net::SinFP3::DB::SinFP3->new( |
64
|
|
|
|
|
|
|
global => $global, |
65
|
|
|
|
|
|
|
db => $file, |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my $output = Net::SinFP3::Output::Export->new( |
69
|
|
|
|
|
|
|
global => $global, |
70
|
|
|
|
|
|
|
); |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
my $sinfp3 = Net::SinFP3->new( |
73
|
|
|
|
|
|
|
global => $global, |
74
|
|
|
|
|
|
|
input => [ $input ], |
75
|
|
|
|
|
|
|
db => [ $db ], |
76
|
|
|
|
|
|
|
mode => [ $mode ], |
77
|
|
|
|
|
|
|
search => [ $search ], |
78
|
|
|
|
|
|
|
output => [ $output ], |
79
|
|
|
|
|
|
|
); |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
my $res = $sinfp3->run; |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
$log->post; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $res; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
# |
89
|
|
|
|
|
|
|
# sinfp3.pl -input-null -db-sinfp3 -db-file FILE -mode-null -search-null -output ExportP |
90
|
|
|
|
|
|
|
# |
91
|
|
|
|
|
|
|
sub passive_signature_export { |
92
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
93
|
0
|
|
|
|
|
|
my ($file) = @_; |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
0
|
|
|
|
$file ||= $self->db; |
96
|
0
|
0
|
|
|
|
|
$self->brik_help_run_undef_arg('passive_signature_export', $file) or return; |
97
|
0
|
0
|
|
|
|
|
$self->brik_help_run_file_not_found('passive_signature_export', $file) or return; |
98
|
|
|
|
|
|
|
|
99
|
0
|
0
|
|
|
|
|
my $log = Net::SinFP3::Log::Console->new( |
100
|
|
|
|
|
|
|
level => 0, |
101
|
|
|
|
|
|
|
) or return $self->log->error("passive_signature_export: log failed"); |
102
|
|
|
|
|
|
|
|
103
|
0
|
0
|
|
|
|
|
my $global = Net::SinFP3::Global->new( |
104
|
|
|
|
|
|
|
log => $log, |
105
|
|
|
|
|
|
|
) or return $self->log->error("passive_signature_export: global failed"); |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
|
|
|
my $input = Net::SinFP3::Input::Null->new(global => $global); |
108
|
0
|
|
|
|
|
|
my $search = Net::SinFP3::Search::Null->new(global => $global); |
109
|
0
|
|
|
|
|
|
my $mode = Net::SinFP3::Mode::Null->new(global => $global); |
110
|
|
|
|
|
|
|
|
111
|
0
|
|
|
|
|
|
my $db = Net::SinFP3::DB::SinFP3->new( |
112
|
|
|
|
|
|
|
global => $global, |
113
|
|
|
|
|
|
|
db => $file, |
114
|
|
|
|
|
|
|
); |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
my $output = Net::SinFP3::Output::ExportP->new( |
117
|
|
|
|
|
|
|
global => $global, |
118
|
|
|
|
|
|
|
); |
119
|
|
|
|
|
|
|
|
120
|
0
|
|
|
|
|
|
my $sinfp3 = Net::SinFP3->new( |
121
|
|
|
|
|
|
|
global => $global, |
122
|
|
|
|
|
|
|
input => [ $input ], |
123
|
|
|
|
|
|
|
db => [ $db ], |
124
|
|
|
|
|
|
|
mode => [ $mode ], |
125
|
|
|
|
|
|
|
search => [ $search ], |
126
|
|
|
|
|
|
|
output => [ $output ], |
127
|
|
|
|
|
|
|
); |
128
|
|
|
|
|
|
|
|
129
|
0
|
|
|
|
|
|
my $res = $sinfp3->run; |
130
|
|
|
|
|
|
|
|
131
|
0
|
|
|
|
|
|
$log->post; |
132
|
|
|
|
|
|
|
|
133
|
0
|
|
|
|
|
|
return $res; |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
1; |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
__END__ |