Code:
CREATE TABLE `antiddos` ( `ips` char(255) NOT NULL DEFAULT '', `load` int(2) DEFAULT '0', KEY `ips` (`ips`) ) TYPE=MyISAM;
Code:
<?php
include("include/connect.php");
$load = file_get_contents("".$url."");
preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/",$load,$avgs);
$current=$avgs[1];
//echo $current;
if($current >20)
{
$ip = $_ENV['REMOTE_ADDR'];
mysql_query("INSERT INTO `antiddos` (`ips`,`load`) VALUES ('$ip','$current')") or sqlerr(__FILE__, __LINE__);
echo "Der Server Load ist zu hoch, wir stehen unter einer DoS attacke. ALLE IP AKTIVITÄTEN WERDEN IN DIESER ZEIT GELOGGT";
exit;
}
else{
echo "";
}
?>
Code:
<?php
mysql_connect("localhost","DATABASE_USER","DB_PASS");
mysql_select_db("DB_DATABASE");
$url = "http://www.Your-URL.com/metaltorrents/server_info.php"; // Pfad zur server_info.php
?>
Code:
<p align="center"><a href="truncate.php">Clear Database</a><br />
<em>Its HIGHLY recomended that you clear the database on a daily basis. </em></p>
<div align="center">
<table width="622" border="1">
<tr>
<td width="571"><div align="center" class="style1">Anti-DDoS Elite</div></td>
</tr>
</table>
<table width="622" border="1">
<tr>
<td width="571"><div align="center">IP Address</div></td>
<td width="571"><div align="center">Number Times accessed</div></td>
</tr>
<?php
include("include/connect.php");
$result = mysql_query("SELECT ips, COUNT(ips) AS NumOccurrences FROM antiddos GROUP BY ips HAVING ( COUNT(ips) > 1 ) order by NumOccurrences desc");
while($r=mysql_fetch_array($result))
{
$ips=$r["ips"];
$NumOccurrences=$r["NumOccurrences"];
echo "<tr><td>$ips</td><td>[$NumOccurrences]</td></tr>";
}
?>
</table>
</div>
<?
stdfoot();
?>
Code:
<?
include("include/connect.php");
mysql_query("TRUNCATE TABLE `antiddos`");
?>
<?
die("Clean Database<br>Database Cleared!");
?>

Author unbekannt war ein gast wo das gepostet hat o.Ô






