Project

rack-smack

0.0
No release in over 3 years
Low commit activity in last 3 years
A no-nonsense force of good in a world of bad. Will prevent malicious bots/users from accessing your content once they are caught red-handed.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 12.3.3
~> 3.2
>= 2.1.0
 Project Readme

Rack::Smack

A no-nonsense force of good in a world of bad. Will prevent malicious bots/users from accessing your content once they are caught red-handed.

Install

$ gem install rack-smack

Usage

require 'rack/smack'

use Rack::Smack
run YourApp

Options

file for filename storing the bad guys
list for the list of keywords you want to ban on
asset for the list of keywords where you want to skip checking
anon do not log any client ips

Example with options

use Rack::Smack file: 'bad_guys.txt', list: ['wp', 'wordpress', php', 'admin'], anon: true

Defaults

Option Value
file './ban_list.txt'
list ['wp', 'wordpress', 'xmlrpc', 'sfn']
asset ['css', 'gif', 'jpg', 'jpeg', 'js', 'png', 'ico', 'txt']
anon false

Want to understand?

Code overview