All Projects → nabble → semalt-blocker

nabble / semalt-blocker

Licence: MIT License
⛔ Self-updating PHP library which blocks referral spam from ruining your website statistics

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to semalt-blocker

Stop.Google.Analytics.Ghost.Spam.HOWTO
How to stop Google Analytics "Ghost" Spam using a well curated list of spam referrer domains and web sites. Simple and easy to use with instructions for creating Segments in Google Analytics using our google-exclude files.
Stars: ✭ 21 (-68.66%)
Mutual labels:  spam, referrer-spam
Nginx Ultimate Bad Bot Blocker
Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders
Stars: ✭ 2,351 (+3408.96%)
Mutual labels:  referrer-spam, referer-blocker
mailmask
Mailmask - easy stop unwanted email. Unlimited, free temporary email addresses, all forwarding to your real email address. Beat spam, protect your privacy.
Stars: ✭ 31 (-53.73%)
Mutual labels:  spam
silverbox
Guide describing how to setup compact, silent and energy-efficient GNU/Linux home server
Stars: ✭ 42 (-37.31%)
Mutual labels:  apache
LiteOTP
Multi OTP Spam Amp/Paralell threads
Stars: ✭ 50 (-25.37%)
Mutual labels:  spam
jota-cert-checker
Check SSL certificate expiration date of a list of sites.
Stars: ✭ 45 (-32.84%)
Mutual labels:  apache
qpid-proton-j
Mirror of Apache Qpid Proton-J
Stars: ✭ 28 (-58.21%)
Mutual labels:  apache
baikal-docker
Provides a ready-to-go Baikal server, incl. docker-compose.yml & Systemd service file
Stars: ✭ 85 (+26.87%)
Mutual labels:  apache
ap-airflow
Astronomer Core Docker Images
Stars: ✭ 87 (+29.85%)
Mutual labels:  apache
vhost-gen
Configurable vHost generator for Apache 2.2, Apache 2.4 and Nginx
Stars: ✭ 111 (+65.67%)
Mutual labels:  apache
hadoop-data-ingestion-tool
OLAP and ETL of Big Data
Stars: ✭ 17 (-74.63%)
Mutual labels:  apache
modules
Mesos modules examples and open source modules outside of the Apache Mesos source tree.
Stars: ✭ 26 (-61.19%)
Mutual labels:  apache
reverse-proxy-php
在GAE php空间或者在国外apache php空间搭建反向代理
Stars: ✭ 51 (-23.88%)
Mutual labels:  apache
qpid-dispatch
Mirror of Apache Qpid Dispatch
Stars: ✭ 62 (-7.46%)
Mutual labels:  apache
qpid-jms
Mirror of Apache Qpid JMS
Stars: ✭ 60 (-10.45%)
Mutual labels:  apache
openwhisk-runtime-dotnet
Apache OpenWhisk Runtime .Net supports Apache OpenWhisk functions written in .Net languages
Stars: ✭ 23 (-65.67%)
Mutual labels:  apache
mcMMOAction
Prints some mcMMO message into the action bar
Stars: ✭ 17 (-74.63%)
Mutual labels:  spam
Apache-Directory-Listing
A directory listing theme for Apache
Stars: ✭ 138 (+105.97%)
Mutual labels:  apache
Apache
Docker container running Apache running on Ubuntu, Composer, Lavavel, TDD via Shippable & CircleCI
Stars: ✭ 15 (-77.61%)
Mutual labels:  apache
zeppelin
Apache Zeppelin with support for SQL Server
Stars: ✭ 17 (-74.63%)
Mutual labels:  apache

Don't use this project

The list of spammy domains is stale and without any update since 2016

Read original blogpost which inspired this project: Semalt infecting computers to spam the web.


Latest Stable Version Build Status Coverage Status Scrutinizer Code Quality StyleCI Status Dependency Status Packagist Downloads License

semalt-blocker

Self-updating PHP library which blocks hundreds of spammy domains from ruining your website statistics

Bad domains Last updated
2433 December 1st, 2016

Block referral spam with a single line of code. Originally started to stop the nasty Semalt botnet from visiting your site and ruining your stats (of course their domains are still included), the blocklist now contains hundreds of spammy domains. The library will try to self-update every week, so you don't have to worry about composer update's.

blocklist

Looking for the blocklist only? No problem:

sources

The blocklist is compiled from several sources. Currently:

Source Raw source file Number of domains
sahava https://raw.githubusercontent.com/sahava/spam-filter-tool/master/js/spamfilter.js 417
piwik https://raw.githubusercontent.com/piwik/referrer-spam-blacklist/master/spammers.txt 483
stevie-ray https://raw.githubusercontent.com/Stevie-Ray/apache-nginx-referral-spam-blacklist/master/generator/domains.txt 1071
ar-communications https://raw.githubusercontent.com/ARCommunications/Block-Referral-Spam/master/blocker.php 376
flameeyes https://raw.githubusercontent.com/Flameeyes/modsec-flameeyes/master/rules/flameeyes_bad_referrers.data 936
semalt-blocker ../domains/additional 1
desbma https://raw.githubusercontent.com/desbma/referer-spam-domains-blacklist/master/spammers.txt 1700

debug console

We've added a tool to check whether your site blocks spammy bots. You can find it in the repository and online at: nabble.nl/semalt

composer setup

This is the easiest method, but requires the use of Composer. Add semalt-blocker to your project by running the following in your terminal:

composer require nabble/semalt-blocker:~1

Then in your project add (but you probably already have this):

require "vendor/autoload.php";

legacy setup

Not using composer? No problem, copy the files domains/blocked and compact/semaltblocker.php to the same directory in your project and add this line:

require "/path/to/semaltblocker.php";

basic usage

It's as easy as:

use Nabble\SemaltBlocker\Blocker;

Blocker::protect();

// ... your app

Make sure you add it somewhere at the beginning of your code, it will save you!

self-update

In order for the self-update mechanism to work, make sure the domains/blocked file is writable by the webserver:

$ chmod a+w vendor/nabble/semalt-blocker/domains/blocked

options

Blocker::protect(); // default, serve a 403 Forbidden response
Blocker::protect('http://semalt.com'); // return them their own botnet traffic
Blocker::protect('Hi, bot'); // displays a nice message when blocked

All calls to the protect function will trigger the auto-updater at a regular interval.

If you want to stay in control even more, use this:

$blocked = Blocker::blocked(); // returns true when a blocked referrer is detected

If you want an explanation for why a referer is blocked, use:

echo Blocker::explain();

The self-updater runs every 7 days by default. To force updating the domain list, use this:

use Nabble\SemaltBlocker\Updater;

Updater::update(true);

contribute

Yes, please! Feel free to open issues or pull-requests.

licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].