Total Users Online: 1 üye, 50 guest | Tarih/Saat: 2012-05-23 01:49
 
PHP anti DDos BOT
2010-07-14 12:23 GMT  Çoklu Alıntı
rootinq

User is: Online status   Gender_M
Posts: 61
Ülke: --- - 00
Meslek: İktisat
Age: 25

Acaba bu scripti Seditio Monte etme şansımız varmı acaba. yada bildiğiniz ddos pluginini varmı.

Kod:
<?php

/*
CHMOD /iplog/ to 777
Create and CHMOD /iplog/iplogfile.dat to 666
add the following line in any important .php file in the same directory as your anti_dos.php file so it can check IPs when that file is loaded, best example is index.php if you have it.
include("anti_dos.php"); //anti-DoS, prevents rapid accessing

if you have a known cookie on your site,
you can use this, otherwise just ignore this, it will set a different limit
for people with this cookie

I use yourothercookie as the cookie ID for the forum, my forum uses ID
greater than 0 for all members and -1 for guests and members who have logged out,
so making it match greater than zero means members will get better access and
guests with or without cookies won't

Also I use these cookies in the "flood alert" emails to make sure an important user didn't get banned. Someone could fake a cookie, so always be suspicious. Tez
*/
$cookie = $_COOKIE['yourcookie'];
$othercookie = $_COOKIE['yourothercookie'];


if($cookie && $othercookie > 0) $iptime = 20;  // Minimum number of seconds between visits for users with certain cookie
else $iptime = 10; // Minimum number of seconds between visits for everyone else


$ippenalty = 60; // Seconds before visitor is allowed back


if($cookie && $othercookie > 0)$ipmaxvisit = 30; // Maximum visits, per $iptime segment
else $ipmaxvisit = 20; // Maximum visits per $iptime segment


$iplogdir = "./iplog/";
$iplogfile = "iplog.dat";

$ipfile = substr(md5($_SERVER["REMOTE_ADDR"]), -2);
$oldtime = 0;
if (file_exists($iplogdir.$ipfile)) $oldtime = filemtime($iplogdir.$ipfile);

$time = time();
if ($oldtime < $time) $oldtime = $time;
$newtime = $oldtime + $iptime;

if ($newtime >= $time + $iptime*$ipmaxvisit)
{
touch($iplogdir.$ipfile, $time + $iptime*($ipmaxvisit-1) + $ippenalty);
$oldref = $_SERVER['HTTP_REFERER'];
header("HTTP/1.0 503 Service Temporarily Unavailable");
header("Connection: close");
header("Content-Type: text/html");
echo "<html><body bgcolor=#999999 text=#ffffff link=#ffff00>
<font face='Verdana, Arial'><p><b>
<h1>Temporary Access Denial</h1>Too many quick page views by your IP address (more than ".$ipmaxvisit." visits within ".$iptime." seconds).</b>
";
echo "<br />Please wait ".$ippenalty." seconds and reload.</p></font></body></html>";
touch($iplogdir.$iplogfile); //create if not existing
$fp = fopen($iplogdir.$iplogfile, "a");
$yourdomain = $_SERVER['HTTP_HOST'];
    if ($fp)
    {
    $useragent = "<unknown user agent>";
    if (isset($_SERVER["HTTP_USER_AGENT"])) $useragent = $_SERVER["HTTP_USER_AGENT"];
    fputs($fp, $_SERVER["REMOTE_ADDR"]." ".date("d/m/Y H:i:s")." ".$useragent."\n");
    fclose($fp);
    $yourdomain = $_SERVER['HTTP_HOST'];
   
    //the @ symbol before @mail means 'supress errors' so you wont see errors on the page if email fails.
if($_SESSION['reportedflood'] < 1 && ($newtime < $time + $iptime + $iptime*$ipmaxvisit))
    @mail('flood_alert@'.$yourdomain, 'site flooded by '.$cookie.' '
    .$_SERVER['REMOTE_ADDR'],'http://'.$yourdomain.' rapid website access flood occured and ban for IP '.$_SERVER['REMOTE_ADDR'].' at http://'.$yourdomain.$_SERVER['REQUEST_URI'].' from '.$oldref.' agent '.$_SERVER['HTTP_USER_AGENT'].' '
    .$cookie.' '.$othercookie, "From: ".$yourdomain."\n");
    $_SESSION['reportedflood'] = 1;
    }
    exit();
}
else $_SESSION['reportedflood'] = 0;

