This repository was archived by the owner on Apr 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathredir.php
More file actions
39 lines (37 loc) · 1.34 KB
/
redir.php
File metadata and controls
39 lines (37 loc) · 1.34 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
<?php
/*
+------------------------------------------------
| TBDev.net BitTorrent Tracker PHP
| =============================================
| by CoLdFuSiOn
| (c) 2003 - 2011 TBDev.Net
| http://www.tbdev.net
| =============================================
| svn: http://sourceforge.net/projects/tbdevnet/
| Licence Info: GPL
+------------------------------------------------
| $Date$
| $Revision$
| $Author$
| $URL$
+------------------------------------------------
*/
require_once "include/bittorrent.php";
dbconn(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();
print("<html><head><meta http-equiv='refresh' content='3;url=$url'></head><body>\n");
print("<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");
print(htmlsafechars($url)."</div></body></html>\n");
?>