forked from ctrlcctrlv/infinity
-
Notifications
You must be signed in to change notification settings - Fork 3
/
antispam.php
executable file
·36 lines (28 loc) · 881 Bytes
/
antispam.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
include_once 'inc/functions.php';
include_once 'inc/session.php';
if (!isset($_GET['board']) || !openBoard($_GET['board'])) {
http_response_code(404);
error(_('No board.'));
}
$back_link = '/' . $_GET['board'] . '/';
if ($_GET['thread']) {
$back_link .= 'res/' . $_GET['thread'] . '.html';
}
Session::load();
Session::$is_onion = true;
if (chanCaptcha::check()) {
Session::captchaSolved();
}
echo Element("antispam.html", [
'dump'=> json_encode(Session::$data),
'config' => $config,
'board' => $board,
'is_darknet' => Session::$is_onion ||Session::$is_i2p,
'back_link' => $back_link,
'captcha_onstart'=> true,
'captchas_left' => Session::$data['capchas_left'],
'captchas_need' => $config['tor']['need_capchas'],
'verify_progress' => (Session::$data['capchas_left'] * 100) / ($config['tor']['need_capchas']),
'allow_post' => Session::isAllowPost(),
]);