Dynastie

Dynastie Commit Details

Date:2016-05-22 10:28:58 (4 years 2 months ago)
Author:Grégory Soutadé
Branch:master
Commit:3caae2dee2f2e31b73006d6c237af5aecce6d41b
Parents: 8bf132976d49c38fdff02163993f2e3cf9c6ec88
Message:Add fail2ban filter

Changes:
Amisc/apache-dynastie.conf (full)
Mdynastie/views.py (1 diff)

File differences

dynastie/views.py
806806
807807
808808
809
809
810
811
812
810813
811814
812815
# Anti robot !!
if request.POST['email'] != '':
print 'fucking robot'
if 'HTTP_X_REAL_IP' in request.META:
print 'Dynastie : fucking robot %s' % (request.META['HTTP_X_REAL_IP'])
else:
print 'Dynastie : fucking robot %s' % (request.META['REMOTE_ADDR'])
return HttpResponseRedirect(ref)
post = Post.objects.get(pk=post_id)
misc/apache-dynastie.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Fail2Ban apache-dynastie filter
#
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# apache-common.local
before = apache-common.conf
[Definition]
failregex = ^\[[^]]*\] \[wsgi\:error\] \[pid [0-9]+\] Dynastie : fucking robot <HOST>$
ignoreregex =
# http://indefero.soutade.fr/p/dynastie
# [Sun May 22 10:10:33.804242 2016] [wsgi:error] [pid 10514] Dynastie : fucking robot 192.168.1.1
# Author: Grégory Soutadé

Archive Download the corresponding diff file

Branches

Tags