//echo("loaded ".$cookie.$iplogdir.$iplogfile.$ipfile.$newtime);
touch($iplogdir.$ipfile, $newtime); //this just updates the IP file access date or creates a new file if it doesn't exist in /iplog
?>
Konuyla İlgili Diğer Başlıklar
Yardım Ddos Çekiyorlar Siteye
Common.php Fix Anti-spam ve anti-hammer

 

PHP anti DDos BOT
2010-07-14 22:13 GMT  Çoklu Alıntı
Kaan

User is: Online status   Gender_M
Posts: 2471
Ülke: İstanbul - 34
Meslek: Serbest
Age: 29

Sitede Araştır daha önce verilmişti böyle birşey..

Bunuda uygulayabilirsinde biraz ayar cekmek gerekiyor.
Seditio Emlak Scripti Demo: http://fordcikmacisi.net/emlak/
Seditio Oto Galeri Scripti Demo: http://fordcikmacisi.net/otogaleri/
Siparişleriniz için PM veya kaan@ntka.org Mail Gönderin.
Bi Dünya Müzik: http://bdmfan.com
Seditio Şimdi Daha Güvenli ve Daha Hızlı Gücünü Hissedin.
Takdir ediliyorsan değil, Taklit ediliyorsan başarmışsın demektir.
-Albert Einstein

 

PHP anti DDos BOT
2010-07-15 01:39 GMT  Çoklu Alıntı
TR-Akdam

User is: Online status   Gender_M
Posts: 143
Ülke: İstanbul - 34
Meslek: Öğrenci
Age: 19

ben Güvenlik sistemi yapmıştım %60 kadarı bitti... Benimki admin panelinden yönetiliyor.. birkaç ufak hataları var...


 

PHP anti DDos BOT
2010-07-15 09:21 GMT  Çoklu Alıntı
rootinq

User is: Online status   Gender_M
Posts: 61
Ülke: --- - 00
Meslek: İktisat
Age: 25

akdam ücretli olarak mı satıcaksin o eklentiyi özelliklerine baktim güzel birşeye benziyor. hayırlısı olsun.

 

PHP anti DDos BOT
2010-07-15 10:16 GMT  Çoklu Alıntı
TR-Akdam

User is: Online status   Gender_M
Posts: 143
Ülke: İstanbul - 34
Meslek: Öğrenci
Age: 19

Daha karar vermedim eklenti şuan çalışıyor ancak gzip sıkıştırmayı devre dışı bırakmak zorunda kalıyorum... bu hatayı giderip daha fonksiyonlu hale getircem ondan sonra karar veririz

 

PHP anti DDos BOT
2010-11-06 10:36 GMT  Çoklu Alıntı
Aragorn-pc

User is: Online status   Gender_M
Posts: 136
Ülke: Kayseri - 38
Meslek: Web Tasarım & Hosting Hizmetleri
Age: 26

O Php Betiğini Guvenlik.php(örnek) Kayit et, Sonra Header.php 'yi aç ilk satırına Ekle;

Kod:
<?include "guvenlik.php";?>


Sonra Kapat, Çalişir Kendi Kendine.. )
Reklama Gerek Yok

Eskiler Tanır, Yeniler Örnek ALır !


Alayına İSYAN !


 

Powered by Seditio © 2009-2012 All Rights Reserved