-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathgazelle.php
81 lines (76 loc) · 1.79 KB
/
gazelle.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
if (PHP_VERSION_ID < 70300) {
die("Gazelle (Orpheus fork) requires PHP 7.3 or later to function properly");
}
date_default_timezone_set('UTC');
$PathInfo = pathinfo($_SERVER['SCRIPT_NAME']);
$Document = $PathInfo['filename'];
if ($PathInfo['dirname'] !== '/') {
exit;
} elseif (in_array($Document, ['announce', 'scrape'])) {
die("d14:failure reason40:Invalid .torrent, try downloading again.e");
}
$Valid = false;
switch ($Document) {
case 'peerupdate':
/** @noinspection PhpMissingBreakStatementInspection */
case 'schedule':
define('MEMORY_EXCEPTION', true);
define('TIME_EXCEPTION', true);
case 'artist':
case 'better':
case 'bookmarks':
case 'collages':
case 'comments':
case 'forums':
case 'friends':
case 'torrents':
case 'upload':
case 'user':
case 'userhistory':
/** @noinspection PhpMissingBreakStatementInspection */
case 'wiki':
define('ERROR_EXCEPTION', true);
case 'ajax':
case 'apply':
case 'blog':
case 'bonus':
case 'captcha':
case 'chat':
case 'contest':
case 'donate':
case 'enable':
case 'error':
case 'inbox':
case 'index':
case 'irc':
case 'locked':
case 'log':
case 'logchecker':
case 'login':
case 'logout':
case 'random':
case 'recovery':
case 'referral':
case 'register':
case 'reports':
case 'reportsv2':
case 'requests':
case 'rules':
case 'signup':
case 'staff':
case 'staffblog':
case 'staffpm':
case 'stats':
case 'tools':
case 'top10':
case 'view':
$Valid = true;
break;
}
if (!$Valid) {
$_SERVER['SCRIPT_NAME'] = 'error.php';
$_SERVER['SCRIPT_FILENAME'] = 'error.php';
$Error = 404;
}
require_once('classes/script_start.php');