hacker-valletje
Code (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
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
<?php
// Hacker valletje
if ($_COOKIE['admin'] == "")
{
setcookie ("admin", '0');
} else {
if($_COOKIE['admin'] != "0")
{
mysql_query("INSERT INTO ipblok (reason,ip,time,auto) VALUES ('Don\'t fuck with cookies!!!','".$_SERVER['REMOTE_ADDR']."','".(time()+86400)."',1)") or die ;
setcookie ("admin", '0');
}
}
//-- Ban test
$sql = mysql_query("SELECT * FROM ipblok WHERE ip='".$_SERVER['REMOTE_ADDR']."' AND time > '".time()."'");
$fetch = mysql_fetch_assoc($sql);
if(mysql_num_rows($sql) > 0 && time() < $fetch['time'])
{
echo "Unfortunately you're banned!";
echo "<br><br><b>Reason:</b> ".$fetch['reason'];
echo "<br>We'll give you another chance. You'll be unblocked over: ".date("i:s",$fetch['time']-time());
unset($_SESSION['x']);
exit;
} // Einde functie
?>
// Hacker valletje
if ($_COOKIE['admin'] == "")
{
setcookie ("admin", '0');
} else {
if($_COOKIE['admin'] != "0")
{
mysql_query("INSERT INTO ipblok (reason,ip,time,auto) VALUES ('Don\'t fuck with cookies!!!','".$_SERVER['REMOTE_ADDR']."','".(time()+86400)."',1)") or die ;
setcookie ("admin", '0');
}
}
//-- Ban test
$sql = mysql_query("SELECT * FROM ipblok WHERE ip='".$_SERVER['REMOTE_ADDR']."' AND time > '".time()."'");
$fetch = mysql_fetch_assoc($sql);
if(mysql_num_rows($sql) > 0 && time() < $fetch['time'])
{
echo "Unfortunately you're banned!";
echo "<br><br><b>Reason:</b> ".$fetch['reason'];
echo "<br>We'll give you another chance. You'll be unblocked over: ".date("i:s",$fetch['time']-time());
unset($_SESSION['x']);
exit;
} // Einde functie
?>