line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::HTTPClient::HTTPClient; |
2
|
6
|
|
|
6
|
|
33
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
157
|
|
3
|
6
|
|
|
6
|
|
23
|
use warnings; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
17464
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub try { |
6
|
290
|
|
|
290
|
1
|
596
|
my ($class, $d) = @_; |
7
|
|
|
|
|
|
|
|
8
|
290
|
|
100
|
|
|
723
|
return $class->_cli($d) |
9
|
|
|
|
|
|
|
|| $class->_perl($d) |
10
|
|
|
|
|
|
|
|| $class->_python($d) |
11
|
|
|
|
|
|
|
|| $class->_php($d) |
12
|
|
|
|
|
|
|
|| $class->_java($d) |
13
|
|
|
|
|
|
|
|| $class->_golang($d) |
14
|
|
|
|
|
|
|
|| $class->_ruby($d) |
15
|
|
|
|
|
|
|
|| $class->_javascript($d) |
16
|
|
|
|
|
|
|
|| $class->_vb($d) |
17
|
|
|
|
|
|
|
|| $class->_tool($d) |
18
|
|
|
|
|
|
|
; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _cli { |
22
|
290
|
|
|
290
|
|
610
|
my ($class, $d) = @_; |
23
|
|
|
|
|
|
|
|
24
|
290
|
100
|
|
|
|
558
|
if ( index($d->ua, 'curl/') == 0 ) { |
|
|
100
|
|
|
|
|
|
25
|
2
|
|
|
|
|
5
|
my $h = { |
26
|
|
|
|
|
|
|
name => 'Curl', |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
30
|
1
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m!^curl/([\d.]+)!); |
31
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
|
|
10
|
return $h; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Wget/') > -1 ) { |
37
|
4
|
|
|
|
|
12
|
my $h = { |
38
|
|
|
|
|
|
|
name => 'Wget', |
39
|
|
|
|
|
|
|
}; |
40
|
4
|
100
|
|
|
|
11
|
if ( index($d->ua, 'linux-') > -1 ) { |
|
|
50
|
|
|
|
|
|
41
|
2
|
|
|
|
|
6
|
$h->{is_linux} = 1; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
elsif ( index($d->ua, 'mingw32') > -1 ) { |
44
|
2
|
|
|
|
|
6
|
$h->{is_windows} = 1; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
4
|
100
|
|
|
|
11
|
if ($d->opt_version) { |
48
|
2
|
|
|
|
|
7
|
my ($version) = ($d->ua =~ m!^Wget/([\d.]+)!); |
49
|
2
|
50
|
|
|
|
10
|
$h->{version} = $version if $version; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
4
|
|
|
|
|
20
|
return $h; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub _perl { |
57
|
284
|
|
|
284
|
|
573
|
my ($class, $d) = @_; |
58
|
|
|
|
|
|
|
|
59
|
284
|
|
|
|
|
413
|
my $h; |
60
|
|
|
|
|
|
|
|
61
|
284
|
100
|
100
|
|
|
552
|
if ( index($d->ua, 'libwww-perl/') > -1 ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
62
|
4
|
|
|
|
|
13
|
$h = { |
63
|
|
|
|
|
|
|
name => 'libwww-perl', |
64
|
|
|
|
|
|
|
}; |
65
|
|
|
|
|
|
|
|
66
|
4
|
100
|
|
|
|
10
|
if ($d->opt_version) { |
67
|
2
|
|
|
|
|
7
|
my ($version) = ($d->ua =~ m!libwww-perl/([\d.]+)!); |
68
|
2
|
50
|
|
|
|
9
|
$h->{version} = $version if $version; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
elsif ( index($d->ua, 'WWW-Mechanize/') > -1 ) { |
72
|
2
|
|
|
|
|
6
|
$h = { |
73
|
|
|
|
|
|
|
name => 'WWW-Mechanize', |
74
|
|
|
|
|
|
|
}; |
75
|
|
|
|
|
|
|
|
76
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
77
|
1
|
|
|
|
|
3
|
my ($version) = ($d->ua =~ m!^WWW-Mechanize/([\d.]+)!); |
78
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
elsif ( index($d->ua, 'LWP::Simple/') > -1 || index($d->ua, 'lwp-trivial/') > -1 ) { |
82
|
4
|
|
|
|
|
13
|
$h = { |
83
|
|
|
|
|
|
|
name => 'LWP::Simple', |
84
|
|
|
|
|
|
|
}; |
85
|
|
|
|
|
|
|
|
86
|
4
|
100
|
|
|
|
9
|
if ($d->opt_version) { |
87
|
2
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m!^lwp[^/]+/([\d.]+)!i); |
88
|
2
|
50
|
|
|
|
11
|
$h->{version} = $version if $version; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Furl::HTTP/') > -1 ) { |
92
|
2
|
|
|
|
|
6
|
$h = { |
93
|
|
|
|
|
|
|
name => 'Furl', |
94
|
|
|
|
|
|
|
}; |
95
|
|
|
|
|
|
|
|
96
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
97
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Furl::HTTP/([\d.]+)!); |
98
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
elsif ( index($d->ua, 'SOAP::Lite/Perl/') > -1 ) { |
102
|
2
|
|
|
|
|
7
|
$h = { |
103
|
|
|
|
|
|
|
name => 'SOAP::Lite Perl', |
104
|
|
|
|
|
|
|
}; |
105
|
|
|
|
|
|
|
|
106
|
2
|
100
|
|
|
|
5
|
if ($d->opt_version) { |
107
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^SOAP::Lite/Perl/([\d.]+)!); |
108
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
elsif ( index($d->ua, 'MT::Plugin::BadLinkFinder/') > -1 ) { |
112
|
2
|
|
|
|
|
5
|
$h = { |
113
|
|
|
|
|
|
|
name => 'MT::Plugin::BadLinkFinder', |
114
|
|
|
|
|
|
|
}; |
115
|
|
|
|
|
|
|
|
116
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
117
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^MT::Plugin::BadLinkFinder/([\d.]+)!); |
118
|
1
|
50
|
|
|
|
7
|
$h->{version} = $version if $version; |
119
|
|
|
|
|
|
|
} |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
284
|
|
|
|
|
1343
|
return $h; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub _python { |
126
|
268
|
|
|
268
|
|
589
|
my ($class, $d) = @_; |
127
|
|
|
|
|
|
|
|
128
|
268
|
|
|
|
|
433
|
my $h; |
129
|
|
|
|
|
|
|
|
130
|
268
|
100
|
|
|
|
554
|
if ( index($d->ua, 'Python-urllib/') > -1 ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
131
|
2
|
|
|
|
|
7
|
$h = { |
132
|
|
|
|
|
|
|
name => 'Python-urllib', |
133
|
|
|
|
|
|
|
}; |
134
|
|
|
|
|
|
|
|
135
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
136
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Python-urllib/([\d.]+)!); |
137
|
1
|
50
|
|
|
|
8
|
$h->{version} = $version if $version; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
elsif ( index($d->ua, 'PycURL/') > -1 ) { |
141
|
2
|
|
|
|
|
6
|
$h = { |
142
|
|
|
|
|
|
|
name => 'PycURL', |
143
|
|
|
|
|
|
|
}; |
144
|
|
|
|
|
|
|
|
145
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
146
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^PycURL/([\d.]+)!); |
147
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
elsif ( index($d->ua, 'HTTPie/') > -1 ) { |
151
|
2
|
|
|
|
|
6
|
$h = { |
152
|
|
|
|
|
|
|
name => 'HTTPie', |
153
|
|
|
|
|
|
|
}; |
154
|
|
|
|
|
|
|
|
155
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
156
|
1
|
|
|
|
|
3
|
my ($version) = ($d->ua =~ m!^HTTPie/([\d.]+)!); |
157
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
} |
160
|
|
|
|
|
|
|
elsif ( index($d->ua, 'AdsTxtCrawler/') > -1 ) { |
161
|
2
|
|
|
|
|
6
|
$h = { |
162
|
|
|
|
|
|
|
name => 'AdsTxtCrawler', |
163
|
|
|
|
|
|
|
}; |
164
|
|
|
|
|
|
|
|
165
|
2
|
100
|
|
|
|
5
|
if ($d->opt_version) { |
166
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^AdsTxtCrawler/([\d.]+)!); |
167
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
} |
170
|
|
|
|
|
|
|
elsif ( index($d->ua, 'python-requests/') > -1 ) { |
171
|
2
|
|
|
|
|
7
|
$h = { |
172
|
|
|
|
|
|
|
name => 'python-requests', |
173
|
|
|
|
|
|
|
}; |
174
|
|
|
|
|
|
|
|
175
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
176
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^python-requests/([\d.]+)!); |
177
|
1
|
50
|
|
|
|
7
|
$h->{version} = $version if $version; |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
} |
180
|
|
|
|
|
|
|
elsif ( index($d->ua, ' aiohttp/') > -1 ) { |
181
|
2
|
|
|
|
|
6
|
$h = { |
182
|
|
|
|
|
|
|
name => 'aiohttp', |
183
|
|
|
|
|
|
|
}; |
184
|
|
|
|
|
|
|
|
185
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
186
|
1
|
|
|
|
|
3
|
my ($version) = ($d->ua =~ m!aiohttp/([\d.]+)!); |
187
|
1
|
50
|
|
|
|
7
|
$h->{version} = $version if $version; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
} |
190
|
|
|
|
|
|
|
|
191
|
268
|
|
|
|
|
1234
|
return $h; |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub _php { |
195
|
256
|
|
|
256
|
|
658
|
my ($class, $d) = @_; |
196
|
|
|
|
|
|
|
|
197
|
256
|
|
|
|
|
433
|
my $h; |
198
|
|
|
|
|
|
|
|
199
|
256
|
100
|
100
|
|
|
529
|
if ( index($d->ua, 'GuzzleHttp/') > -1 ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
200
|
2
|
|
|
|
|
7
|
$h = { |
201
|
|
|
|
|
|
|
name => 'Guzzle', |
202
|
|
|
|
|
|
|
}; |
203
|
|
|
|
|
|
|
|
204
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
205
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^GuzzleHttp/([\d.]+)!); |
206
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
elsif ( index($d->ua, 'WordPress/') == 0 || index($d->ua, 'The Incutio XML-RPC PHP Library -- WordPress/') > -1 ) { |
210
|
4
|
|
|
|
|
10
|
$h = { |
211
|
|
|
|
|
|
|
name => 'WordPress', |
212
|
|
|
|
|
|
|
}; |
213
|
|
|
|
|
|
|
|
214
|
4
|
100
|
|
|
|
10
|
if ($d->opt_version) { |
215
|
2
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m!WordPress/([\d.]+)!); |
216
|
2
|
50
|
|
|
|
9
|
$h->{version} = $version if $version; |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
elsif ( index($d->ua, ' PHP/') > -1 ) { |
220
|
2
|
|
|
|
|
6
|
$h = { |
221
|
|
|
|
|
|
|
name => 'PHP', |
222
|
|
|
|
|
|
|
}; |
223
|
|
|
|
|
|
|
|
224
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
225
|
1
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m! PHP/([\d.]+)!); |
226
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
227
|
|
|
|
|
|
|
} |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
elsif ( $d->ua eq 'Zend_XmlRpc_Client' ) { |
230
|
1
|
|
|
|
|
3
|
$h = { |
231
|
|
|
|
|
|
|
name => 'Zend_XmlRpc_Client', |
232
|
|
|
|
|
|
|
}; |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
256
|
|
|
|
|
1095
|
return $h; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
sub _java { |
239
|
247
|
|
|
247
|
|
495
|
my ($class, $d) = @_; |
240
|
|
|
|
|
|
|
|
241
|
247
|
|
|
|
|
311
|
my $h; |
242
|
|
|
|
|
|
|
|
243
|
247
|
100
|
|
|
|
490
|
if ( index($d->ua, 'okhttp/') > -1 ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
244
|
2
|
|
|
|
|
5
|
$h = { |
245
|
|
|
|
|
|
|
name => 'OkHttp', |
246
|
|
|
|
|
|
|
}; |
247
|
|
|
|
|
|
|
|
248
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
249
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^okhttp/([\d.]+)!); |
250
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
} |
253
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Jakarta Commons-HttpClient/') > -1 ) { |
254
|
2
|
|
|
|
|
7
|
$h = { |
255
|
|
|
|
|
|
|
name => 'Jakarta Commons-HttpClient', |
256
|
|
|
|
|
|
|
}; |
257
|
|
|
|
|
|
|
|
258
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
259
|
1
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m!^Jakarta Commons-HttpClient/([\d.]+)!); |
260
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
261
|
|
|
|
|
|
|
} |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Apache-HttpClient/') > -1 ) { |
264
|
2
|
|
|
|
|
7
|
$h = { |
265
|
|
|
|
|
|
|
name => 'Apache-HttpClient', |
266
|
|
|
|
|
|
|
}; |
267
|
|
|
|
|
|
|
|
268
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
269
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Apache-HttpClient/([\d.]+)!); |
270
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
271
|
|
|
|
|
|
|
} |
272
|
|
|
|
|
|
|
} |
273
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Jersey/') > -1 ) { |
274
|
2
|
|
|
|
|
6
|
$h = { |
275
|
|
|
|
|
|
|
name => 'Jersey', |
276
|
|
|
|
|
|
|
}; |
277
|
|
|
|
|
|
|
|
278
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
279
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Jersey/([\d.]+)!); |
280
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Java/') > -1 ) { |
284
|
2
|
|
|
|
|
5
|
$h = { |
285
|
|
|
|
|
|
|
name => 'Java', |
286
|
|
|
|
|
|
|
}; |
287
|
|
|
|
|
|
|
|
288
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
289
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Java/([\d.\_]+)!); |
290
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
291
|
|
|
|
|
|
|
} |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Dalvik/') > -1 ) { |
294
|
2
|
|
|
|
|
7
|
$h = { |
295
|
|
|
|
|
|
|
name => 'HttpURLConnection Dalvik', |
296
|
|
|
|
|
|
|
is_android => 1, |
297
|
|
|
|
|
|
|
is_linux => 1, |
298
|
|
|
|
|
|
|
}; |
299
|
|
|
|
|
|
|
|
300
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
301
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Dalvik/([\d.]+)!); |
302
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
|
306
|
247
|
|
|
|
|
1113
|
return $h; |
307
|
|
|
|
|
|
|
} |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
sub _golang { |
310
|
235
|
|
|
235
|
|
506
|
my ($class, $d) = @_; |
311
|
|
|
|
|
|
|
|
312
|
235
|
100
|
100
|
|
|
442
|
if ( index($d->ua, 'Go-http-client/') > -1 ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
313
|
2
|
|
|
|
|
7
|
my $h = { |
314
|
|
|
|
|
|
|
name => 'Go-http-client', |
315
|
|
|
|
|
|
|
}; |
316
|
|
|
|
|
|
|
|
317
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
318
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Go-http-client/([\d.]+)!); |
319
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
320
|
|
|
|
|
|
|
} |
321
|
|
|
|
|
|
|
|
322
|
2
|
|
|
|
|
13
|
return $h; |
323
|
|
|
|
|
|
|
} |
324
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Go ') > -1 && index($d->ua, ' package http') > -1 ) { |
325
|
2
|
|
|
|
|
7
|
my $h = { |
326
|
|
|
|
|
|
|
name => 'Go http-client', |
327
|
|
|
|
|
|
|
}; |
328
|
|
|
|
|
|
|
|
329
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
330
|
1
|
|
|
|
|
3
|
my ($version) = ($d->ua =~ m!^Go ([\d.]+) !); |
331
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
332
|
|
|
|
|
|
|
} |
333
|
|
|
|
|
|
|
|
334
|
2
|
|
|
|
|
14
|
return $h; |
335
|
|
|
|
|
|
|
} |
336
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Go http package') == 0 ) { |
337
|
1
|
|
|
|
|
4
|
my $h = { |
338
|
|
|
|
|
|
|
name => 'Go http-client', |
339
|
|
|
|
|
|
|
}; |
340
|
|
|
|
|
|
|
|
341
|
1
|
|
|
|
|
6
|
return $h; |
342
|
|
|
|
|
|
|
} |
343
|
|
|
|
|
|
|
} |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
sub _ruby { |
346
|
230
|
|
|
230
|
|
476
|
my ($class, $d) = @_; |
347
|
|
|
|
|
|
|
|
348
|
230
|
100
|
|
|
|
778
|
if ($d->ua eq 'Ruby') { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
349
|
|
|
|
|
|
|
return { |
350
|
1
|
|
|
|
|
8
|
name => 'Ruby', |
351
|
|
|
|
|
|
|
}; |
352
|
|
|
|
|
|
|
} |
353
|
|
|
|
|
|
|
elsif ( index($d->ua, 'http.rb/') > -1 ) { |
354
|
2
|
|
|
|
|
7
|
my $h = { |
355
|
|
|
|
|
|
|
name => 'http.rb', |
356
|
|
|
|
|
|
|
}; |
357
|
|
|
|
|
|
|
|
358
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
359
|
1
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m!^http.rb/([\d.]+)!); |
360
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
361
|
|
|
|
|
|
|
} |
362
|
|
|
|
|
|
|
|
363
|
2
|
|
|
|
|
13
|
return $h; |
364
|
|
|
|
|
|
|
} |
365
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Atig::Http/') > -1 ) { |
366
|
2
|
|
|
|
|
7
|
my $h = { |
367
|
|
|
|
|
|
|
name => 'Atig', |
368
|
|
|
|
|
|
|
}; |
369
|
2
|
50
|
|
|
|
7
|
if ( index($d->ua, 'linux') > -1 ) { |
370
|
2
|
|
|
|
|
6
|
$h->{is_linux} = 1; |
371
|
|
|
|
|
|
|
} |
372
|
|
|
|
|
|
|
|
373
|
2
|
100
|
|
|
|
14
|
if ($d->opt_version) { |
374
|
1
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m!^Atig::Http/([^\s]+)!); |
375
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
376
|
|
|
|
|
|
|
} |
377
|
|
|
|
|
|
|
|
378
|
2
|
|
|
|
|
12
|
return $h; |
379
|
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
elsif ( index($d->ua, 'EventMachine ') > -1 ) { |
381
|
|
|
|
|
|
|
return { |
382
|
1
|
|
|
|
|
8
|
name => 'EventMachine', |
383
|
|
|
|
|
|
|
}; |
384
|
|
|
|
|
|
|
} |
385
|
|
|
|
|
|
|
} |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
sub _vb { |
388
|
222
|
|
|
222
|
|
509
|
my ($class, $d) = @_; |
389
|
|
|
|
|
|
|
|
390
|
222
|
100
|
|
|
|
458
|
if ( index($d->ua, ' WinHttp.WinHttpRequest') > -1 ) { |
391
|
2
|
|
|
|
|
8
|
my $h = { |
392
|
|
|
|
|
|
|
name => 'WinHttpRequest', |
393
|
|
|
|
|
|
|
is_windows => 1, |
394
|
|
|
|
|
|
|
}; |
395
|
|
|
|
|
|
|
|
396
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
397
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m! WinHttp\.WinHttpRequest\.([\d.]+)!); |
398
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
399
|
|
|
|
|
|
|
} |
400
|
|
|
|
|
|
|
|
401
|
2
|
|
|
|
|
11
|
return $h; |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
} |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
sub _javascript { |
406
|
224
|
|
|
224
|
|
545
|
my ($class, $d) = @_; |
407
|
|
|
|
|
|
|
|
408
|
224
|
100
|
|
|
|
506
|
if ( index($d->ua, 'axios/') == 0 ) { |
409
|
2
|
|
|
|
|
7
|
my $h = { |
410
|
|
|
|
|
|
|
name => 'axios', |
411
|
|
|
|
|
|
|
}; |
412
|
|
|
|
|
|
|
|
413
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
414
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!axios/([\d.]+)!); |
415
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
416
|
|
|
|
|
|
|
} |
417
|
|
|
|
|
|
|
|
418
|
2
|
|
|
|
|
12
|
return $h; |
419
|
|
|
|
|
|
|
} |
420
|
|
|
|
|
|
|
} |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
sub _tool { |
423
|
220
|
|
|
220
|
|
523
|
my ($class, $d) = @_; |
424
|
|
|
|
|
|
|
|
425
|
220
|
100
|
|
|
|
457
|
if ( index($d->ua, 'PostmanRuntime') > -1 ) { |
426
|
2
|
|
|
|
|
7
|
my $h = { |
427
|
|
|
|
|
|
|
name => 'Postman', |
428
|
|
|
|
|
|
|
}; |
429
|
|
|
|
|
|
|
|
430
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
431
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!PostmanRuntime/([\d.]+)!); |
432
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
433
|
|
|
|
|
|
|
} |
434
|
|
|
|
|
|
|
|
435
|
2
|
|
|
|
|
11
|
return $h; |
436
|
|
|
|
|
|
|
} |
437
|
|
|
|
|
|
|
} |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
1; |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
__END__ |