internet

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ internet ] in KIDS
글 쓴 이(By): chopin (** 쇼팽 **)
날 짜 (Date): 1995년09월27일(수) 22시33분04초 KDT
제 목(Title): 우리마을 네트여행 스크립트

저번에 올릴때 잘못이 있었나 봅니다. 다시 올립니다.

chmod +x <filename>

한다음 실행하시면 됩니다.

------------------->> cut here <<------------------------------
#!/bin/sh 
#
#       define the standout() and standend() escape sequences...
#       사용: bbsnet.sh <utmp num>
#       작성자: 지 순기(skji@eve.kaist.ac.kr)
#               정 성영(syjung@adam.kaist.ac.kr
#                       chopin@csone.kaist.ac.kr)
#     edited by 엄상일(sangil@math.kaist.ac.kr) 
#
SO=""
SE=""

trap 'rm -f pingerror.tmp; exit' 0 1 2 3 15

stty pass8 -istrip cs8 
stty erase 

# simon 95/03/15
SORT=/usr/bin/sort
HCODE=/usr/local/bin/hcode
RLOGIN=/usr/ucb/rlogin
TELNET=/usr/ucb/telnet
MORE=/usr/ucb/more
HEAD=/usr/ucb/HEAD
RSH=/usr/ucb/rsh
PING=/usr/etc/ping
CLEAR=/usr/ucb/clear
FINGER=/usr/ucb/finger
pingtimeout=10

#192.132.248.165 충대비비 bbs  flowerbbs
while true

do

$CLEAR

echo -n "[우리마을/다른 마을로...]

${SO}번호 비비이름      번호 비비이름        특수서비스                         
 ${SE}
                                                          
[ 0] 우리마을      [16]*무른모네집      [40] Archie           작성자 : 정성영
[ 1] 아라비비      [17] 연세대비비      [41] Gopher                    지순기
[ 2] 아키사랑      [18] 큐피드비비      [42] WWW                       엄상일
[ 3] 이화비비      [19] 경영마을        [43] NetFind                   1995.8.
[ 4] 소리읽기      [20] 하나비비        [44] 도서관 정보
[ 5] 충남대비비    [21] 과수원비비      [45] WAIS
[ 6] 키즈          [22] X세대비비                    
[ 7] 벤쯔리조텔    [23]*한남누리비비    [56]*나래머드
[ 8]*ET-BBS        [24] YCV비비         [57]*아버머드
[ 9] TWINS         [25] KREONet NIC     [59]*바둑서비스
[10] 다크넷        [26] 행정종합정보!   
[11] 언더비        [27] 플뤄비          [60] 우리마을비비 현사용자
[12] 천리안        [28] 나우누리        [61] 아라비비 현재사용자
[13] 포스비        [29] KAIST 전산비비  [62]*X Service
[14] ICE 비비      [30] 문수골 비비                     
[15] VS비비        [31] 천마비비        ${SO}[q] 끝내기${SE}

*표가 있는 곳은 현재 연결되지 않는 곳입니다.
                                       
선택하세요[q]: "

# 세팅해야 할 변수들
# protocol              S=script, F=finger, T=telnet, R=rlogin R=mud
# targethostname        symbolic host name
# targethostip          dotted decimal
# username
# scriptfile            maybe 'bin/XXXXXX'
# service               bbslog파일에 기록될 내용 한 줄
# targetport            머드할 때 사용되는 포트

