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