|
|
|
¸®´ª½ºÆÁ Go Unix Power Tools Online Book
Go Bash Guide
|
|
Read No. 84 article |
2002-01-29 19:21:37 |
|
|
|
|
NickName |
Ç®ºñ´© |
Subject |
¿ÜºÎ¿¡¼ ÅÚ³Ý Á¢±Ù ±ÝÁö |
|
|
±Û¾´ÀÌ:ÀÌÁ¤Çö
#!/bin/sh
################################ º¯¼öÁ¤ÀǺι®
# ¸ÞÀÏ ¼ö½ÅÀÚ
mailto=junghyun at junghyun.pe.kr(¹Þ°íÀÚÇÏ´Â ¸ÞÀÏÁÖ¼Ò±âÀÔ)
# ȸéÃâ·Â ¿©ºÎ, ¸ÞÀÏÀü¼Û ¿©ºÎ
dsp=${1}; msg=${2}
# Á¢¼ÓÀÚ Á¤º¸ µî
a=${3}; c=${4}; d=${5}; h=${6}; n=${7}; p=${8}; s=${9}; u=${10}
# ÇöÀç ½Ã°£
time=`date`
hostname=`hostname`
################################ ȸé Ãâ·ÂºÎ¹®
if [ $dsp = Y ]
then
/bin/echo -e "
======================================\n\
N O T I C E \n\
======================================\n\
ÅÚ³ÝÀ» »ç¿ëÇÒ¼ö ¾ø½À´Ï´Ù.!
\n\
Access Time : $time\n\
Client host address : $a\n\
Client information : $c\n\
Client host name(or IP) : $h\n\
Client host name : $n\n\
Client user name : $u\n\n"
fi
################################ ¸ÞÀÏ ¼Û½ÅºÎ¹®
if [ $msg = Y ]
then
/bin/echo -e "
===============================\n\
Á¢¼Ó °ÅºÎÀÚ »ó¼¼Á¤º¸ \n\
===============================\n\
\n\
È®ÀÎµÈ ¼¹ö : $hostname
Access Time : $time\n\
Access client host address : $a\n\
Access client information : $c\n\
The daemon process name : $d\n\
Access client host name(or IP) : $h\n\
Access client host name : $n\n\
The daemon process id : $p\n\
Server information : $s\n\
Access client user name : $u\n\
\n\
--------------------------------------------------------------------\n\
Access client finger information
\n\
--------------------------------------------------------------------\n\
\n\n" | \
/bin/mail -s "<B><U>ÅÚ³ÝÁ¢±Ù</U></B> È£½ºÆ®[$d]" $mailto
fi
=======================================================================
À§¿Í°°ÀÌ ¼³Á¤ÇϽðí /etc/hosts.deny¿¡
in.telnetd:ALL:twist ( /etc/hosts.deny-out Y Y %a %c %d %h %n %p %s %u ) &
|
|
Page Loading [ 0.03 Sec ]
SQL Time [ 0 Sec ]
|
|
|