if read CHOICE
then
    protocol=""
    targethostname=""
    targethostip=""
    username=""
    scriptfile=""
    service=""
    targetport=""
    case $CHOICE in
        '')
            ${CLEAR}
            exit
            ;;
       q) 
            ${CLEAR}
            exit
            ;;
    esac
    $CLEAR
    echo "[우리마을] / [여행]"
    case "${CHOICE}" in
        '')
            protocol="N"
            ;;
        0)  service="우리마을"
            targethostname="csqueen.kaist.ac.kr"
            protocol="R"
            username="bbs"
            ;;

        1)
            service="아라비비"
            targethostname="ara.kaist.ac.kr"
            protocol="R"
            username="bbs"
            ;;

        2)
            service="아키사랑"
            targethostname="camars.kaist.ac.kr"
            protocol="R"
            username="bbs"
            ;;
        3)
            service="이화비비"
            targethostname="arch.ewha.ac.kr"
            protocol="R"
            username="bbs"
            ;;
        4)
            service="소리읽기비비"
            targethostname="bulsai.kaist.ac.kr"
            protocol="R"
            username="bbs"
            ;;
        5)
        
        #    service="뉴스그룹"
        #    targethostip="143.248.1.82"
        #    username="sonnim"
        #    protocol="T"
        #    ;;
            service="충남대비비"
            targethostname="flower.comeng.chungnam.ac.kr"
            protocol="R"
            username="comeng"
            ;;
        6)
            service="키즈"
            #targethostip="kids.kotel.co.kr"
            #protocol="T"
            targethostname="kids.kotel.co.kr"
            protocol="R"
            username="kids"
            ;;
        7)
            service="벤츠리조텔"
            protocol="R"
            targethostname="pride.kotel.co.kr"
            username="bbs"
            ;;
        8)
            service="ETBBS"
            #targethostip="129.254.11.7"
            targethostname="sde.etri.re.kr"
            username="bbs"
            protocol="R"
            ;;
        9)
            service="트윈스비비"
            targethostip="star.gsw.re.kr"
            protocol="T"
            username="twins"
            ;;
        10)
            service="다크넷"
            protocol="R" 
            targethostname="sdt200.keri.re.kr"
            username="bbs"
            ;;
        11)
            service="언더넷"
            targethostname="korea.slip.umd.edu"
            protocol="R"
            username="bbs"
            ;;
        12)
            service="천리안"
            username="자기 ID"
            protocol="T"
            targethostip="164.124.101.4"
            ;;
        13)
            service="포스비"
            username="posb"
            protocol="T"
            targethostip="141.223.97.12"
            ;;
        14)
            service="아이스비비"
            targethostname="infocomm3.chungnam.ac.kr"
            username="bbs"
            protocol="R"
            ;;
            #service="부산대비비"
            #targethostname="cebbs.pusan.ac.kr"
            #targethostip="164.125.64.220"
            #username="bbs"
            #protocol="T"
            #service="달송비비"
            #targethostname="dalssong.kaist.ac.kr"
            #username="bbs"
            #protocol="R"
        15)
            #service="라이온비비"
            #targethostname="lion.postech.ac.kr"
            #protocol="T"
            #username="bbs"
            service="VS비비"
            targethostname="pansori.kaist.ac.kr"
            username="bbs"
            protocol="R"
            ;;
        16)
            service="무른모네집" 
            protocol="R"
            targethostname="rana.postech.ac.kr"
            username="bbs"
            ;;
        17)
            service="연세대비비"
            protocol="R"
            targethostname="zeus.yonsei.ac.kr"
            username="bbs"
            ;;
        18)
            service="큐피드비비"
            protocol="R"
            targethostname="cupid.kyungpook.ac.kr"
            targethostip="155.230.23.13"
            username="bbs"
            ;;
        19)
            service="경영마을"
            protocol="R"
            targethostname="ms.kaist.ac.kr"
            username="bbs"
            ;;
        20) 
        service="하나비비"
            protocol="T"
            targethostname="36.16.0.36"
            username="bbs"
            ;;
    21) 
        service="과수원비비"
        protocol="R"
        targethostname="math1.kaist.ac.kr"
        username="bbs"
        ;;
    22)
        service="X세대비비"
        protocol="R"
        targethostname="ss-10.kyunghee.ac.kr"
        username="xbbs"
        ;;
    23)
        service="한남누리비비"
        protocol="R"
        targethostname="adam.hannam.ac.kr"
        username="bbs" 
        ;;
    24)
        service="YCV비비"
        protocol="T"
        targethostname="lily.yonsei.ac.kr"
        username="bbs"
        ;;
    25)
        service="KREONet"
        protocol="T"
        targethostname="garam.kreonet.re.kr"
        targethostip="134.75.30.11"
        username="nic"
        ;;
    26)
        service="행정종합정보"
        protocol="T"
        targethostname="gccvax.gcc.go.kr"
        targethostip="152.99.1.1"
        username="CAIS"
        ;;
    27) 
        service="플뤄비"
        protocol="R"
        targethostname="far0040.urh.uiuc.edu"
        username="bbs"
        ;;
        28)
                service="나우누리"
                protocol="T"
                targethostip="203.255.208.22"
                username=""
                ;;
        29)
                service="KAIST전산비비"
                targethostname="noah.kaist.ac.kr"
                protocol="R"
                username="bbs"
                ;;
        30)
                service="문수골 비비"
                targethostname="munsu.ulsan.ac.kr"
                protocol="R"
                username="bbs"
                ;;
        31)
                service="천마비비"
                #targethostname="dalgu.yeungnam.ac.kr"
                targethostip="165.229.11.5"
                protocol="T"
                username="bbs"
                ;;
        40)
            service="Archie"
            protocol="S"
            scriptfile="bin/ARCHIE"
            ;;
        41)
            service="Gopher"
            protocol="S"
            scriptfile="bin/GOPHER"
            ;;
        42)
            service="WWW"
            protocol="S"
            scriptfile="bin/WWW"
            ;;
        43)
            service="NetFind"
            protocol="S"
            scriptfile="bin/NETFIND"
            ;;
        44)
            service="도서관정보"
            protocol="S"
            scriptfile="bin/LIB"
            ;;
        45)
            service="WAIS"
            protocol="S"
            scriptfile="bin/WAIS"
            ;;
        56)
            service="나래머드"
            targethostname="narai.kaist.ac.kr"
            targethostip="143.248.171.28"
            targetport="4001"
            protocol="M"
            ;;
        57)
            service="아버머드"
            targethostname="camars.kaist.ac.kr"
            targethostip="143.248.174.2"
            targetport="6715"
            protocol="M"
            ;;
        59)
                service="바둑"
                targethostname="monami.kaist.ac.kr"
                targethostip="143.248.173.51"
                targetport="6555"
                protocol="M"
                ;;
        60)
            # 다음 변수를 세트하세요 ----------------------------
            service="우리마을사용자"
            targethostname="csqueen.kaist.ac.kr"
            targethostip="143.248.172.62"
            protocol="F"
            username="bbs"
            ;;
        61)
            # 다음 변수를 세트하세요 ----------------------------
            service="아라사용자"
            targethostname="ara.kaist.ac.kr"
            targethostip="143.248.8.5"
            protocol="F"
            username=".user"
            ;;

        # 62)
            #service="엑스서비스"
            #protocol="S"
            #scriptfile="bin/Xservice.sh"
          #  ;;

        *)
            echo ""
            echo ""
            echo "${SO}${CHOICE}: 없는 번호입니다. ${SE}"
            echo "<리턴을 눌러주세요>"
            protocol="continue"
            read KEY
            ;;
    esac

    # 실행 ----------------------------------------------
    echo "$service" >> bbslog
    case "$protocol" in
        F)  echo -n "$pingtimeout초동안 연결을 시도합니다 "
            echo -n "($username@$targethostname)... "
            targethost=$targethostname 
            ;;
        M)  echo -n "$pingtimeout초동안 연결을 시도합니다 "
            if [ $?targethostname ]; then
                echo -n "($targethostname "
                targethost=$targethostname
            else
                echo -n "($targethostip "
                targethost=$targethostip
            fi
            echo -n "/ 포트$targetport)... " 
            ;;
        T)  echo -n "$pingtimeout초동안 연결을 시도합니다 ($username@"
            case $targethostname in
                "") echo -n "$targethostip)... " 
                    targethost=$targethostip ;;
                *)  echo -n "$targethostname)... " 
                    targethost=$targethostname ;;
            esac 
            ;;
        R)  echo -n "$pingtimeout초동안 연결을 시도합니다 ($username@"
            echo -n "$targethostname)... "
            targethost=$targethostname
            ;;

    esac
    case $protocol in
        S)  echo "스크립트를 실행합니다. ($scriptfile)"
            if [ -r bin/replace_utmp ] 
            then
                bin/replace_utmp .UTMP $service $1 ; \
            fi
            $scriptfile $1
            ;;

        continue)
            ;;

        *)
        $PING $targethost $pingtimeout > pingerror.tmp && ( echo "성공."; \
        if [ -r bin/replace_utmp ] 
        then
            bin/replace_utmp .UTMP $service $1 ; \
        fi
        case "$protocol" in \
            "R")  \
                ( ${RLOGIN} $targethost -l $username ) ;; \
            "T") \
                ( echo "로그인네임은 ($username)입니다"; \
                  echo ""; \
                  ${TELNET} $targethost ) \
                  ;;
            "M")  \
                ( ${TELNET} $targethost $targetport ) ;; \
            "F")  \
                #( ${FINGER} $username@$targethost|$SORT -t +.38|$MORE; 
                #( ${FINGER} $username@$targethost|$HCODE -rk|$MORE; 
                ( ${FINGER} $username@$targethost|$MORE; 
                  echo -n "[리턴을 눌러주세요]... "; \
                  read KEY; ) \
        esac ;\
      ) \
        || ( echo "실패."; echo "연결되지 않습니다."; sleep 1 ) ;;
    esac
    if [ -r bin/replace_utmp ] 
    then
        bin/replace_utmp .UTMP 네트여행 $1
    fi 
else
    exit
fi
done

$CLEAR

[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.