| blib/lib/Duadua/Parser/Bot/Log4Shell.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 10 | 10 | 100.0 |
| branch | 1 | 2 | 50.0 |
| condition | 4 | 6 | 66.6 |
| subroutine | 3 | 3 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 19 | 22 | 86.3 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Duadua::Parser::Bot::Log4Shell; | ||||||
| 2 | 6 | 6 | 40 | use strict; | |||
| 6 | 20 | ||||||
| 6 | 236 | ||||||
| 3 | 6 | 6 | 34 | use warnings; | |||
| 6 | 11 | ||||||
| 6 | 720 | ||||||
| 4 | |||||||
| 5 | sub try { | ||||||
| 6 | 139 | 139 | 1 | 280 | my ($class, $d) = @_; | ||
| 7 | |||||||
| 8 | 139 | 50 | 66 | 303 | if ( index($d->ua, '${') == 0 && index($d->ua, '://') > -1 && $d->ua =~ m!\}$! ) { | ||
| 66 | |||||||
| 9 | 1 | 7 | my $h = { | ||||
| 10 | name => 'Log4Shell', | ||||||
| 11 | is_bot => 1, | ||||||
| 12 | }; | ||||||
| 13 | |||||||
| 14 | 1 | 5 | return $h; | ||||
| 15 | } | ||||||
| 16 | } | ||||||
| 17 | |||||||
| 18 | 1; | ||||||
| 19 | |||||||
| 20 | __END__ |