use HTTP::Date; use Coro::Event; sub conn::err_block_country { my $self = shift; my $whois = shift; $whois =~ s/&/&/g; $whois =~ s/err(403, "forbidden", { "Content-Type" => "text/html", Connection => "close" }, < This material is licensed in your country!

This material is licensed in your country!

My research has shown that your IP address ($self->{remote_addr}) most probably is located in this country: $self->{country} (ISO-3166-2 code, XX == unknown). The full record is:

$whois

My database says that the material you are trying to access is licensed in your country. If I would distribute these files to your country I would actively hurt the industry behind it, which includes the artists and authors of these videos/mangas. So I hope you understand that I try to avoid this.

Please see the FAQ for a more thorough explanation.

If you really think that this is wrong, i.e. the material you tried to access is not licensed in your country or your ip address was misdetected, you can write to licensed\@plan9.de. Please explain what happened and why you think this is wrong in as much detail as possible.

Thanks a lot for understanding.
EOF } sub conn::err_block_referer { my $self = shift; my $uri = $self->{uri}; $uri =~ s/\/[^\/]+$/\//; $self->slog(6, "REFERER($self->{uri},$self->{h}{referer})"); $whois =~ s/&/&/g; $whois =~ s/err(203, "non-authoritative", { "Content-Type" => "text/html" }, < Unallowed Referral

The site which referred you has done something bad!

It seems that you are coming from this URL:

$self->{h}{referer}

This site has been blocked, either because it required you to pay money, forced you to click on banners, claimed these files were theirs or something very similar. Please note that you can download these files without having to pay, without clicking banners or jump through other hoops.

Sites like the one you came from actively hurt the distribution of these files and the service quality for you since I can't move or correct files and you will likely not be able to see the full archive.

Having that this, you can find the original content (if it is still there) by following this link.

Thanks a lot for understanding.
EOF } sub conn::err_blocked { my $self = shift; my $ip = $self->{remote_addr}; my $ctime = $HTTP_NOW; my $etime = time2str $conn::blocked{$ip} = $::NOW + $::BLOCKTIME; Coro::Event::do_timer(after => 20*rand); $self->err(401, "too many connections", { "Content-Type" => "text/html", "Retry-After" => $::BLOCKTIME, "Warning" => "Please do NOT retry, you have been blocked. Press Cancel instead.", "WWW-Authenticate" => "Basic realm=\"Please do NOT retry, you have been blocked. Press Cancel instead.\"", "Connection" => "close", }, < Too many connections

You have been blocked because you opened too many connections. You may retry at

$etime.

For your reference, the current time is:

$ctime.

Until then, each new access will renew the block. You might want to have a look at the FAQ.

EOF } sub conn::err_segmented_download { my $self = shift; $self->err(400, "segmented downloads are not allowed", { "Content-Type" => "text/html", Connection => "close" }, < Segmented downloads are not allowed

Segmented downloads are not allowed on this server. Please refer to the FAQ.

EOF } 1;