All pastes #75516 Raw Edit

Untitled

public text v1 · immutable
#75516 ·published 2006-06-30 08:04 UTC
rendered paste body
#!/bin/sh

log="/ftp-data/logs/glftpd.log"

cmd=`echo $1 | awk '{print $2}'`
num=`echo $1 | awk '{print $3}'`
blah=0;

siteop=`echo $FLAGS | grep -c '1' | sed -e 's/ //g'`
if [ "$siteop" = "1" ]; then
        exit 0
fi

if [ `echo $cmd | grep -icE '(WKUP|GPWK)' | sed -e 's/ //g'` = "1" ]; then
        if [ "$num" -gt "21" ]; then
                echo -e "200Please use a number less than 21 :)"
                exit -1
        fi
        exit 0
fi
if [ "$1" = "VERS" ]; then
        echo -e "200logged"
fi

#if [ "$1" = "ALUP" ]; then
#
#       echo -e "200 bad\n"
#fi
echo -e "200You do not have access to this command."
echo `/bin/date '+%a %b %d %X %Y'` LOGGER: \"$1\" \"$USER\" \"$GROUP\" >> "$log"
exit -1