-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathproject-security.php
executable file
·57 lines (50 loc) · 1.73 KB
/
project-security.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
include "config.php";
include "modules/core.php";
//Checking if the visitor is in the Whitelist
$wtable = $prefix . 'ip-whitelist';
$wquery = $mysqli->query("SELECT ip FROM `$wtable` WHERE ip='$ip' LIMIT 1");
if ($wquery->num_rows <= 0){
//Ban System
include "modules/ban-system.php";
$table = $prefix . 'settings';
$squery = $mysqli->query("SELECT * FROM `$table` LIMIT 1");
$srow = $squery->fetch_assoc();
//Error Reporting
if ($srow['error_reporting'] == 1) {
@error_reporting(0);
}
if ($srow['error_reporting'] == 2) {
@error_reporting(E_ERROR | E_WARNING | E_PARSE);
}
if ($srow['error_reporting'] == 3) {
@error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
}
if ($srow['error_reporting'] == 4) {
@error_reporting(E_ALL & ~E_NOTICE);
}
if ($srow['error_reporting'] == 5) {
@error_reporting(E_ALL);
}
//Displaying Errors
if ($srow['display_errors'] == 1) {
@ini_set('display_errors', '1');
} else {
@ini_set('display_errors', '0');
}
//Checking if Project SECURITY is enabled
if ($srow['realtime_protection'] == 1) {
include "modules/sqli-protection.php";
include "modules/proxy-protection.php";
include "modules/spam-protection.php";
include "modules/massrequests-protection.php";
include "modules/tor-detection.php";
include "modules/badbots-protection.php";
include "modules/fakebots-protection.php";
include "modules/headers-check.php";
include "modules/content-protection.php";
include "modules/adblocker-detector.php";
include "modules/live-traffic.php";
}
}
?>