adding duckduckbot and duckassistbot (#28)

* Create downloader.sh

* Create downloader.sh

* Update README.md

* Create downloader.sh

* Update downloader.sh

* Delete duckassist directory
This commit is contained in:
Ketanest
2026-03-16 20:32:47 +01:00
committed by GitHub
parent 69321ec108
commit 0a20d4036b
3 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# https://duckduckgo.com/duckduckgo-help-pages/results/duckassistbot
set -euo pipefail
set -x
# get from public ranges
curl -s https://duckduckgo.com/duckassistbot.json > /tmp/duckassistbot.json
# save ipv4
jq '.prefixes[] | [.ipv4Prefix][] | select(. != null)' -r /tmp/duckassistbot.json > /tmp/duckassistbot-ipv4.txt
# there's no ipv6 known yet
# save ipv6
#jq '.ipv6_prefixes[] | [.ipv6_prefix][] | select(. != null)' -r /tmp/duckassistbot.json > /tmp/duckassistbot-ipv6.txt
# sort & uniq
sort -V /tmp/duckassistbot-ipv4.txt | uniq > duckassistbot/ipv4.txt
# sort -V /tmp/duckassistbot-ipv6.txt | uniq > duckassistbot/ipv6.txt