summaryrefslogtreecommitdiffstats
path: root/apache.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-11-30 00:33:18 -0800
committerKaz Kylheku <kaz@kylheku.com>2013-11-30 00:33:18 -0800
commit6f8fe6efc48a90134d972a0b951f3439b9581160 (patch)
tree7f52ee64897a4c1bf8671ad730b41e89d6ecc62b /apache.txr
parent37599023787d2a6d793c6b73ccaa35c5269e27d2 (diff)
downloadtxrban-6f8fe6efc48a90134d972a0b951f3439b9581160.tar.gz
txrban-6f8fe6efc48a90134d972a0b951f3439b9581160.tar.bz2
txrban-6f8fe6efc48a90134d972a0b951f3439b9581160.zip
Implemented point system for banning with timeout scale based on
severity. Implemented banning based on excessive activity. Utility functions split off into utils.txr.
Diffstat (limited to 'apache.txr')
-rw-r--r--apache.txr6
1 files changed, 4 insertions, 2 deletions
diff --git a/apache.txr b/apache.txr
index 12d6a9f..bb873d4 100644
--- a/apache.txr
+++ b/apache.txr
@@ -11,11 +11,13 @@
@ (fail badguys)
@ (or)
@ (require (search-regex agent #/[Bb][Oo][Tt]|[Ss]pider|[Cc]rawler|[Yy]andex/))
+@ (bind points 9)
+@ (or)
+@ (bind points 0)
@ (end)
@ (end)
@ (do
(let ((time (make-time year (month-num month) day hour min sec :auto)))
- (ban ip time 86400)
- (expire time)))
+ (report ip time points)))
@ (end)
@(end)