Created
December 18, 2023 23:32
-
-
Save imaami/f188ed09860bc7ef0f80e186e4c0ddbe to your computer and use it in GitHub Desktop.
Cisco Umbrella is a perfect system without flaws
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Usage (_only_ if you really know what you're doing): | |
# etc_hosts_dig.sh >> /etc/hosts | |
# expand this list as needed | |
declare -a hosts_list=( | |
api.openai.com | |
auth0.openai.com | |
cdn.openai.com | |
chat.openai.com | |
openai.com | |
tcr9i.chat.openai.com | |
dl.winehq.org | |
jabberwock.ucw.cz | |
music.youtube.com | |
pci-ids.ucw.cz | |
ww1.microchip.com | |
xpra.org | |
yoctoproject.blogspot.com | |
youtube.com | |
"$@" | |
) | |
printf '# %s\n' "Generated with $(which "$0")" \ | |
'because Cisco Umbrella is a complete shit show' | |
printf '%s\n' "${hosts_list[@]}" | LC_ALL=C sort -u \ | |
| xargs -I§ bash -c 'dig @8.8.8.8 § +noall +answer \ | |
| grep -E "[[:blank:]]IN[[:blank:]]+A[[:blank:]]" \ | |
| head -1 | sed -E "s/^.*[[:blank:]](.+)$/\1\t§/"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment