Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm) v2.4.x
Author Message
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sun Jul 02, 2006 8:54 pm Reply with quote

I used to love the idea that someone could get blocked via sentinel for flooding. Now as you all already know, I'm fresh at php and would love for the developers of sentinel to look at this:

<?php
$cookie1 =$_COOKIE['Dosscookie'];
intval($cookie1);
if($cookie1<1){
$value = '1';


setcookie("Dosscookie", $value, time()+3600, "/", ".darklords-lair.com");
}else{
setcookie("Dosscookie", $cookie1 +1, time()+3600, "/", ".darklords-lair.com");
}

if (eregi("block-Block_Creator.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$cookie =$_COOKIE['Dosscookie'];

$content = "<p>";
$content .= "Hello visitor, you have made ".$cookie." connections to this site within the last hour!!";
$content .= "</p>";
$content .= "";
?>

This is a block right now on my site, but I was thinking that another if statement could be applied like
else{ if ($cookie1>$max_allowed){
block_ip()
}else{
rest of code.

any problems you all see with this code I may have missed?ohh yeah forgot to mention I wrote this by reading the examples on php.net.

See it in action at [ Only registered users can see links on this board! Get registered or login! ]
As you can see it uses cookies and not the database, as with a flood or ddos it make mysql database seriously understrain and I figured for this to work, it shouldnt rely on the sql.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp







PostPosted: Sun Jul 02, 2006 10:20 pm Reply with quote

Perhaps I shoud have looked into how sentinel had the flood blocker set before killing me

It seems I'm not making an original thought killing me

but I did not copy the code and then post this, I could tell what was wrong with the flood blocker but it seemed to be buggy before, and I was working on a way to slow down or completley eliminate the idea of a ddoss attack on a site, seems I'm not the only one who tried this approach, but perhaps I could improve on it. If its an idea people would still like to have, for now Im working on a way to regulate the amount of people on the site as well as how many times you visit the site.
 
gregexp







PostPosted: Sun Jul 02, 2006 11:43 pm Reply with quote

This is what I have tried, any ideas on how I could REALLY make this work?

<?php
$cookie0 =$_COOKIE['Dosscookie'];
$cookie1 = intval($cookie0);
if($cookie1<1){
$cookie = '1';


setcookie("Dosscookie", $cookie, time()+120, "/", ".darklords-lair.com");
}elseif ($cookie1>15){
global $blocker_array;
$blocker_row = $blocker_array[11];
block_ip($blocker_row);
}else{
setcookie("Dosscookie", $cookie1 +1, time()+120, "/", ".darklords-lair.com");
}

if (eregi("block-Block_Creator.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$cookie = $cookie1 +1;

$content = "<p>";
$content .= "<CENTER><B>Hello visitor, you have made ".$cookie." connections to this site within the last 2 minutes!!</B><CENTER>";
$content .= "</p>";
$content .= "";

?>
 
gregexp







PostPosted: Mon Jul 03, 2006 5:29 pm Reply with quote

Well just to show those who ARE watching this topic, I have actually decided to use Sentinels bann ips table to set as a way to block or declare them as flooding the site. I have gotten everyone I can think of to test it under every avaiable enviroment(at my disposal) and it is now complete I believe but I would like to test this further with some help of anyone who would like to test this on their site.

I would like to contribute to the community and if possible to keeping nuke alive and secure.

If interested in testing the script please e-mail me and I will send you the block.

I really hope this can be added in some way to help others stop flood attacks and such.

I am currently working on a ddoss blocker without using databases
as it seems that hackers have gotten around blocks like those by dossing the site fast enough to make the mysql usage skyrocket and then it becomes useless.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm) v2.4.x

View next topic
View previous topic
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
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©