All Projects → Potelo → laravel-block-bots

Potelo / laravel-block-bots

Licence: other
Block crawlers and high traffic users on your site by IP using Redis

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects

Projects that are alternatives of or similar to laravel-block-bots

APSoft-Web-Scanner-v2
Powerful dork searcher and vulnerability scanner for windows platform
Stars: ✭ 96 (+284%)
Mutual labels:  crawlers, scrapper
nextcord
A Python wrapper for the Discord API forked from discord.py
Stars: ✭ 956 (+3724%)
Mutual labels:  bots
zap-db
An easy to use JSON database written with ease of setup and memory management of slack bots in mind.
Stars: ✭ 103 (+312%)
Mutual labels:  bots
Txt2SpeechBot
The only Text to Speech Telegram Inline Bot
Stars: ✭ 26 (+4%)
Mutual labels:  bots
rasa-docker-arm
Rasa Docker image for ARMv7. Runs on a Raspberry Pi.
Stars: ✭ 19 (-24%)
Mutual labels:  bots
slack-sup
Slack bot that generates fresh triads of team members to meet every week in an informal standup, or S'Up.
Stars: ✭ 18 (-28%)
Mutual labels:  bots
bpre
bot protection reverse engineering
Stars: ✭ 181 (+624%)
Mutual labels:  bots
MyBot
🧠 Create chatbots easily with Bot Framework! 🤖
Stars: ✭ 30 (+20%)
Mutual labels:  bots
Ika
Ika+ is a program that can do every hack on any official Ikariam server! Pirate clicker, captcha solver, auto raid and much more!
Stars: ✭ 20 (-20%)
Mutual labels:  bots
msbotbuilder-go
Microsoft Bot Framework SDK for Go
Stars: ✭ 113 (+352%)
Mutual labels:  bots
Spider
💫 Spider is a PHP library with easily module integration for crawling website that allows you to scrape informations.
Stars: ✭ 14 (-44%)
Mutual labels:  scrapper
shopee-inventory-bot
"I Make dropshiper's job easier" ~ Python Shopee Inventory Bot
Stars: ✭ 21 (-16%)
Mutual labels:  scrapper
KannaKamuiBot
A multipurpose bot for fun, emotes, anime, utility, music, nsfw, valorant, moderation, and welcome/leave messages.
Stars: ✭ 64 (+156%)
Mutual labels:  bots
instabot
A Instagram bot for educational purposes
Stars: ✭ 36 (+44%)
Mutual labels:  bots
discord-economy-super
Easy and customizable economy module for your Discord bot.
Stars: ✭ 28 (+12%)
Mutual labels:  bots
info-bot
🤖 A Versatile Telegram Bot
Stars: ✭ 37 (+48%)
Mutual labels:  bots
rivescript-go
A RiveScript interpreter for Go. RiveScript is a scripting language for chatterbots.
Stars: ✭ 56 (+124%)
Mutual labels:  bots
fn-whatsapp-bot
This script is made for public bots, so use a second account to scan the qr and main account to command.
Stars: ✭ 20 (-20%)
Mutual labels:  bots
SimCityBuildItBot
A SimCity BuildIt Bot
Stars: ✭ 52 (+108%)
Mutual labels:  bots
meta-fetcher
Simple metadata scrapper for node.js
Stars: ✭ 137 (+448%)
Mutual labels:  scrapper

Laravel Block Bots

Latest Version on Packagist Software License Total Downloads

Introduction

Laravel Block bots is a pacakge that block bad crawlers, people trying to scrape your website or high-usage users, but lets good and important crawlers such as GoogleBot and Bing pass-thu.

Features

  • ULTRA fast, less than 1ms increase in each request.
  • Verify Crawlers using reverse DNS
  • Highly configurable
  • Redirect users to a page when they got blocked
  • Allow Logged users to always bypass blocks

Install

Via Composer

composer require potelo/laravel-block-bots

Requirement

Before Laravel 5.5

In Laravel 5.4. you'll manually need to register the \Potelo\LaravelBlockBots\BlockBots::class service provider in config/app.php.

Config

To adjust the library, you can publish the config file to your project using:

php artisan vendor:publish --provider="Potelo\LaravelBlockBots\BlockBotsServiceProvider"

Configure variables in your .env file:

BLOCK_BOTS_ENABLED=true // Enables block bots
BLOCK_BOTS_MODE=production // options: `production` (like a charm), `never` (bypass every route), `always` (blocks every routes)
BLOCK_BOTS_USE_DEFAULT_ALLOWED_BOTS=true // if you want to use our preseted whitelist
BLOCK_BOTS_WHITELIST_KEY=block_bot:whitelist // key for whitelist in Redis
BLOCK_BOTS_FAKE_BOTS_KEY=block_bot:fake_bots // key for fake bots in Redis
BLOCK_BOTS_PENDING_BOTS_KEY=block_bot:pending_bots // key for pending bots in Redis
BLOCK_BOTS_LOG_ENABLED=true // Enables log

Usage

It's simple. Go to Kernel.php and add to the $routeMiddleware block as :

protected $routeMiddleware = [
        ...
        'block' => \Potelo\LaravelBlockBots\Middleware\BlockBots::class,
    ];

Than you can put in the desired groups. For exemple, lets set to the Wrb group:


 protected $middlewareGroups = [
        'web' => [
            ...
            \App\Http\Middleware\VerifyCsrfToken::class,
            'block:100,/limit'
        ],

Where:

  • 100: is the number of pages an IP can access every day
  • /limit: Is the route we going to redirect the IP after the limit

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

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].