Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- declare -A DNS
- DNS["KTDNS"]="168.126.63.1 168.126.63.2"
- DNS["SKBroadBand"]="210.220.163.82 219.250.36.130"
- DNS["LGUPlus"]="164.124.101.2 203.248.252.2"
- DNS["LGHelloVision"]="180.182.54.1 180.182.54.2"
- DNS["Dacom"]="164.124.101.2 203.248.252.2"
- DNS["PowerCom"]="164.124.107.9"
- DNS["DreamLine"]="210.181.1.24 210.181.4.25"
- DNS["Google"]="8.8.8.8 8.8.4.4"
- DNS["CloudFlare"]="1.1.1.1 1.0.0.1"
- for SERVICE in "${!DNS[@]}"; do
- echo ===================================
- echo ======= $SERVICE
- echo ===================================
- for NS in ${DNS[$SERVICE]}; do
- if [[ "x$2" == "x" ]]; then
- nslookup $1 $NS
- else
- nslookup $2 $1 $NS
- fi
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement