It is currently 23. Jul 2019 22:07

All times are UTC + 1 hour [ DST ]


Spenden Block 3
User Information
Guest Avatar




Facebook, Google Login
Registration
View new posts
BFA_8.2.0.30993 Repack
from: Gerhard Reiss Yesterday 06:41 View latest reply to topic Yesterday 06:41

Neues unveröffentlichtes Midgard BFA Repack 8.0.1
from: ironhead123 18. Jul 2019 19:32 View latest reply to topic 18. Jul 2019 19:32

Repack offers!
from: alisom22 12. Jul 2019 01:55 View latest reply to topic 12. Jul 2019 01:55




Post new topic Reply to topic  [ 1 post ] 
FollowersFollowers: 0
BookmarksBookmarks: 0
Views: 413

AuthorMessage
 Post subject: Kleines Anti DDoS Skript
PostPosted: 11. Dec 2017 12:26 
Offline
Forum Admin
User avatar

Joined: 02.2014
Posts: 561
Location: Dreamland
Gender: Male
das in eure haupt php einfügen

Die SQL
PHP-Code:

Quote:
CREATE TABLE `antiddos` (
`ips` char(255) NOT NULL DEFAULT '',
`load` int(2) DEFAULT '0',
KEY `ips` (`ips`)
) TYPE=MyISAM;


Quote:
<?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 "";
}
?>


nun eine connect.php erstellen und anpassen


Quote:
<?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
?>


nun eine ddosadmin.php

Quote:
<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();
?>


und eine truncate.php


Quote:
<?
include("include/connect.php");
mysql_query("TRUNCATE TABLE `antiddos`");
?>
<?
die("Clean Database<br>Database Cleared!");
?>

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
© phpBB® Forum Software | phpBB3 free Forum by UserBoard.org | All Rights Reserved.
» Contact & Abuse Support-Forum Gooof Webdesign free forum Dein Forumo Forum web tracker