• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

[Share] một cách chống Ddos hiệu quả

Admin

Well-Known Member
Staff member
Administrator
Đầu tiên tạo file \" chongddos.php \"


Code:
<?php $cookie = $_COOKIE[\'yourcookie\']; $othercookie = $_COOKIE[\'yourothercookie\']; $othercookie = $_COOKIE[\'1211598493\']; $othercookie = $_COOKIE[\'2c07863737b385b4c3567f0ecfa6d480\']; $othercookie = $_COOKIE[\'3bc52aba5f6ed8a19cfafdc777ad1b1f\']; if($cookie && $othercookie > 0) $iptime = 20; //so giay toi thieu giua cac lan truy cap. else $iptime = 10; // so giay toi thieu cho moi lan truy cap cho tat ca moi nguoi  $ippenalty = 60; // So giay truoc khi nguoi truy cap dc phep truy cap lai  if($cookie && $othercookie > 0)$ipmaxvisit = 30; //toi da truy cap tho $iptime else $ipmaxvisit = 20; // toi da cho moi lan truy cap $iptime  $iplogdir = \"./iplog/\"; $iplogfile = \"iplog.dat\"; $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(\"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. Warning by KentMaster</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\'];  if($_SESSION[\'reportedflood\'] < 1 && ($newtime < $time + $iptime + $iptime*$ipmaxvisit)) @mail(\'ngothaiduong.info@gmail.com\', \'Website is being flooded-DDOS from address \'.$cookie.\' \' .$_SERVER[\'REMOTE_ADDR\'],\'\'.$yourdomain.\' are attacked refuse services from IP addresses \'.$_SERVER[\'REMOTE_ADDR\'].\' attack to \'.$yourdomain.$_SERVER[\'REQUEST_URI\'].\' Attaker is \'.$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.$newtim e); touch($iplogdir.$ipfile, $newtime); ?>


Trong đó , đổi địa chỉ email thành Email của admin hoặc ai quản lý host và domain cho forum .


- Upload file chongddos.php lên ngang hàng với index.php
- Mở các file cần bảo vệ : \" index.php , showtheard.php , seach.php .... các file mà bọn nó qua đó có thể ddos mình đó . Chèn đoạn mã này sau thẻ < ?php


Code:
include \'chongddos.php\';


- Sau đó tạo 1 thư mục có tên là /iplog/ và CHMOD là 777, bạn tạo tiếp 1 files
iplogfile.dat trong thư mục iplog và CHMOD là 666


Thế là xong .... Thử xem thế nào !


Dùng cái này có những lợi ích gì ?


- Cản ddos đc chút ít ( chả có cái gì chống được ddos cả )
- Gởi mail về thông báo khi bị ddos , IP thủ phạm ddos để có biện pháp xử lý .


Các bạn tham khảo thêm trong mã file chongddos.php

nguồn: hocit.us
 
Cứ thế mà paste, zip gì nữa em
 
Cài Lai firewall...để auto lock ip
 
Là khoá ip tấn công đó em
 
- Upload file chongddos.php lên ngang hàng với index.php
- Mở các file cần bảo vệ :
\" index.php ,
showtheard.php ,
seach.php
Em có làm như thế này không
 
Host em not support (ASCII=92)
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
N Hướng dẫn Cần người share một con CC để reg domain thank các bác Hacking 3
Admin Share một số code zip html xtgem chuẩn Wap builder, wapego, xtgem, wen.ru, wapka, wap4 3
Admin Share một host us tốc độ cao cho ai nhanh Hosting & Domain Share 32
Admin Share một domain đẹp full cp 1 năm duy nhất cho 1 member có 100 top/ngày Hosting & Domain Share 25
Admin [SHARE] Một Số Skin Cho Anh Em Coder Mã nguồn web 0
Admin [Share] một số code html đẹp làm wmp, xtgem Wap builder, wapego, xtgem, wen.ru, wapka, wap4 12
J Share Share mã giảm giá TinoHost 30% Chia sẻ mã giảm giá 0
cuongpro9x TRANG ZIPPY SHARE THÔNG BÁO SẼ NGỪNG HOẠT ĐỘNG VÀO CUỐI THÁNG 03/2023. Tin tức CNTT 2
Admin Share vector backdrop chúc mừng năm mới, tất niên 2023 đẹp - Vector backdrop new year, year end party 2023 Thiết kế đồ họa 0
K Share FREE Hosting server VN unlimited bandwidth Hosting & Domain Free 12
V Share Facebook không hiện ảnh thumbnail Xenforo 5
Admin Web Share API - Native Share button on Android and iOS Add-ons 0
Admin Share theme GeoBin | Digital Marketing Agency, SEO WordPress Theme Wordpress 0
Admin Share tool get dữ liệu tài khoản Google - Tìm kênh Youtube từ tài khoản Google Tut, tool, mmo 9
Admin Share 15GB source code Android bao gồm Unity Android, iOS 5
Admin Share vài trăm Nord VPN Premium - Share account VPN Premium free Hacking 1
Admin Share code Nukeviet 4.4.02 mới nhất - Code tin tức tốt nhất Việt Nam Mã nguồn web 3
Admin Share file corel biển quảng cáo nước giải khát, hàng tạp hóa đẹp mắt Thiết kế đồ họa 0
W Share Share Template TranThanh.Name.Vn đang dùng Blogger 0
Admin Share nhạc chuông của Thuận Hương trong phim Gái Ngàn Đô Trò chuyện linh tinh 1
Admin Share plugin WPBakery Page Builder for wordpress Wordpress 0
cuongpro9x Share Plugin Yoast SEO Premium - liên tục cập nhật Wordpress 4
cuongpro9x Share Free trọn bộ theme + plugin bản quyền của theme-junkie.com Wordpress 1
cuongpro9x Share SHARE THEME TRUYỆN WORDPRESS 2019 Wordpress 62
Admin Share tài khoản nhaccuatui.com mới nhất cho anh em Âm nhạc 23
Admin Share tut bắn reach ads Facebook mới nhất dùng thẻ cứng Tut, tool, mmo 2
Admin Share code và data game bài Gowin 2019 mới nhất Mã nguồn web 9
Admin Share tài khoản Fim+ (Galaxy Play) mới nhất 2024 cho anh em Phim 1935
Admin Share theme wordpress Newspaper mới nhất Wordpress 3
dammechiase share sock 5 free chia sẻ sock 5 miễn phí vip sock 5 miễn phí VPS & Dedicated Server 0
dammechiase share sock 5 miễn phí 2019 Trò chơi 0
Npnken Share Share code shop nick tự động - shopbumma.com PHP 3
dammechiase share sock 5 free miễn phí 03-12-2018 Tut, tool, mmo 0
dammechiase Share key Office 2016 Professional Plus mới nhất Phần mềm 0
dammechiase share key win 7,win 10 bản quyền mới nhất Phần mềm 0
khanhsak3r [Share 18+] Acc PlayboyPlus Trò chuyện linh tinh 0
SuperTroll Share code chat cho wap4.co Wap builder, wapego, xtgem, wen.ru, wapka, wap4 0
SuperTroll Share Code đua Pet cho MXH Team Johncms 0
SuperTroll Share Host Free để anh em test mã nguồn Hosting & Domain Free 11
SuperTroll Share Code JohnCMS Mefun.VN Johncms 0
L Share Full Code Gocvn.Org Johncms 1
cuongpro9x Share Share Code Chia Sẻ Video Cực Đẹp Nhiều Chức Năng All Shared Scripts 1
Die_Live share link nguyen khanh linh full Tin sock, độc, lạ 2
MrTrieu Share Share code blog JohnCMS làm wap game, truyện, blog thủ thuật đẹp Johncms 2
cuongpro9x Share Share Code Get Link Max BW onbox All Shared Scripts 1
H Share Share shop avatar cho JOHNCMS Johncms 0
H Share Share Full code VBB openitvn.net Vbulletin 1
MrTrieu Share Tổng hợp Theme Wordpress được share tại KenhYenBai.Com Wordpress 0
H Share Share Theme web QuyetDaiK by Giacmovn.com 2012 Johncms 2
H Share Share code game oẳn tù tì lột đồ girl cho JohnCMS by Nguyên Ary Johncms 1

Similar threads

New posts New threads New resources

Back
Top