ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/err.pl
(Generate patch)

Comparing Coro/myhttpd/err.pl (file contents):
Revision 1.7 by root, Sun May 19 21:00:47 2002 UTC vs.
Revision 1.8 by root, Thu Oct 11 12:48:27 2007 UTC

106 $block->[3] = $::NOW + 10; 106 $block->[3] = $::NOW + 10;
107 107
108 if ($limit > $::NOW) { 108 if ($limit > $::NOW) {
109 Coro::Event::do_timer(after => $limit - $::NOW); 109 Coro::Event::do_timer(after => $limit - $::NOW);
110 110
111 if ($block->[2] > 30) { 111 if ($block->[2] > 20) {
112 $block->[3] = $::NOW + 180; 112 $block->[3] = $::NOW + $::DYNABLOCK + 360;
113 $status = 401; 113 $status = 401;
114 $hdr->{Warning} = "Please do NOT retry, you have been blocked. Press Cancel instead."; 114 $hdr->{Warning} = "Please do NOT retry, your IP has been blocked due to excessive hammering. Press Cancel instead.";
115 $hdr->{"WWW-Authenticate"} = "Basic realm=\"Please do NOT retry, you have been blocked. Press Cancel instead.\""; 115 $hdr->{"WWW-Authenticate"} = "Basic realm=\"Please do NOT retry, you IP has been blocked due to excessive hammering. Press Cancel instead.\"";
116
117 if ($block->[2] > 40) {
118 system "/root/s/dynablock --add $self->{remote_ip} $::DYNABLOCK &";
119 }
116 } 120 }
117 } 121 }
118 122
119 $self->err($status, $block->[1], $hdr, 123 $self->err($status, $block->[1], $hdr,
120 <<EOF); 124 <<EOF);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines