line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Woothee::MobilePhone; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
45
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
175
|
|
4
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
137
|
|
5
|
6
|
|
|
6
|
|
30
|
use Carp; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
359
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
47
|
use Woothee::Util qw/update_map update_category update_version update_os/; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
296
|
|
8
|
6
|
|
|
6
|
|
33
|
use Woothee::DataSet qw/dataset/; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
6049
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = "v1.10.0"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub challenge_docomo { |
13
|
333
|
|
|
333
|
0
|
603
|
my ($ua, $result) = @_; |
14
|
|
|
|
|
|
|
|
15
|
333
|
100
|
100
|
|
|
1851
|
return 0 if (index($ua, "DoCoMo") < 0 and index($ua, ";FOMA;") < 0); |
16
|
|
|
|
|
|
|
|
17
|
18
|
|
|
|
|
31
|
my $version; |
18
|
18
|
100
|
|
|
|
133
|
if ($ua =~ m{DoCoMo/[.0-9]+[ /]([^- /;()"']+)}o) { |
|
|
50
|
|
|
|
|
|
19
|
12
|
|
|
|
|
34
|
$version = $1; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
elsif ($ua =~ m{\(([^;)]+);FOMA;}o) { |
22
|
6
|
|
|
|
|
20
|
$version = $1; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
else { |
25
|
0
|
|
|
|
|
0
|
$version = Woothee::DataSet->const('VALUE_UNKNOWN'); |
26
|
|
|
|
|
|
|
} |
27
|
18
|
|
|
|
|
49
|
update_map($result, dataset("docomo")); |
28
|
18
|
|
|
|
|
61
|
update_version($result, $version); |
29
|
18
|
|
|
|
|
55
|
return 1; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub challenge_au { |
33
|
315
|
|
|
315
|
0
|
557
|
my ($ua, $result) = @_; |
34
|
|
|
|
|
|
|
|
35
|
315
|
100
|
|
|
|
1071
|
return 0 if index($ua, "KDDI-") < 0; |
36
|
|
|
|
|
|
|
|
37
|
6
|
|
|
|
|
12
|
my $version; |
38
|
|
|
|
|
|
|
# fix Woothee::OS::challenge_mobile if you want to fix here |
39
|
6
|
50
|
|
|
|
43
|
if ($ua =~ m{KDDI-([^- /;()"']+)}o) { |
40
|
6
|
|
|
|
|
19
|
$version = $1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
else { |
43
|
0
|
|
|
|
|
0
|
$version = Woothee::DataSet->const('VALUE_UNKNOWN'); |
44
|
|
|
|
|
|
|
} |
45
|
6
|
|
|
|
|
19
|
update_map($result, dataset("au")); |
46
|
6
|
|
|
|
|
23
|
update_version($result, $version); |
47
|
6
|
|
|
|
|
20
|
return 1; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub challenge_softbank { |
51
|
309
|
|
|
309
|
0
|
560
|
my ($ua, $result) = @_; |
52
|
|
|
|
|
|
|
|
53
|
309
|
100
|
100
|
|
|
2036
|
return 0 if index($ua, "SoftBank") < 0 and index($ua, "Vodafone") < 0 and index($ua, "J-PHONE") < 0; |
|
|
|
100
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
21
|
|
|
|
|
34
|
my $version; |
56
|
21
|
50
|
|
|
|
177
|
if ($ua =~ m{(?:SoftBank|Vodafone|J-PHONE)/[.0-9]+/([^ /;()]+)}o) { |
57
|
21
|
|
|
|
|
61
|
$version = $1; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
else { |
60
|
0
|
|
|
|
|
0
|
$version = Woothee::DataSet->const('VALUE_UNKNOWN'); |
61
|
|
|
|
|
|
|
} |
62
|
21
|
|
|
|
|
56
|
update_map($result, dataset("SoftBank")); |
63
|
21
|
|
|
|
|
68
|
update_version($result, $version); |
64
|
21
|
|
|
|
|
61
|
return 1; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub challenge_willcom { |
68
|
288
|
|
|
288
|
0
|
509
|
my ($ua, $result) = @_; |
69
|
|
|
|
|
|
|
|
70
|
288
|
100
|
100
|
|
|
1496
|
return 0 if index($ua, "WILLCOM") < 0 and index($ua, "DDIPOCKET") < 0; |
71
|
|
|
|
|
|
|
|
72
|
9
|
|
|
|
|
21
|
my $version; |
73
|
|
|
|
|
|
|
# fix Woothee::OS::challenge_mobile if you want to fix here |
74
|
9
|
50
|
|
|
|
74
|
if ($ua =~ m{(?:WILLCOM|DDIPOCKET);[^/]+/([^ /;()]+)}o) { |
75
|
9
|
|
|
|
|
31
|
$version = $1; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
else { |
78
|
0
|
|
|
|
|
0
|
$version = Woothee::DataSet->const('VALUE_UNKNOWN'); |
79
|
|
|
|
|
|
|
} |
80
|
9
|
|
|
|
|
31
|
update_map($result, dataset("willcom")); |
81
|
9
|
|
|
|
|
36
|
update_version($result, $version); |
82
|
9
|
|
|
|
|
33
|
return 1; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub challenge_misc { |
86
|
279
|
|
|
279
|
0
|
478
|
my ($ua, $result) = @_; |
87
|
|
|
|
|
|
|
|
88
|
279
|
100
|
|
|
|
741
|
if (index($ua, "jig browser") > -1) { |
89
|
9
|
|
|
|
|
88
|
update_map($result, dataset("jig")); |
90
|
9
|
100
|
|
|
|
64
|
if ($ua =~ m{jig browser[^;]+; ([^);]+)}o) { |
91
|
6
|
|
|
|
|
20
|
update_version($result, $1); |
92
|
|
|
|
|
|
|
} |
93
|
9
|
|
|
|
|
36
|
return 1; |
94
|
|
|
|
|
|
|
} |
95
|
270
|
100
|
100
|
|
|
1534
|
if (index($ua, "emobile/") > -1 || index($ua, "OpenBrowser") > -1 || index($ua, "Browser/Obigo-Browser") > -1) { |
|
|
|
100
|
|
|
|
|
96
|
12
|
|
|
|
|
37
|
update_map($result, dataset("emobile")); |
97
|
12
|
|
|
|
|
44
|
return 1; |
98
|
|
|
|
|
|
|
} |
99
|
258
|
50
|
|
|
|
642
|
if (index($ua, "SymbianOS") > -1) { |
100
|
0
|
|
|
|
|
0
|
update_map($result, dataset("SymbianOS")); |
101
|
0
|
|
|
|
|
0
|
return 1; |
102
|
|
|
|
|
|
|
} |
103
|
258
|
50
|
|
|
|
631
|
if (index($ua, "Hatena-Mobile-Gateway/") > -1) { |
104
|
0
|
|
|
|
|
0
|
update_map($result, dataset("MobileTranscoder")); |
105
|
0
|
|
|
|
|
0
|
update_version($result, "Hatena"); |
106
|
0
|
|
|
|
|
0
|
return 1; |
107
|
|
|
|
|
|
|
} |
108
|
258
|
100
|
|
|
|
652
|
if (index($ua, "livedoor-Mobile-Gateway/") > -1) { |
109
|
3
|
|
|
|
|
12
|
update_map($result, dataset("MobileTranscoder")); |
110
|
3
|
|
|
|
|
11
|
update_version($result, "livedoor"); |
111
|
3
|
|
|
|
|
98
|
return 1; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
255
|
|
|
|
|
579
|
return 0; |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
1; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
__END__ |