vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Cookie with Flood/Ddos Block (https://vborg.vbsupport.ru/showthread.php?t=155960)

memomemo 08-21-2007 10:00 PM

Cookie with Flood/Ddos Block
 
Sory I have english bad.

This mod for spam and flood

Updated for other php files.

Open index.php or anywhere php page (ex: showthread.php)

at top find

PHP Code:

<?php

/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.6.8 - Licence Number

Add Below

PHP Code:

<?php


$dd1 
$_COOKIE["spambak"];
$dd2 $_COOKIE["spambakx"];
$value1 '1';
$value7 '1200';
$adresxx $_SERVER['PHP_SELF'];
//cookie check

setcookie("spambak3""ok"time()+6000);  /* expire in 1 hour */
if ($_COOKIE["spambak3"] == "ok"):
else:
setcookie("adres"$adresxxtime()+60);
header("Location: check.php");
exit;
endif;

if (
$_COOKIE["spambak"] >= "60"):

setcookie("spambak"$value7time()+555560);  /* expire in 1 hour */
setcookie("spambakx""ok"time()+555560);  /* expire in 1 hour */
header("Location: http://www.asdğğğğğkfasdfjkashfjashfjashdf.com");
exit;
endif;

if (
$_COOKIE["spambakx"] == "ok"):
$value2 $dd1+1;
setcookie("spambak"$value2time()+60);  /* expire in 1 hour */


else:
setcookie("spambak"$value1time()+60);  /* expire in 1 hour */
setcookie("spambakx""ok"time()+60);  /* expire in 1 hour */

endif;

/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.6.8 - Licence Number



---------------------------------
Upload forum folder
check.php
nocookie.php

Enjoy Good Working

Njm 08-22-2007 03:56 PM

hummmmmm ..! how dose it work dud ?

what do u mean abut flood and spam ?

how dose this issue effact on my index.php ????

thanx any way ..

memomemo 08-22-2007 03:59 PM

Test ; Please click http://www.ailemiz.biz/test.php
Please page refresh 60 time in 1 minute
And block

This mod for DDOS attack

TTG 08-22-2007 06:12 PM

So if you have a forum with more than 61 members searching / posting, the 61st member is going to see an error message ?

memomemo 08-22-2007 06:19 PM

Quote:

Originally Posted by TTG (Post 1323362)
So if you have a forum with more than 61 members searching / posting, the 61st member is going to see an error message ?

No, error message for only one member.
if one member or ddos program 60st refresh page in 60 seconds and error page writing only one member

exc1te 08-22-2007 06:25 PM

Quote:

Originally Posted by memomemo (Post 1323368)
No, error message for only one member.
if one member or ddos program 60st refresh page in 60 seconds and error page writing only one member

this affects only index.php, hovewer, when e.g. some thread (showthread.php) will be ddosed, this mod will not help.

AzzidReign 08-22-2007 06:49 PM

Well, usually people only attack the index file...but can't you do this with your server config files?

memomemo 08-22-2007 08:19 PM

Quote:

Originally Posted by exc1te (Post 1323372)
this affects only index.php, hovewer, when e.g. some thread (showthread.php) will be ddosed, this mod will not help.

Open index.php or anywhere php page (ex: showthread.php)

at top find

<?php

add below code

PHP Code:

$dd1 $_COOKIE["spambak"];
$dd2 $_COOKIE["spambakx"];
$value1 '1';
$value7 '1200';
$adresxx $_SERVER['PHP_SELF'];
//cookie check

setcookie("spambak3""ok"time()+6000); /* expire in 1 hour */
if ($_COOKIE["spambak3"] == "ok"):
else:
setcookie("adres"$adresxxtime()+60);
header("Location: check.php");
exit;
endif;

if (
$_COOKIE["spambak"] >= "60"):

setcookie("spambak"$value7time()+555560); /* expire in 1 hour */
setcookie("spambakx""ok"time()+555560); /* expire in 1 hour */
header("Location: http://www.asdğğğğğkfasdfjkashfjashfjashdf.com");
exit;
endif;

if (
$_COOKIE["spambakx"] == "ok"):
$value2 $dd1+1;
setcookie("spambak"$value2time()+60); /* expire in 1 hour */


else:
setcookie("spambak"$value1time()+60); /* expire in 1 hour */
setcookie("spambakx""ok"time()+60); /* expire in 1 hour */

endif; 


memomemo 08-22-2007 08:21 PM

Quote:

Originally Posted by AzzidReign (Post 1323390)
Well, usually people only attack the index file...but can't you do this with your server config files?

config files dont working ddos or flod attack.
Because dont working

Test : http://www.ailemiz.biz/forum/includes/config.php
Dont working.

Attack only index.php, showthread.php and ex.

AzzidReign 08-22-2007 08:35 PM

Quote:

Originally Posted by memomemo (Post 1323456)
config files dont working ddos or flod attack.
Because dont working

Test : http://www.ailemiz.biz/forum/includes/config.php
Dont working.

Attack only index.php, showthread.php and ex.

You misunderstood, I said server config files, not vbulletin config.php.

memomemo 08-23-2007 07:15 AM

Quote:

Originally Posted by AzzidReign (Post 1323468)
You misunderstood, I said server config files, not vbulletin config.php.

Sorry. No this mod working for whoewer php files.

Hornstar 08-23-2007 07:21 AM

I pressed refresh non stop for 2 minutes on that site, and didnt get blocked. not working.

I even opened over 100 pages in tabs, and still not blocked. not working sorry.

memomemo 08-23-2007 07:25 AM

Quote:

Originally Posted by hornstar1337 (Post 1323770)
I pressed refresh non stop for 2 minutes on that site, and didnt get blocked. not working.

I even opened over 100 pages in tabs, and still not blocked. not working sorry.

No 2 minute block.
Only 61 refresh in 1 minute working.

or automatic reset and again number 1.

bashy 08-23-2007 06:48 PM

It block me i refreshed 61 times and it blocked me!!!

memomemo 08-24-2007 09:07 AM

Quote:

Originally Posted by bashy (Post 1324248)
It block me i refreshed 61 times and it blocked me!!!


This mod for attack
Please clear cookies in explorer or mozilla

killswitch 08-29-2007 02:41 AM

what id the person is not signed up and not a member. how will it block them then?

Knippschild 08-31-2007 05:41 PM

Regardless of the person not being signed up, it sets a cookie on their computer


The problem with this is if cookies are disabled ;)

