-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
61 lines (60 loc) · 2.31 KB
/
index.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
58
59
60
61
<?php
error_reporting(0);
require_once "config.php";
require_once "lib/function/main.php";
$B4code = new B4code($Apikey);
$B4code->GetIP();
switch(true){
case (preg_match("/^index$/", $_GET["q"])):
$B4code->redirect(200);
break;
case (preg_match("/^rsc\/rjs\.json$/", $_GET['q'])):
$B4code->PostResponseJS();
break;
case (isset($_GET["q"]) && preg_match("/^[a-z0-9A-Z]*$/", $_GET["q"])):
$RedirectTo = json_decode($B4code->RedirectTo($_GET["q"]), true);
switch(true){
case isset($RedirectTo["redirectTo"]):
switch($RedirectTo["redirectTo"]){
case "STOPBOTNET 403":
$B4code->redirect('STOPBOTNET 403');
break;
case "STOPBOTNET 404":
$B4code->redirect('STOPBOTNET 404');
break;
case "SERVER NOT RESPOND":
ob_start();
sleep(3600);
ob_end_clean();
break;
default:
switch($RedirectTo["IPStatus"]["BlockAccess"]){
case 1:
$B4code->redirect($RedirectTo["redirectTo"]);
break;
default:
switch(true){
case $RedirectTo["jsResponse"]:
$B4code->RedirectWithJs($RedirectTo["redirectTo"]);
break;
default:
$B4code->redirect($RedirectTo["redirectTo"]);
break;
}
break;
}
break;
}
break;
default:
$B4code->redirect('STOPBOTNET 404');
break;
}
break;
case (isset($_GET["q"]) && !preg_match("/^[a-z0-9A-Z]*$/", $_GET["q"])):
$B4code->redirect('STOPBOTNET 405');
break;
default:
$B4code->redirect(200);
break;
}