Advertisement
xenoside

koreanDnsLookup

Sep 25th, 2023
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.73 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. declare -A DNS
  4.  
  5. DNS["KTDNS"]="168.126.63.1 168.126.63.2"
  6. DNS["SKBroadBand"]="210.220.163.82 219.250.36.130"
  7. DNS["LGUPlus"]="164.124.101.2 203.248.252.2"
  8. DNS["LGHelloVision"]="180.182.54.1 180.182.54.2"
  9. DNS["Dacom"]="164.124.101.2 203.248.252.2"
  10. DNS["PowerCom"]="164.124.107.9"
  11. DNS["DreamLine"]="210.181.1.24 210.181.4.25"
  12. DNS["Google"]="8.8.8.8 8.8.4.4"
  13. DNS["CloudFlare"]="1.1.1.1 1.0.0.1"
  14.  
  15. for SERVICE in "${!DNS[@]}"; do
  16.     echo ===================================
  17.     echo =======      $SERVICE
  18.     echo ===================================
  19.     for NS in ${DNS[$SERVICE]}; do
  20.         if [[ "x$2" == "x" ]]; then
  21.             nslookup $1 $NS
  22.         else
  23.             nslookup $2 $1 $NS
  24.         fi
  25.     done
  26. done
  27.  
Tags: DNS NSLOOKUP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement