telnet¤Ë¤è¤ë±ó³ÖÁàºî
http://extstrg.asabiya.net/pukiwiki/index.php?telnet%A4%CB%A4%E8%A4%EB%B1%F3%B3%D6%C1%E0%BA%EEtelnet¤ò»ÈÍѤ·¤¿±ó³ÖÁàºî †
telnet¤ò»ÈÍѤ·¤¿±ó³ÖÁàºî¤Î¼«Æ°²½¥¹¥¯¥ê¥×¥È¡£
¥³¡¼¥É †
#!/bin/sh # ------------------------ # telnet script # ------------------------ # Version : 1.0 # update : 2008/10/15 export LANG=C export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin ## Set SERVER="192.168.1.1" USER="username" PASSWD="password" COM="/tmp/telnet.cmd" LOG="/var/log/telnet.log" ## Command cat <<EOF > $COM #!/bin/sh sleep 5; echo $PASSWD sleep 1; echo [command] sleep 1; echo logout EOF ## Exec sh $COM | telnet -a -l $USER $SERVER >> $LOG 2>&1 ## Exit rm $COM exit 0 #EOF
Last-modified: 2008-10-15 (¿å) 15:45:42 (5816d)