• 13-07-2013, 01:15:25
    #1
    Merhaba arkadaşlar genellikle metin2 sunucular için kullanılan ddos.sh scripti

    #!/bin/sh
    FR_MIN_CONN=120
    IGNORE_IP_LIST="/root/ignore.ip.list"
    TMP_PREFIX='/tmp/frrr'
    TMP_FILE=`mktemp $TMP_PREFIX.XXXXXXXX`
    /usr/bin/netstat -ntu -f inet| awk '{if(NR>2 && NF=6) print $5}' | cut -d. -f1-4 | grep '^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$' | sort | uniq -c | sort -nr > $TMP_FILE
    while read line; do
     CURR_LINE_CONN=$(echo $line | cut -d" " -f1)
     CURR_LINE_IP=$(echo $line | cut -d" " -f2)
     if [ $CURR_LINE_CONN -lt $FR_MIN_CONN ]; then
     break
     fi
     IGNORE_BAN=`grep -c $CURR_LINE_IP $IGNORE_IP_LIST`
     if [ $IGNORE_BAN -ge 1 ]; then
     continue
    fi
    /sbin/route -q add $CURR_LINE_IP 127.0.0.1
    /bin/echo "---------SALDIRAN IP--------" >> /root/banlist.txt
    date -j +"%Y-%m-%d %H:%M:%S" >> /root/banlist.txt
    /bin/echo $CURR_LINE_IP >> /root/banlist.txt
    /bin/echo "----------------------------" >> /root/banlist.txt
    /bin/echo " " >> /root/banlist.txt
    /bin/echo "Subject: $CURR_LINE_IP ipden $CURR_LINE_CONN Connect Refused." | /usr/sbin/sendmail -F ddos@asd.com -t ddos@asd.com
    done < $TMP_FILE
    /bin/rm -f $TMP_PREFIX.*
    7.2 Sürümünde sıkıntısız çalışırken 9.1 de çalışmıyor hata ekranı şudur :



    Bu konuda bilgili arkadaşlar yardımcı olurlarsa sevinirim.
  • 13-07-2013, 10:59:56
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    FreeBSD de netstattan -t opsiyonu kalkalı yaklaşık 3.5 yıl oluyor. Netstat komutunda -t opsiyonunu kullanamazsınız.
  • 03-07-2014, 21:18:18
    #3
    bu scripti nasıl çalıştırabiliriz 9.1 de
  • 06-07-2014, 01:07:52
    #4
    yardımcı olacak yok mu?