Skip to content

Commit

Permalink
feat: add support to new DuckDuckGo user-agents
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Azevedo authored and lbarthon committed Apr 9, 2024
1 parent 7f417c8 commit cfa5164
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,14 @@ user_agent_parsers:
family_replacement: 'QQ Browser'

# DuckDuckGo
- regex: 'Mobile.{0,200}(DuckDuckGo)/(\d+)'
- regex: 'Mozilla.{1,200}Mobile.{1,100}(DuckDuckGo)/(\d+)'
family_replacement: 'DuckDuckGo Mobile'
- regex: 'Mozilla.{1,200}(DuckDuckGo)/(\d+)'
family_replacement: 'DuckDuckGo'
- regex: 'Mozilla.{1,200}Mobile.{1,100}(Ddg)/(\d+)(?:\.(\d+)|)'
family_replacement: 'DuckDuckGo Mobile'
- regex: 'Mozilla.{1,200}(Ddg)/(\d+)(?:\.(\d+)|)'
family_replacement: 'DuckDuckGo'

# Tenta Browser
- regex: '(Tenta/)(\d+)\.(\d+)\.(\d+)'
Expand Down
12 changes: 12 additions & 0 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8442,6 +8442,18 @@ test_cases:
minor:
patch:

- user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1 Ddg/17.2'
family: 'DuckDuckGo Mobile'
major: '17'
minor: '2'
patch:

- user_agent_string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15 Ddg/17.2'
family: 'DuckDuckGo'
major: '17'
minor: '2'
patch:

- user_agent_string: 'Mozilla/5.0 [en] (X11, U; OpenVAS-VT 8.0.9)'
family: 'OpenVAS Scanner'
major: '8'
Expand Down

0 comments on commit cfa5164

Please sign in to comment.