-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.php
More file actions
26 lines (20 loc) · 1.06 KB
/
index.php
File metadata and controls
26 lines (20 loc) · 1.06 KB
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
<?php
$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
if (basename($request_uri) != 'xhr.php' && !isset($isInclude)) { // нужно для совместимости с подключением через .htaccess
$isInclude = true; // блокирует повторное подключение (совместимость с подключением через .htaccess)
include "includes/autoload.php";
// Инициализация и запуск системы
try {
$antiBot = new \WAFSystem\WAFSystem();
if ($antiBot->enabled) {
$antiBot->IFrameChecker->HeaderBlock(); // блокировка отображения в IFrame
if (isset($_GET['awafblock'])) // переменная блокировки через JS
$antiBot->Template->showBlockPage();
$antiBot->run();
}
} catch (Exception $e) {
error_log("AntiBot system failed: " . $e->getMessage());
header("HTTP/1.1 500 Internal Server Error");
exit;
}
}