B / Y / U / S
HOME À¥ È£½ºÆà µµ¸ÞÀÎ ¸Å´º¾ó °í°´Áö¿ø ¼³Á¤Á¤º¸ °èÁ¤½Åû 2024-12-23 Monday 
À¥ È£½ºÆÃ
# °øÁö »çÇ×
# ÀÚÁÖ ¹¯´Â Áú¹®
# Áú¹®°ú ´äº¯
# °¡ÀÔ ¹®ÀÇ
Ä¿¹Â´ÏƼ
# ÀÚÀ¯°Ô½ÃÆÇ
# ¸®´ª½ºÆÁ
# ¾ÆÀÌÅ¥ Å×½ºÆ®
# ³»È¨ ¼Ò°³
# °Ö·¯¸®
# ÀÚ·á½Ç

  ¸®´ª½ºÆÁ  Go Unix Power Tools Online Book Go Bash Guide
Read No. 189 article 2003-05-17 05:59:42
NickName   Ç®ºñ´©
Subject   ±¹³»¸Á nslookup üũ ½ºÅ©¸³Æ®
#!/bin/bash
clear

if [ $(echo $1|sed -n -e '/\./p') ] ;then
        host=$1.
else
        host=$1
fi
echo "DNS HOST LOOKUP °á°ú ----------------"
echo
local=$(nslookup -timeout=1 $host|egrep -i "(Server:|Name:|Address:)")
echo "ºñ´©³Ý ---";echo "^[[1;33;40m$local^[[0m"
echo
be=$(nslookup -timeout=1 $host ns.bora.net 2>&1|grep -c "Non-existent")
if (( $be > 0 ));then
        echo    ">>> ÇØ´ç µµ¸ÞÀÎÀº Dns Host Lookup °á°ú°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù."
        echo -n "### Whois Á¶È¸¸¦ ÇϽðڽÀ´Ï±î? [Y/n] : "
        read whoisok ; [ ! $whoisok ] && whoisok=y
        if [ $whoisok = "y" ] || [ $whoisok = "Y" ];then
        whois $host
        fi
#exit 0
fi

kdns=$(nslookup -timeout=1 $host kns.kornet.net|egrep -i "(Server:|Name:|Address:)")
thrunet=$(nslookup -timeout=1 $host ns.korea.com|egrep -i "(Server:|Name:|Address:)")
hanaro=$(nslookup -timeout=1 $host qns1.hananet.net|egrep -i "(Server:|Name:|Address:)")
dacom=$(nslookup -timeout=1 $host ns.bora.net|egrep -i "(Server:|Name:|Address:)")

echo "ÄÚ  ³Ý ---";echo "^[[1;36;40m$kdns^[[0m"
echo
echo "µÎ·ç³Ý ---";echo "^[[1;33;40m$thrunet^[[0m"
echo
echo "Çϳª·Î ---";echo "^[[1;36;40m$hanaro^[[0m"
echo
echo "µ¥ÀÌÄÞ ---";echo "^[[1;33;40m$dacom^[[0m"
echo

serversetip=$(echo "$local"|grep "Address:"|tail -1|awk '{print $2}')
kdnssetip=$(echo "$kdns"|grep "Address:"|tail -1|awk '{print $2}')

if (( $be == 0 )) && [ ! $serversetip = $kdnssetip ];then
        echo;echo ">>> ÇöÀç ¼­¹ö ¼³Á¤ Lookup IP ¿Í Kornet Lookup IP °¡ ´Ù¸¨´Ï´Ù."
        echo -n "### Whois Á¶È¸¸¦ ÇϽðڽÀ´Ï±î? [Y/n] : "
        read whoisok ; [ ! $whoisok ] && whoisok=y
        if [ $whoisok = "y" ] || [ $whoisok = "Y" ];then
        whois $host
        fi

fi
Regist Addr [ 210.219.138.57 ] ¸ñ·Ïº¸±â À­±Û ¾Æ·§±Û
Á¤±ÔÇ¥Çö½Ä [ »ó¼¼ °Ë»ö ]
Page Loading [ 0.02 Sec ] SQL Time [ 0 Sec ]

Copyleft 1999-2024 by JSBoard Open Project
Theme Designed by IDOO And follow GPL2

°³ÀÎÁ¤º¸ Ãë±Þ¹æħ ÀÌ¿ë ¾à°ü »çÀÌÆ® ¸Ê ¾îµå¹Î °ü¸®