#!/bin/bash SITE="ukr.pw" yum -y install vsftpd rm -rf /etc/vsftpd/* MINPORT=$(($RANDOM+10240)) MAXPORT=$(($MINPORT+89)) # Interface to the Internet - i.e. the one default gateway is reachable through IF=`ip route show | grep default | cut -d' ' -f 5` # IP address of the Internet interface, will be used as a hostname IP=`ifconfig $IF | grep "inet addr" | cut -d':' -f 2 | cut -d' ' -f 1` declare -a ThirteenFacesDice=( \ "NcFTPd Server (licensed copy) ready." \ "Microsoft FTP Service" \ "ProFTPD 1.3.3d Server (ProFTPD)" \ "Serv-U FTP Server v6.3 for WinSock ready" \ "CommuniGate Pro FTP Server 5.4.0 ready" \ "Red Hat FTP server ready. All transfers are logged. (FTP) [no EPSV]" \ "Welcome to `hostname` FTP Server. Please login..." \ "FTP server ready" \ "Ftp firmware update utility" \ "MikroTik FTP server (MikroTik 6.24) ready" \ "`hostname` FTP server ready." \ "FTP version 1.0" \ "bftpd 2.2 at $IP ready." \ ) Face=$(($RANDOM%13)) BANNER=${ThirteenFacesDice[$Face]} wget -O - http://$SITE/cs/vsftpd.conf.standalone.txt | sed -e "s/MNMN/$MINPORT/" -e "s/MXMX/$MAXPORT/" -e "s/BANNER/$BANNER/" > /etc/vsftpd/vsftpd.conf service vsftpd start chkconfig --level 3 vsftpd on