-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathredir.php
More file actions
59 lines (45 loc) · 1.35 KB
/
redir.php
File metadata and controls
59 lines (45 loc) · 1.35 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
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
<?php
/**
**************************
** FreeTSP Version: 1.0 **
**************************
** http://www.freetsp.info
** https://github.com/Krypto/FreeTSP
** Licence Info: GPL
** Copyright (C) 2010 FreeTSP v1.0
** A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
** Project Leaders: Krypto, Fireknight.
**/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'functions'.DIRECTORY_SEPARATOR.'function_main.php');
require_once(FUNC_DIR.'function_vfunctions.php');
db_connect(false);
if (!isset($CURUSER))
{
die();
}
$url = '';
while (list($var, $val) = each($_GET))
{
$url .= "&$var=$val";
}
if (preg_match("/([<>'\"]|'|!|"|%27|%22|%3E|%3C|'|"|>|<|\.js)/i", $url))
{
header("Location: http://www.urbandictionary.com/define.php?term=twat");
}
$i = strpos($url, "&url=");
if ($i !== false)
{
$url = substr($url, $i + 5);
}
if (substr($url, 0, 4) == "www.")
{
$url = "http://".$url;
}
if (strlen($url) < 10)
{
die();
}
echo("<html><head><meta http-equiv='refresh' content='3;url=$url'></head><body>\n");
echo("<div style='width:100%;text-align:center;background: #E9D58F;border: 1px solid #CEAA49;margin: 5px 0 5px 0;padding: 0 5px 0 5px;font-weight: bold;'>Redirecting you to:<br />\n");
echo(htmlentities($url)."</div></body></html>\n");
?>