lib/Nmap/Scanner/NmapRun.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Nmap/Scanner/Hosts.pm ↑ Summary lib/Nmap/Scanner/OS.pm »
1 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 3 ▶use Class::Generate qw(class);
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 class 'Nmap::Scanner::NmapRun' => {
6 qw(
7 scan_info @Nmap::Scanner::ScanInfo
8 task @Nmap::Scanner::Task
9 run_stats Nmap::Scanner::RunStats
10 scanner $
11 args $
12 start $
13 startstr $
14 version $
15 xmloutputversion $
16 debugging $
17 verbose $
18 ),
19 '&as_xml' => q!
20  
21 # Passed in by Nmap::Scanner::Backend::Results
22 my $hostlist = shift;
23  
24 my $xml = qq(<nmaprun scanner="$self->{scanner}" args="$self->{args}" ) .
25 qq(start="$self->{start}" startstr="$self->{startstr}" ) .
26 qq(version="$self->{version}" ) .
27 qq(xmloutputversion="$self->{xmloutputversion}">\n);
28  
29 for my $si ($self->scan_info()) {
30 $xml .= $si->as_xml();
31 }
32  
33 for my $t ($self->task()) {
34 $xml .= $t->as_xml();
35 }
36  
37 $xml .= qq(<verbose level="$self->{verbose}"/>
38 <debugging level="$self->{debugging}"/>
39 $hostlist);
40  
41 $xml .= $self->{'run_stats'}->as_xml();
42  
43 $xml .= "</nmaprun>\n";
44  
45 return $xml;
46  
47 !
48 };
49  
50 =pod
51  
52 =head1 DESCRIPTION
53  
54 This class represents Nmap Summary/scan information.
55  
56 =head1 PROPERTIES
57  
58 =head2 scan_info()
59  
60 Array of Nmap::Scanner::ScanInfo instances.
61  
62 =head2 tasks()
63  
64 Array of Nmap::Scanner::Task instances.
65  
66 =head2 run_stats()
67  
68 =head2 scanner()
69  
70 =head2 args()
71  
72 Command line arguments used for this scan.
73  
74 =head2 start()
75  
76 Starting time for scan.
77  
78 =head2 startstr()
79  
80 Starting time for scan, ctime format
81  
82 =head2 version()
83  
84 Version of scanner used.
85  
86 =head2 xmloutputversion()
87  
88 =head2 verbose()
89  
90 =head2 debugging()
91  
92 =cut
93  
94 3 1;
« lib/Nmap/Scanner/Hosts.pm ↑ Summary lib/Nmap/Scanner/OS.pm »