mirror of
https://github.com/lord-alfred/ipranges.git
synced 2025-12-19 03:37:47 +00:00
Add bingbot
This commit is contained in:
20
bing/downloader.sh
Normal file
20
bing/downloader.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://www.bing.com/webmasters/help/verify-bingbot-2195837f
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
|
||||
# get from public ranges
|
||||
curl -s https://www.bing.com/toolbox/bingbot.json > /tmp/bing.json
|
||||
|
||||
|
||||
# save ipv4
|
||||
jq '.prefixes[] | [.ipv4Prefix][] | select(. != null)' -r /tmp/bing.json > /tmp/bing-ipv4.txt
|
||||
|
||||
# ipv6 not provided
|
||||
|
||||
|
||||
# sort & uniq
|
||||
sort -h /tmp/bing-ipv4.txt | uniq > bing/ipv4.txt
|
||||
Reference in New Issue
Block a user