• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Anti-DDoS-Lite (Anti-Crawler app) is a small PHP app to protect your site against DDoS attack.

DDoS-Protection-Lite

Build Status

Anti-DDoS-Lite (Anti-Crawler app) is a PHP app to protect your site against DDoS attack or crawling web site by bots.

Description

Anti-DDoS-Lite helps block bots and reduce server load and stops bad bots before they can reach your original web page. During the opening of the site page, the application performs a JS check and if the check fails, then a blocking page will be displayed.

Most of bots can't execute JavaScript code or can execute code partially. This app filters traffic from bots by using simple JavaScript code. Bots are denied to read original pages, they get only a single stop-page. As a result DDoS attack is reduced by elimination of bots traffic that participating in the DDoS attack.

In the same time, legitimate/real visitors get the original page after a short delay because the browser of legitimate/real visitors executes JavaScript code. The legitimate/real visitors see the stop-page only once, during first visit to the site.

How to use

  1. Include the app as first line in index.php by various way:

A Download, unzip and include the app:

<?php
// This file have to be very first included
require "anti-ddos-lite/anti-ddos-lite.php";

//
// index.php code bellow
// ...
//

?>

B Or install the app by composer package:

composer require cleantalk/anti-ddos-lite
<?php
// Init the app before your web app's main logic
\Cleantalk\CleantalkAntiDdosLite\CleantalkAntiDdosLite::init();
  1. Generate new value for anti_ddos_salt.

Skip protection for visitors from trusted networks, Autonomous systesm (AS)

Setup GeoIP and list excluded Autonomous systems in the $not_rated_as.

  $not_rated_as = '';

Skip trusted User-Agents

Skip trusted User-Agents. Regular expressions are allowed, example is bellow.

  $not_rated_ua = array(
        'CleanTalk Uptime bot.+',
        'Googlebot', 
        'Bingbot',
        'Baiduspider',
        'YandexBot',
        'facebot',
        'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)',
        'ia_archiver'
);

Changelog

Version 2.0.2

  • Fix. A document.write vulnerability fixed.
  • Fix. UA list converted to regular expressions.
  • Fix. UptimeRobot UA.
  • Fix. Trusted UA is skipped correctly.

Version 2.0.1

  • New. Headless mode detection.
  • Fix. Now visitors without JS will be blocked correctly.
  • Refactoring and minor fixes.

Contacts

Email: [email protected]

More Repositories

1

php-antispam

A PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.
PHP
57
star
2

python-antispam

Antispam API for Python applications
Python
24
star
3

ruby-antispam

API to have CleanTalk anti-spam on Ruby
Ruby
19
star
4

csharp-antispam

CleanTalk service API for C#
C#
16
star
5

yii-antispam

Anit-spam extension for Yii framework.
PHP
15
star
6

wordpress-antispam

WP Anti-Spam
PHP
15
star
7

php-usp

UniForce - Universal Security plugin and Firewall for websites
PHP
15
star
8

security-malware-firewall

Security & Malware scan by CleanTalk
PHP
14
star
9

mediawiki-antispam

Antispam extension for MediaWiki.
PHP
14
star
10

joomla3.x-4.x-antispam

Joomla 3+ Anti-Spam by CleanTalk
PHP
12
star
11

phpbb3.1-3.2-antispam

PHP
12
star
12

nginx-cleantalk-service

LUA configuration to filter any POST requests.
Lua
12
star
13

smf-antispam

Anti-spam MOD for Simple Machine Forum
PHP
11
star
14

ips4-antispam

IPS Community Suite 4.0 (IP.Board) anti-spam extension.
PHP
11
star
15

php-uni

Module for any CMS
PHP
10
star
16

yii2-antispam

Anit-spam extension for Yii2 framework.
PHP
10
star
17

bitrix-antispam

1C Bitrix anti-spam mod.
PHP
10
star
18

xenforo2-antispam

Xenforo2 Anti-Spam
PHP
10
star
19

xenforo-antispam

XenForo anti-spam addon.
PHP
10
star
20

mybb-antispam

MyBB Anti-Spam plugin
PHP
10
star
21

magento-antispam

Anti-Spam extension to protect Magento against spam bots.
PHP
9
star
22

modx-antispam

PHP
9
star
23

joomla2.x-antispam

Anti-spam plugin for Joomla 2.x
PHP
9
star
24

whmcs-addon

Addon to sale CleanTalk service for hosting customers.
PHP
9
star
25

dle-antispam

Anti-spam mod for DataLife Engine (DLE)
PHP
9
star
26

opencart-antispam

PHP
9
star
27

vbulletin-antispam

Anti-spam hook for vBulletin 3.X.
PHP
9
star
28

android-app

Android app to control comments/signups/contacts/orders on a web-site via CleanTalk anti-spam app.
Java
9
star
29

ipb-antispam

PHP
8
star
30

typo3_antispam

Typo3 anti-spam extension.
PHP
8
star
31

vbulletin5-antispam

Anti-spam hook for vBulletin 5.X.
PHP
8
star
32

phpbb-antispam

Antispam MOD for phpBB3.
PHP
8
star
33

ios-app

iOS app to control comments/signups/contacts/orders on a web-site via CleanTalk anti-spam app.
Swift
8
star
34

magento2-antispam

PHP
8
star
35

joomla15-antispam

Anti-spam plugin for Joomla 1.5.
PHP
7
star
36

perl-antispam

Perl API for web-sites protection.
Makefile
6
star
37

perl-tools

Various perl tools.
Perl
6
star
38

cleantalk-api-docs-check-bot-example

PHP
3
star
39

cleantalk-php-lib

CleanTalk Team php lib
PHP
2
star
40

laravel-antispam

PHP
2
star
41

_spbct-heuristic-analyser

PHP
2
star
42

ipset-blocklist

A shell application to implement CleanTalk blacklists with iptables on a Linux server.
Shell
2
star
43

craft-antispam

CraftCMS plugin `Anti-Spam protection by CleanTalk`
PHP
1
star
44

_btree-database

CleanTalk binary tree database package
PHP
1
star
45

prestashop-antispam

PHP
1
star
46

csharp-antispam.NetCore

CleanTalk service API for C# .Net Core
C#
1
star