blob: e6ee848028ffc1cc72fb0a068350cbb0d66f19f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
@(load "txrban")
@(next @(open-tail "/var/log/apache2/www.kylheku.com.log" "r" nil))
@(repeat)
@ (all)
@ip - - [@(n day)/@(m month)/@(n year):@(n hour):@(n min):@(n sec) @nil] "@method @uri @proto/@ver" @err @bytes "@ref" "@agent"
@ (and)
@ (if (search-regex agent #/Googlebot|bingbot|baidu/))
@ (bind points nil)
@ (elif (search-regex agent
#/Ezoom|[Bb][Oo][Tt]|[Ss]pider|[Cc]rawler|[Yy]andex|coccoc/))
@ (bind points 9)
@ (elif (not (memqual err '("200" "206" "301" "302" "304"))))
@ (bind points 1)
@ (else)
@ (bind points 0)
@ (end)
@ (end)
@ (do
(let ((time (make-time year month day hour min sec :auto)))
(if points
(report ip time points)
(do-expiry time))))
@(end)
|