| 1 | # $Id: ScanDetails.pm 18 2008-05-05 23:55:18Z jabra $ | ||||||||||
| 2 | package MetasploitExpress::Parser::ScanDetails; | ||||||||||
| 3 | { | ||||||||||
| 4 | 1 | ▶ | use Object::InsideOut; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use XML::LibXML; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use MetasploitExpress::Parser::Host; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use MetasploitExpress::Parser::Event; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use MetasploitExpress::Parser::Task; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use MetasploitExpress::Parser::Service; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use MetasploitExpress::Parser::Report; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | my @hosts : Field : Arg(hosts) : Get(hosts) : | |||||||||
| 13 | Type(List(MetasploitExpress::Parser::Host)); | ||||||||||
| 14 | 1 | my @events : Field : Arg(events) : Get(events) : | |||||||||
| 15 | Type(List(MetasploitExpress::Parser::Event)); | ||||||||||
| 16 | 1 | my @tasks : Field : Arg(tasks) : Get(tasks) : | |||||||||
| 17 | Type(List(MetasploitExpress::Parser::Task)); | ||||||||||
| 18 | 1 | my @services : Field : Arg(services) : Get(services) : | |||||||||
| 19 | Type(List(MetasploitExpress::Parser::Service)); | ||||||||||
| 20 | 1 | my @reports : Field : Arg(reports) : Get(reports) : | |||||||||
| 21 | Type(List(MetasploitExpress::Parser::Report)); | ||||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: not called CC=62 SCAR=82.7
Pod
undocumented
| |||||||||||
| 24 | 0 | my ( $self, $parser, $doc ) = @_; | |||||||||
| 25 | |||||||||||
| 26 | 0 | my $xpc = XML::LibXML::XPathContext->new($doc); | |||||||||
| 27 | 0 | my ( @hosts, @events, @tasks, @reports, @services ); | |||||||||
| 28 | |||||||||||
| 29 | 0 | foreach my $i ( $xpc->findnodes('//MetasploitExpressV3/hosts/host') ) | |||||||||
| 30 | { | ||||||||||
| 31 | my $address | ||||||||||
| 32 | 0 | = scalar( @{ $i->getElementsByTagName('address') } ) > 0 | |||||||||
| 33 | 0 | ▶ | ? @{ $i->getElementsByTagName('address') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | : undef; | ||||||||||
| 35 | my $address6 | ||||||||||
| 36 | 0 | = scalar( @{ $i->getElementsByTagName('address6') } ) > 0 | |||||||||
| 37 | 0 | ▶ | ? @{ $i->getElementsByTagName('address6') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | : undef; | ||||||||||
| 39 | my $arch | ||||||||||
| 40 | 0 | = scalar( @{ $i->getElementsByTagName('arch') } ) > 0 | |||||||||
| 41 | 0 | ▶ | ? @{ $i->getElementsByTagName('arch') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | : undef; | ||||||||||
| 43 | my $comm | ||||||||||
| 44 | 0 | = scalar( @{ $i->getElementsByTagName('comm') } ) > 0 | |||||||||
| 45 | 0 | ▶ | ? @{ $i->getElementsByTagName('comm') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 46 | : undef; | ||||||||||
| 47 | my $comments | ||||||||||
| 48 | 0 | = scalar( @{ $i->getElementsByTagName('comments') } ) > 0 | |||||||||
| 49 | 0 | ▶ | ? @{ $i->getElementsByTagName('comments') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 50 | : undef; | ||||||||||
| 51 | my $id | ||||||||||
| 52 | 0 | = scalar( @{ $i->getElementsByTagName('id') } ) > 0 | |||||||||
| 53 | 0 | ▶ | ? @{ $i->getElementsByTagName('id') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 54 | : undef; | ||||||||||
| 55 | my $info | ||||||||||
| 56 | 0 | = scalar( @{ $i->getElementsByTagName('info') } ) > 0 | |||||||||
| 57 | 0 | ▶ | ? @{ $i->getElementsByTagName('info') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 58 | : undef; | ||||||||||
| 59 | my $created_at | ||||||||||
| 60 | 0 | = scalar( @{ $i->getElementsByTagName('created-at') } ) > 0 | |||||||||
| 61 | 0 | ▶ | ? @{ $i->getElementsByTagName('created-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 62 | ->textContent() | ||||||||||
| 63 | : undef; | ||||||||||
| 64 | my $mac | ||||||||||
| 65 | 0 | = scalar( @{ $i->getElementsByTagName('mac') } ) > 0 | |||||||||
| 66 | 0 | ▶ | ? @{ $i->getElementsByTagName('mac') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 67 | : undef; | ||||||||||
| 68 | my $name | ||||||||||
| 69 | 0 | = scalar( @{ $i->getElementsByTagName('name') } ) > 0 | |||||||||
| 70 | 0 | ▶ | ? @{ $i->getElementsByTagName('name') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 71 | : undef; | ||||||||||
| 72 | my $os_flavor | ||||||||||
| 73 | 0 | = scalar( @{ $i->getElementsByTagName('os-flavor') } ) > 0 | |||||||||
| 74 | 0 | ▶ | ? @{ $i->getElementsByTagName('os-flavor') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 75 | : undef; | ||||||||||
| 76 | my $os_lang | ||||||||||
| 77 | 0 | = scalar( @{ $i->getElementsByTagName('os-flavor') } ) > 0 | |||||||||
| 78 | 0 | ▶ | ? @{ $i->getElementsByTagName('os-lang') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 79 | : undef; | ||||||||||
| 80 | my $os_name | ||||||||||
| 81 | 0 | = scalar( @{ $i->getElementsByTagName('os-name') } ) > 0 | |||||||||
| 82 | 0 | ▶ | ? @{ $i->getElementsByTagName('os-name') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 83 | : undef; | ||||||||||
| 84 | my $os_sp | ||||||||||
| 85 | 0 | = scalar( @{ $i->getElementsByTagName('os-sp') } ) > 0 | |||||||||
| 86 | 0 | ▶ | ? @{ $i->getElementsByTagName('os-sp') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 87 | : undef; | ||||||||||
| 88 | my $purpose | ||||||||||
| 89 | 0 | = scalar( @{ $i->getElementsByTagName('purpose') } ) > 0 | |||||||||
| 90 | 0 | ▶ | ? @{ $i->getElementsByTagName('purpose') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 91 | : undef; | ||||||||||
| 92 | my $state | ||||||||||
| 93 | 0 | = scalar( @{ $i->getElementsByTagName('state') } ) > 0 | |||||||||
| 94 | 0 | ▶ | ? @{ $i->getElementsByTagName('state') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 95 | : undef; | ||||||||||
| 96 | my $updated_at | ||||||||||
| 97 | 0 | = scalar( @{ $i->getElementsByTagName('updated-at') } ) > 0 | |||||||||
| 98 | 0 | ▶ | ? @{ $i->getElementsByTagName('updated-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 99 | ->textContent() | ||||||||||
| 100 | : undef; | ||||||||||
| 101 | my $workspace_id | ||||||||||
| 102 | 0 | = scalar( @{ $i->getElementsByTagName('workspace-id') } ) > 0 | |||||||||
| 103 | 0 | ▶ | ? @{ $i->getElementsByTagName('workspace-id') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 104 | ->textContent() | ||||||||||
| 105 | : undef; | ||||||||||
| 106 | 0 | my $host = MetasploitExpress::Parser::Host->new( | |||||||||
| 107 | address => $address, | ||||||||||
| 108 | address6 => $address6, | ||||||||||
| 109 | arch => $arch, | ||||||||||
| 110 | comm => $comm, | ||||||||||
| 111 | comments => $comments, | ||||||||||
| 112 | created_at => $created_at, | ||||||||||
| 113 | id => $id, | ||||||||||
| 114 | info => $info, | ||||||||||
| 115 | mac => $mac, | ||||||||||
| 116 | name => $name, | ||||||||||
| 117 | os_lang => $os_lang, | ||||||||||
| 118 | os_name => $os_name, | ||||||||||
| 119 | os_flavor => $os_flavor, | ||||||||||
| 120 | os_sp => $os_sp, | ||||||||||
| 121 | purpose => $purpose, | ||||||||||
| 122 | state => $state, | ||||||||||
| 123 | updated_at => $updated_at, | ||||||||||
| 124 | workspace_id => $workspace_id, | ||||||||||
| 125 | ); | ||||||||||
| 126 | 0 | push( @hosts, $host ); | |||||||||
| 127 | } | ||||||||||
| 128 | |||||||||||
| 129 | 0 | foreach my $i ( | |||||||||
| 130 | $xpc->findnodes('//MetasploitExpressV3/services/service') ) | ||||||||||
| 131 | { | ||||||||||
| 132 | my $service = MetasploitExpress::Parser::Service->new( | ||||||||||
| 133 | 0 | id => scalar( @{ $i->getElementsByTagName('id') } ) > 0 | |||||||||
| 134 | 0 | ▶ | ? @{ $i->getElementsByTagName('id') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 135 | : undef, | ||||||||||
| 136 | 0 | name => scalar( @{ $i->getElementsByTagName('name') } ) > 0 | |||||||||
| 137 | 0 | ▶ | ? @{ $i->getElementsByTagName('name') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 138 | : undef, | ||||||||||
| 139 | 0 | host_id => scalar( @{ $i->getElementsByTagName('host-id') } ) | |||||||||
| 140 | > 0 | ||||||||||
| 141 | 0 | ▶ | ? @{ $i->getElementsByTagName('host-id') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 142 | : undef, | ||||||||||
| 143 | 0 | info => scalar( @{ $i->getElementsByTagName('info') } ) > 0 | |||||||||
| 144 | 0 | ▶ | ? @{ $i->getElementsByTagName('info') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 145 | : undef, | ||||||||||
| 146 | 0 | port => scalar( @{ $i->getElementsByTagName('port') } ) > 0 | |||||||||
| 147 | 0 | ▶ | ? @{ $i->getElementsByTagName('port') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 148 | : undef, | ||||||||||
| 149 | 0 | proto => scalar( @{ $i->getElementsByTagName('proto') } ) > 0 | |||||||||
| 150 | 0 | ▶ | ? @{ $i->getElementsByTagName('proto') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 151 | : undef, | ||||||||||
| 152 | 0 | state => scalar( @{ $i->getElementsByTagName('state') } ) > 0 | |||||||||
| 153 | 0 | ▶ | ? @{ $i->getElementsByTagName('state') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 154 | : undef, | ||||||||||
| 155 | updated_at => | ||||||||||
| 156 | 0 | scalar( @{ $i->getElementsByTagName('updated-at') } ) > 0 | |||||||||
| 157 | 0 | ▶ | ? @{ $i->getElementsByTagName('updated-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 158 | ->textContent() | ||||||||||
| 159 | : undef, | ||||||||||
| 160 | created_at => | ||||||||||
| 161 | 0 | scalar( @{ $i->getElementsByTagName('created-at') } ) > 0 | |||||||||
| 162 | 0 | ▶ | ? @{ $i->getElementsByTagName('created-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 163 | ->textContent() | ||||||||||
| 164 | : undef, | ||||||||||
| 165 | |||||||||||
| 166 | ); | ||||||||||
| 167 | 0 | push( @services, $service ); | |||||||||
| 168 | } | ||||||||||
| 169 | |||||||||||
| 170 | 0 | foreach | |||||||||
| 171 | my $i ( $xpc->findnodes('//MetasploitExpressV3/events/event') ) | ||||||||||
| 172 | { | ||||||||||
| 173 | my $event = MetasploitExpress::Parser::Event->new( | ||||||||||
| 174 | created_at => | ||||||||||
| 175 | 0 | scalar( @{ $i->getElementsByTagName('created-at') } ) > 0 | |||||||||
| 176 | 0 | ▶ | ? @{ $i->getElementsByTagName('created-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 177 | ->textContent() | ||||||||||
| 178 | : undef, | ||||||||||
| 179 | critical => | ||||||||||
| 180 | 0 | scalar( @{ $i->getElementsByTagName('critical') } ) > 0 | |||||||||
| 181 | 0 | ▶ | ? @{ $i->getElementsByTagName('critical') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 182 | : undef, | ||||||||||
| 183 | 0 | host_id => scalar( @{ $i->getElementsByTagName('host-id') } ) | |||||||||
| 184 | > 0 | ||||||||||
| 185 | 0 | ▶ | ? @{ $i->getElementsByTagName('host-id') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 186 | : undef, | ||||||||||
| 187 | 0 | id => scalar( @{ $i->getElementsByTagName('id') } ) > 0 | |||||||||
| 188 | 0 | ▶ | ? @{ $i->getElementsByTagName('id') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 189 | : undef, | ||||||||||
| 190 | 0 | name => scalar( @{ $i->getElementsByTagName('name') } ) > 0 | |||||||||
| 191 | 0 | ▶ | ? @{ $i->getElementsByTagName('name') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 192 | : undef, | ||||||||||
| 193 | 0 | seen => scalar( @{ $i->getElementsByTagName('seen') } ) > 0 | |||||||||
| 194 | 0 | ▶ | ? @{ $i->getElementsByTagName('seen') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 195 | : undef, | ||||||||||
| 196 | updated_at => | ||||||||||
| 197 | 0 | scalar( @{ $i->getElementsByTagName('updated-at') } ) > 0 | |||||||||
| 198 | 0 | ▶ | ? @{ $i->getElementsByTagName('updated-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 199 | ->textContent() | ||||||||||
| 200 | : undef, | ||||||||||
| 201 | workspace_id => | ||||||||||
| 202 | 0 | scalar( @{ $i->getElementsByTagName('workspace-id') } ) | |||||||||
| 203 | > 0 | ||||||||||
| 204 | 0 | ▶ | ? @{ $i->getElementsByTagName('workspace-id') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 205 | ->textContent() | ||||||||||
| 206 | : undef, | ||||||||||
| 207 | |||||||||||
| 208 | ); | ||||||||||
| 209 | 0 | push( @events, $event ); | |||||||||
| 210 | } | ||||||||||
| 211 | |||||||||||
| 212 | 0 | foreach my $i ( $xpc->findnodes('//MetasploitExpressV3/tasks/task') ) | |||||||||
| 213 | { | ||||||||||
| 214 | my $task = MetasploitExpress::Parser::Task->new( | ||||||||||
| 215 | completed_at => | ||||||||||
| 216 | 0 | scalar( @{ $i->getElementsByTagName('completed-at') } ) | |||||||||
| 217 | > 0 | ||||||||||
| 218 | 0 | ▶ | ? @{ $i->getElementsByTagName('completed-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 219 | ->textContent() | ||||||||||
| 220 | : undef, | ||||||||||
| 221 | created_at => | ||||||||||
| 222 | 0 | scalar( @{ $i->getElementsByTagName('created-at') } ) > 0 | |||||||||
| 223 | 0 | ▶ | ? @{ $i->getElementsByTagName('created-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 224 | ->textContent() | ||||||||||
| 225 | : undef, | ||||||||||
| 226 | created_by => | ||||||||||
| 227 | 0 | scalar( @{ $i->getElementsByTagName('created_by') } ) > 0 | |||||||||
| 228 | 0 | ▶ | ? @{ $i->getElementsByTagName('created_by') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 229 | ->textContent() | ||||||||||
| 230 | : undef, | ||||||||||
| 231 | description => | ||||||||||
| 232 | 0 | scalar( @{ $i->getElementsByTagName('description') } ) > 0 | |||||||||
| 233 | 0 | ▶ | ? @{ $i->getElementsByTagName('description') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 234 | ->textContent() | ||||||||||
| 235 | : undef, | ||||||||||
| 236 | 0 | error => scalar( @{ $i->getElementsByTagName('error') } ) > 0 | |||||||||
| 237 | 0 | ▶ | ? @{ $i->getElementsByTagName('error') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 238 | : undef, | ||||||||||
| 239 | 0 | id => scalar( @{ $i->getElementsByTagName('id') } ) > 0 | |||||||||
| 240 | 0 | ▶ | ? @{ $i->getElementsByTagName('id') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 241 | : undef, | ||||||||||
| 242 | 0 | module => scalar( @{ $i->getElementsByTagName('module') } ) | |||||||||
| 243 | > 0 | ||||||||||
| 244 | 0 | ▶ | ? @{ $i->getElementsByTagName('module') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 245 | : undef, | ||||||||||
| 246 | 0 | path => scalar( @{ $i->getElementsByTagName('path') } ) > 0 | |||||||||
| 247 | 0 | ▶ | ? @{ $i->getElementsByTagName('path') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 248 | : undef, | ||||||||||
| 249 | progress => | ||||||||||
| 250 | 0 | scalar( @{ $i->getElementsByTagName('progress') } ) > 0 | |||||||||
| 251 | 0 | ▶ | ? @{ $i->getElementsByTagName('progress') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 252 | : undef, | ||||||||||
| 253 | 0 | result => scalar( @{ $i->getElementsByTagName('result') } ) | |||||||||
| 254 | > 0 | ||||||||||
| 255 | 0 | ▶ | ? @{ $i->getElementsByTagName('result') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 256 | : undef, | ||||||||||
| 257 | updated_at => | ||||||||||
| 258 | 0 | scalar( @{ $i->getElementsByTagName('updated-at') } ) > 0 | |||||||||
| 259 | 0 | ▶ | ? @{ $i->getElementsByTagName('updated-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 260 | ->textContent() | ||||||||||
| 261 | : undef, | ||||||||||
| 262 | workspace_id => | ||||||||||
| 263 | 0 | scalar( @{ $i->getElementsByTagName('workspace-id') } ) | |||||||||
| 264 | > 0 | ||||||||||
| 265 | 0 | ▶ | ? @{ $i->getElementsByTagName('workspace-id') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 266 | ->textContent() | ||||||||||
| 267 | : undef, | ||||||||||
| 268 | ); | ||||||||||
| 269 | 0 | push( @tasks, $task ); | |||||||||
| 270 | } | ||||||||||
| 271 | |||||||||||
| 272 | 0 | foreach | |||||||||
| 273 | my $i ( $xpc->findnodes('//MetasploitExpressV3/reports/report') ) | ||||||||||
| 274 | { | ||||||||||
| 275 | my $report = MetasploitExpress::Parser::Report->new( | ||||||||||
| 276 | created_at => | ||||||||||
| 277 | 0 | scalar( @{ $i->getElementsByTagName('created-at') } ) > 0 | |||||||||
| 278 | 0 | ▶ | ? @{ $i->getElementsByTagName('created-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 279 | ->textContent() | ||||||||||
| 280 | : undef, | ||||||||||
| 281 | created_by => | ||||||||||
| 282 | 0 | scalar( @{ $i->getElementsByTagName('created-by') } ) > 0 | |||||||||
| 283 | 0 | ▶ | ? @{ $i->getElementsByTagName('created-by') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 284 | ->textContent() | ||||||||||
| 285 | : undef, | ||||||||||
| 286 | 0 | id => scalar( @{ $i->getElementsByTagName('id') } ) > 0 | |||||||||
| 287 | 0 | ▶ | ? @{ $i->getElementsByTagName('id') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 288 | : undef, | ||||||||||
| 289 | 0 | path => scalar( @{ $i->getElementsByTagName('path') } ) > 0 | |||||||||
| 290 | 0 | ▶ | ? @{ $i->getElementsByTagName('path') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 291 | : undef, | ||||||||||
| 292 | 0 | rtype => scalar( @{ $i->getElementsByTagName('rtype') } ) > 0 | |||||||||
| 293 | 0 | ▶ | ? @{ $i->getElementsByTagName('rtype') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 294 | : undef, | ||||||||||
| 295 | 0 | options => scalar( @{ $i->getElementsByTagName('options') } ) | |||||||||
| 296 | > 0 | ||||||||||
| 297 | 0 | ▶ | ? @{ $i->getElementsByTagName('options') }[0]->textContent() | ||||||||
|
Branch: 1 branch
| |||||||||||
| 298 | : undef, | ||||||||||
| 299 | updated_at => | ||||||||||
| 300 | 0 | scalar( @{ $i->getElementsByTagName('updated-at') } ) > 0 | |||||||||
| 301 | 0 | ▶ | ? @{ $i->getElementsByTagName('updated-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 302 | ->textContent() | ||||||||||
| 303 | : undef, | ||||||||||
| 304 | workspace_id => | ||||||||||
| 305 | 0 | scalar( @{ $i->getElementsByTagName('workspace-id') } ) | |||||||||
| 306 | > 0 | ||||||||||
| 307 | 0 | ▶ | ? @{ $i->getElementsByTagName('workspace-id') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 308 | ->textContent() | ||||||||||
| 309 | : undef, | ||||||||||
| 310 | downloaded_at => | ||||||||||
| 311 | 0 | scalar( @{ $i->getElementsByTagName('downloaded-at') } ) | |||||||||
| 312 | > 0 | ||||||||||
| 313 | 0 | ▶ | ? @{ $i->getElementsByTagName('downloaded-at') }[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 314 | ->textContent() | ||||||||||
| 315 | : undef, | ||||||||||
| 316 | |||||||||||
| 317 | ); | ||||||||||
| 318 | 0 | push( @reports, $report ); | |||||||||
| 319 | } | ||||||||||
| 320 | |||||||||||
| 321 | 0 | return MetasploitExpress::Parser::ScanDetails->new( | |||||||||
| 322 | hosts => \@hosts, | ||||||||||
| 323 | reports => \@reports, | ||||||||||
| 324 | tasks => \@tasks, | ||||||||||
| 325 | events => \@events, | ||||||||||
| 326 | services => \@services, | ||||||||||
| 327 | ); | ||||||||||
| 328 | } | ||||||||||
| 329 | |||||||||||
| 330 | 0 | ▶ | sub all_hosts { | ||||||||
|
Subroutine
all_hosts: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 331 | 0 | my ($self) = @_; | |||||||||
| 332 | 0 | my @hosts = @{ $self->hosts }; | |||||||||
| 333 | 0 | return @hosts; | |||||||||
| 334 | } | ||||||||||
| 335 | |||||||||||
| 336 | 0 | ▶ | sub all_services { | ||||||||
|
Subroutine
all_services: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 337 | 0 | my ($self) = @_; | |||||||||
| 338 | 0 | my @services = @{ $self->services }; | |||||||||
| 339 | 0 | return @services; | |||||||||
| 340 | } | ||||||||||
| 341 | |||||||||||
| 342 | 0 | ▶ | sub all_events { | ||||||||
|
Subroutine
all_events: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 343 | 0 | my ($self) = @_; | |||||||||
| 344 | 0 | my @events = @{ $self->events }; | |||||||||
| 345 | 0 | return @events; | |||||||||
| 346 | } | ||||||||||
| 347 | |||||||||||
| 348 | 0 | ▶ | sub all_tasks { | ||||||||
|
Subroutine
all_tasks: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 349 | 0 | my ($self) = @_; | |||||||||
| 350 | 0 | my @tasks = @{ $self->tasks }; | |||||||||
| 351 | 0 | return @tasks; | |||||||||
| 352 | } | ||||||||||
| 353 | |||||||||||
| 354 | 0 | ▶ | sub all_reports { | ||||||||
|
Subroutine
all_reports: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 355 | 0 | my ($self) = @_; | |||||||||
| 356 | 0 | my @reports = @{ $self->reports }; | |||||||||
| 357 | 0 | return @reports; | |||||||||
| 358 | } | ||||||||||
| 359 | } | ||||||||||
| 360 | 1 | 1; | |||||||||