FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
uap-cpp/parse_ua_simple.cpp at master · aitech-lab/uap-cpp · GitHub
aitech-lab
uap-cpp
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
uap-cpp
/
parse_ua_simple.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (27 loc) · 920 Bytes
Breadcrumbs
uap-cpp
/
parse_ua_simple.cpp
Copy path
File metadata and controls
31 lines (27 loc) · 920 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
include
"
UaParser.h
"
using
namespace
uap_cpp
;
#
include
<
iostream
>
#
include
<
string
>
using
namespace
std
;
int
main
(
void
) {
UserAgentParser
p
(
"
uap-core/regexes.yaml
"
);
for
(string line;
getline
(cin, line);) {
UserAgent ua = p.
parse
(line);
cout
<< ua.
browser
.
family
<<
"
\t
"
<< ua.
browser
.
major
<<
"
\t
"
<< ua.
browser
.
minor
<<
"
\t
"
<< ua.
browser
.
patch
<<
"
\t
"
<< ua.
browser
.
patch_minor
<<
"
\t
"
<< ua.
os
.
family
<<
"
\t
"
<< ua.
os
.
major
<<
"
\t
"
<< ua.
os
.
minor
<<
"
\t
"
<< ua.
os
.
patch
<<
"
\t
"
<< ua.
os
.
patch_minor
<<
"
\t
"
<< ua.
device
.
family
<<
"
\t
"
<< ua.
device
.
brand
<<
"
\t
"
<< ua.
device
.
model
<<
"
\t
"
<<
"
\n
"
;
}
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL