Skip to content

Commit

Permalink
Windows Phone running Opera
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsbasjes committed Oct 14, 2020
1 parent ce98661 commit af869dc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@ v5.20-SNAPSHOT
- New/improved detections
- Ghostery 3.0
- OpenConnect VPN client, Cisco AnyConnect, NMap imitating AnyConnect
- Windows Phone (via Opera)
- Build
- Disable sonarcloud on JDK 8
- Updated UDF dependencies
Expand Down
42 changes: 42 additions & 0 deletions analyzer/src/main/resources/UserAgents/WindowsPhone.yaml
Expand Up @@ -571,6 +571,17 @@ config:
extract:
- 'DeviceCpuBits : 199 :LookUp[WindowsPhoneOSCpuBits;agent.product]'

# Edge case: No version for Windows Phone and possibly without "ARM"
- matcher:
require:
- 'agent.(1)product.(1)comments.entry.(1)text="Windows Phone"'
extract:
- 'DeviceClass : 10 :"Phone"'
- 'OperatingSystemClass : 1 :"Mobile"'
- 'OperatingSystemName : 1 :"Windows Phone"'
- 'OperatingSystemVersion : 1 :"<<<null>>>"'
- 'OperatingSystemNameVersion : 1 :"Windows Phone ??"'

# Smartphones classified as desktops "Windows NT 6.2; ARM" --> Windows Phone 8
- test:
input:
Expand Down Expand Up @@ -726,3 +737,34 @@ config:
AgentVersionMajor : '7'
AgentNameVersion : 'IE Mobile 7.0'
AgentNameVersionMajor : 'IE Mobile 7'


# Windows Phone without a version
- test:
input:
user_agent_string: 'Opera/9.80 (Windows Phone; Opera Mini/8.1.0/37.6116; U; en) Presto/2.12.423 Version/12.16'
expected:
DeviceClass : 'Phone'
DeviceName : 'Unknown'
DeviceBrand : 'Unknown'
OperatingSystemClass : 'Mobile'
OperatingSystemName : 'Windows Phone'
OperatingSystemVersion : '??'
OperatingSystemVersionMajor : '??'
OperatingSystemNameVersion : 'Windows Phone ??'
OperatingSystemNameVersionMajor : 'Windows Phone ??'
LayoutEngineClass : 'Browser'
LayoutEngineName : 'Presto'
LayoutEngineVersion : '2.12.423'
LayoutEngineVersionMajor : '2'
LayoutEngineNameVersion : 'Presto 2.12.423'
LayoutEngineNameVersionMajor : 'Presto 2'
AgentClass : 'Browser'
AgentName : 'Opera Mini'
AgentVersion : '8.1.0'
AgentVersionMajor : '8'
AgentNameVersion : 'Opera Mini 8.1.0'
AgentNameVersionMajor : 'Opera Mini 8'
AgentLanguage : 'English'
AgentLanguageCode : 'en'
AgentSecurity : 'Strong security'

0 comments on commit af869dc

Please sign in to comment.