-
-
Save jnorthrup/d48bdfe5c02fc9decce254fca9ca1417 to your computer and use it in GitHub Desktop.
Indonesian reddit DNS script
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
#use google dns webservice | |
#as root | |
for i in $@ | |
do | |
eval echo $( | |
curl -s 'https://dns.google.com/resolve?name='${i[@]}'&type=A'| | |
jq -S '.Answer[-1].data' | |
) $i | | |
grep -v null | | |
tee -a /etc/hosts | |
done |
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
#use google dns service | |
#as root | |
for i in $@ | |
do x=( $( nslookup $i 8.8.8.8 ) ) | |
echo ${x[-1]} ${i} | |
done >>/etc/hosts |
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
#as root, using vpn | |
./gdns about.reddit.com a.thumbs.redditmedia.com b.thumbs.redditmedia.com events.reddit.com gateway.reddit.com g.redditmedia.com i.redd.it i.redditmedia.com new.reddit.com oauth.reddit.com old.reddit.com out.reddit.com pixel.redditmedia.com reddit.com redditgifts.com sendbird.reddit.com stats.redditmedia.com v.redd.it www.reddit.com www.reddithelp.com www.redditmedia.com www.redditstatic.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment