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.

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 $id = $self->{remote_id}; my $block = $conn::blocked{$id}; $block->[2]++; if ($block->[0] < $::NOW + $::BLOCKTIME) { $block->[0] = $::NOW + $::BLOCKTIME; } my $status = 403; my $hdr = { "Content-Type" => "text/html", "Retry-After" => $block->[0] - $::NOW, "Connection" => "close", }; my $ctime = $HTTP_NOW; my $etime = time2str $block->[0]; my $limit = $block->[3]; $block->[3] = $::NOW + 10; if ($limit > $::NOW) { Coro::Event::do_timer(after => $limit - $::NOW); if ($block->[2] > 20) { $block->[3] = $::NOW + $::DYNABLOCK + 360; $status = 401; $hdr->{Warning} = "Please do NOT retry, your IP has been blocked due to excessive hammering. Press Cancel instead."; $hdr->{"WWW-Authenticate"} = "Basic realm=\"Please do NOT retry, you IP has been blocked due to excessive hammering. Press Cancel instead.\""; if ($block->[2] > 40) { system "/root/s/dynablock --add $self->{remote_addr} $::DYNABLOCK &"; } } } $self->err($status, $block->[1], $hdr, < $block->[1]

You have been blocked because you didn't behave. The exact reason was:

"$block->[1]"

You may retry not earlier than:

$etime.

Until then, each access will renew the block.

For your reference, the current time and your connection ID is:

$ctime | $id

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.

EOF } 1;