realsumon 09-06-2007 09:42 AM

what shall i put here - header("Location: http://www.asdğğğğğkfasdfjkashfjashfjashdf.com");

my problem is last night - i have 1006 guest from - 70.87.15.10 That IP::

and they load every page.. if i use that code it will be ok?

memomemo 09-24-2007 02:39 AM

Quote:

Originally Posted by realsumon (Post 1333463)
what shall i put here - header("Location: http://www.asdğğğğğkfasdfjkashfjashfjashdf.com");

my problem is last night - i have 1006 guest from - 70.87.15.10 That IP::

and they load every page.. if i use that code it will be ok?


Change this adres example : http://www.yoursite.com/banned.htm ;)

Zachery 09-24-2007 03:03 AM

If you are seriously being ddossed or any real attack, nothing you can do on the software level will help. All of such attacks need to be fought on the hardware/network level.

yoyoyoyo 09-26-2007 01:52 AM

FYI - this mod causes a problem for any people trying to access your site using a proxy

theFAILURE 09-26-2007 02:14 AM

I agree, you need the prevention from the hardware level.

It's the requests to the server that bring the server down, not the success or failure of a page.

When you have 1000's of drone pc's requesting info from your server every second, software follies like this wont cut it.

ParsianSat_Net 11-10-2007 10:57 AM

Dear
only edit index.php and showthread.php ?

Hamednet 12-08-2007 08:41 AM

dear

I should Change this adress

Quote:

header("Location: http://www.asdğğğğğkfasdfjkashfjashfjashdf.com");
to my domain ?

thanks

AWS3 12-08-2007 08:39 PM

He shows in the Opera http://www.asdğğğğğkfasdfjkashfjashfjashdf.com and not the forum

Is this the bug ?

A0007 12-09-2007 07:57 AM

This is http://www.asdğğğğğkfasdfjkashfjashfjashdf.com ddoser redirect page,
u can change it to any address, when ddos attak will be redirected )))

Hamednet 12-10-2007 06:46 AM

ِDears

my site users say they when go to site index see
Quote:

Please Open Browser Cookies
" message

They couldn't go to mydomain.com/forum/index.php

It's very bad !!!!

why ?

Marco van Herwaarden 12-10-2007 10:16 AM

This might help for a amatuer DOS attack, very unlikely on a DDOS.

Also those who try to attack a server generally do not allow for cookies (often not even a real browser or just a basic client on machine in a botnet).

Hamednet 12-10-2007 10:44 AM

Mr. Marco van Herwaarden

Is there a Anti Flood for VB ?

my site has been attack 2 days ?

what is SOLUTION ?

Zachery 12-11-2007 04:23 PM

Quote:

Originally Posted by Hamednet (Post 1398473)
Mr. Marco van Herwaarden

Is there a Anti Flood for VB ?

my site has been attack 2 days ?

what is SOLUTION ?

To contact your webhost and let them know you're under attack.

Harry Jeffery 02-20-2008 01:25 PM

Thank you for releasing this.

chanvl 04-21-2008 06:58 PM

Can I use this code for vbb 3.7?

laurens800 04-22-2008 02:51 PM

This wont work ddosers does not save cookies

correct me if i'm wrong

IrPr 05-12-2008 07:10 PM

Quote:

Originally Posted by laurens800 (Post 1496614)
This wont work ddosers does not save cookies

correct me if i'm wrong

Correct;)

AzaDiyaR 08-05-2008 07:16 PM

this working for me thank you very much ..... this save olso cookies. working perfeckt...


All times are GMT. The time now is 07:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01425 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete