Skip to content

Instantly share code, notes, and snippets.

View codernirdesh's full-sized avatar
🏠
Working from home

Nirdesh pokharel codernirdesh

🏠
Working from home
View GitHub Profile
@regmicmahesh
regmicmahesh / tiktok.sh
Last active June 4, 2024 19:31
Tiktok DNS Updater
#!/bin/bash
set -e
grep -v "#Managed by DNS Updater" /etc/hosts | sudo tee /etc/hosts > /dev/null
DOMAINS=(www.tiktok.com sf16-website-login.neutral.ttwstatic.com im-api-sg.tiktok.com mcs-sg.tiktok.com mcs-va.tiktokv.com p16-sign.tiktokcdn-us.com webcast.tiktok.com mon.tiktokv.com p19-sign.tiktokcdn-us.com p16-sign-sg.tiktokcdn.com p16-sign-va.tiktokcdn.com p77-sign-va.tiktokcdn.com v16-webapp-prime.tiktok.com p16-sign-useast2a.tiktokcdn.com p16-sg.tiktokcdn.com vmweb-sg.byteoversea.com s20.tiktokcdn.com mssdk-sg.tiktok.com p16-sign-va.tiktokcdn.com pull-flv-l11-sg01.tiktokcdn.com pull-flv-l1-sg01.tiktokcdn.com)
for i in ${DOMAINS[@]}; do
ip=$(curl -s "https://dns.google/resolve?name=$i&type=A" --compressed | jq -r '.Answer[] | select(.type == 1) | .data' | head -n 1)