vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Cookie Ban ?? (https://vborg.vbsupport.ru/showthread.php?t=122527)

aveon 07-30-2006 01:16 AM

Cookie Ban ??
 
hello mates

im looking for a mod well this mod will put a cookie on someones computer if they are banned via IP and try to access the forum. It then will check for that cookie every time they try to access the forum, and will block them. If there is something like this it would be most usefull for keeping people with dynamic IPs out.???????

it would be great if anyone can help me :(

aveon 07-31-2006 01:55 AM

i figured ou something like this and i dont know how to install this to vbulletin...


HTML Code:

<?php
$IP = $_SERVER['REMOTE_ADDR'];
if ($IP =="x.x.x.x")
setcookie(Ban, 'cookietest', time()+3600000000);
else if ($IP =="x.x.x.x")
setcookie(Ban, 'cookietest', time()+3600000000);
else if ($IP =="x.x.x.x")
setcookie(Ban, 'cookietest', time()+3600000000);
else if ($IP =="x.x.x.x")
setcookie(Ban, 'cookietest', time()+3600000000);
else if ($IP =="x.x.x.x")
setcookie(Ban, 'cookietest', time()+3600000000);
else if ($IP =="x.x.x.x")
setcookie(Ban, 'cookietest', time()+3600000000);
else if ($IP =="x.x.x.x")
setcookie(Ban, 'cookietest', time()+3600000000);
else echo "";
?>

<?php
if ($_COOKIE['Ban'])
die ('Sorry, you are banned from using this forum!');
else echo "";
?>


aveon 08-03-2006 04:08 AM

this would be a great hack if you guys help me to finish this and i know it will be use full to other vb users

harmor19 08-03-2006 05:02 AM

Why would you do it that way?
A better solution would giving the user a cookie then check if the user has the cookie

PHP Code:

<?php
setcookie
(Ban'cookietest'time()+3600000000);
?>

Then you'd just check if user has the cookie
PHP Code:

<?php
if (isset($_COOKIE['Ban']))
{
   die(
"You are banned from using this forum");
}
?>


aveon 08-03-2006 08:07 AM

where do i add this codes how do i creae a coockie i dont have any idea can you help me out with that???

aveon 08-07-2006 05:00 AM

anybody to help me any body good on cookies ?????

fxs158 08-07-2006 11:04 AM

This is actually a good idea, but as the original poster said, the ideal thing would be to send two cookies. One with the forum name etc and the seccond with a name that we would choose.

That way if user tries to delete cookie, more than likelly he is not going to delete all becaue it is a pain in the rear, he would then look for the cookie and delete the one with the domain name and call it the day.

Not knowing that there is a seccond cookie.

Better yet, is there a way to set a cookie that would record the mac adress of the user?

I be willing to pay $$ for a good security hack like this.

aveon 08-07-2006 01:20 PM

i just need to kno how to set cookies and send them to the users how do i do that my question is easy is that...???

Dilmah 08-07-2006 02:20 PM

Mac addresses are useless.

aveon 08-08-2006 01:37 AM

i found this on web and this hack is for invidionize boards but can we use it for vbulletin too??


Quote:

2. Open up functions.php

3. Find:

----------------------------------------------------------

if ($ibforums->vars['ban_ip'])

{

$ips = explode( "|", $ibforums->vars['ban_ip'] );



foreach ($ips as $ip)

----------------------------------------------------------

4. Before add:

----------------------------------------------------------

// Check to see if the banned cookie is set

if ($std->my_getcookie('banned')) {

$std->Error( array( 'LEVEL' => 1, 'MSG' => 'you_are_banned', 'INIT' => 1 ) );

}

----------------------------------------------------------

5. Find:

----------------------------------------------------------

$ip = preg_replace( "/\*/", '.*' , preg_quote($ip, "/") );



if ( preg_match( "/^$ip/", $ibforums->input['IP_ADDRESS'] ) )

{

----------------------------------------------------------

6. Below add:

----------------------------------------------------------

if(!$std->my_getcookie('banned')) {

$std->my_setcookie('banned', 'yes');

}

----------------------------------------------------------
with all this information cant we figure out anything at all???

aveon 08-13-2006 05:34 PM

man noone doesnt kno about cookies its bad guys really bad all the other boards can do it and vbulletin should be betteer but i see noone cares...

any body there to help guys come on it been 2 weeks anyoone cant figure it out hmmmm

aveon 08-16-2006 02:27 AM

man we gave 160 for nothing no cosumer service nothing it been 2 weeks i gave to many cluee if i only knew anything about cookies i would figure it out but i cant...

Paul M 08-16-2006 05:27 PM

Just to be clear - this is not a Jelsoft Customer Service forum, this is a voluntary site for people to release vb modifications. There is no guarentee you will get any answer to your question.

aveon 09-09-2006 12:17 PM

anybody people this is so imporant please help me put with this
cant we improve ip bannning on vbulletin or how can we make ip banning process set a cookie on some ones computer from that ip and he will be blocked even if he reseta his ip come on friends

aveon 09-17-2006 07:00 PM

any idea to put a cookie to functions.php on this line

PHP Code:

#############################################################################
/**
* Checks to see if the IP address of the visiting user is banned from visiting
*
* This function will show an error and halt execution if the IP is banned.
*/
function verify_ip_ban()
{
    
// make sure we can contact the admin
    
if (THIS_SCRIPT == 'sendmessage' AND (empty($_REQUEST['do']) OR $_REQUEST['do'] == 'contactus' OR $_REQUEST['do'] == 'docontactus'))
    {
        return;
    }

    global 
$vbulletin;

    
$user_ipaddress IPADDRESS '.';

    if (
$vbulletin->options['enablebanning'] == AND $vbulletin->options['banip'] = trim($vbulletin->options['banip']))
    {
        
$addresses preg_split('#\s+#'$vbulletin->options['banip'], -1PREG_SPLIT_NO_EMPTY);
        foreach (
$addresses AS $banned_ip)
        {
            if (
strpos($banned_ip'*') === false AND $banned_ip{strlen($banned_ip) - 1} != '.')
            {
                
$banned_ip .= '.';
            }

            
$banned_ip_regex str_replace('\*''(.*)'preg_quote($banned_ip'#'));
            if (
preg_match('#^' $banned_ip_regex '#U'$user_ipaddress))
            {
                eval(
standard_error(fetch_error('banip'$vbulletin->options['contactuslink'])));
            }
        }
    }
}

// #############################################################################
/** 


aveon 09-30-2006 01:25 PM

come on coders cat anybody figure anything out?? :(

aveon 10-29-2006 08:42 PM

is there anybody out there that can help me with this im not good at coding any good coder can help me with this come on guys vb must be better than smf:ermm:

Mythotical 10-31-2006 08:35 AM

aveon, got your PM, I will test a few things with your code as it will have to be placed in a plugin. I'll make a post within the next 12-18 hours to let you know.

aveon 10-31-2006 10:30 AM

Quote:

Originally Posted by Steve M
aveon, got your PM, I will test a few things with your code as it will have to be placed in a plugin. I'll make a post within the next 12-18 hours to let you know.


thnx bro

aveon 11-09-2006 06:46 PM

it been 5 months since i requested this mod is it time that u guys help me on this??

fly 11-09-2006 07:33 PM

This totally seems like a useless hack to me. When people usually clear cookies, they clear them all. Either way, if you want ensure this hack is done, offer to pay for it in the proper forum.

aveon 11-09-2006 08:03 PM

Quote:

Originally Posted by flypaper
This totally seems like a useless hack to me. When people usually clear cookies, they clear them all. Either way, if you want ensure this hack is done, offer to pay for it in the proper forum.



not everyone can think that way not every one knows what a cookie is soo if u guys can atleast do it usefull or useless will use it atleast im sure i will

Reeve of shinra 11-09-2006 08:55 PM

There was a vb2 hack that did something similiar to this... we modded it and called it the token of death because were funny like that. It worked pretty well. If I can find time later, I'll see if I can recode it for 3.5/3.6.

aveon 11-11-2006 01:56 AM

Quote:

Originally Posted by Reeve of shinra
There was a vb2 hack that did something similiar to this... we modded it and called it the token of death because were funny like that. It worked pretty well. If I can find time later, I'll see if I can recode it for 3.5/3.6.

eweryone says that they are gunna help but they never help i hope u will thanx

aveon 11-12-2006 03:34 AM

hmmm i think im gunna learn php and vbulletin to do it myself noones helpin me on this fo 6 months wow

G0F0RBR0KE 11-12-2006 03:45 AM

Once again..this is not a Jelsoft Customer Services..I know you're desperate for this modification to be added...The more and more you keep bringing this subject...people will not do it..Either you google and find a way to learn how to develope your own or pay...coding isn't simple..we need to test them before it's even out to publics...how would you feel that someone makes it and gives it to you..you try it..the board gets mess up??

We also need to be pre-caution on what we do..One mistake can cause us to restart the community (if we forget to get a back up)..

aveon 11-12-2006 04:00 AM

Quote:

Originally Posted by EvilAkuma
Once again..this is not a Jelsoft Customer Services..I know you're desperate for this modification to be added...The more and more you keep bringing this subject...people will not do it..Either you google and find a way to learn how to develope your own or pay...coding isn't simple..we need to test them before it's even out to publics...how would you feel that someone makes it and gives it to you..you try it..the board gets mess up??

We also need to be pre-caution on what we do..One mistake can cause us to restart the community (if we forget to get a back up)..


ok i undertand wat u mean but the more those guys messin with my site more i get upset i just wanna do altleast to keem them away for i while and for that back up thing just get a free domain like funpic kayyo whatever so ur own site will be safe anyways the ppl who said they r gunna help i think they couldnt come up with any mod i thanx to them for try to help meh i wish there is a way to ban dinamic ip's for good but there are not much we can do so im desparet about this hack but no luck smf invesion boards usin this mod but we cant anyways thats not the point im glad ppl try to help me thanx to u all :)

G0F0RBR0KE 11-12-2006 04:21 AM

What version of vBulltin you're using??? You know there is a hack called "miserable" simply put him in there. He'll have difficult time logging out...

https://vborg.vbsupport.ru/showthrea...iserable+users that is for 3.6.x

aveon 11-12-2006 04:26 AM

Quote:

Originally Posted by EvilAkuma
What version of vBulltin you're using??? You know there is a hack called "miserable" simply put him in there. He'll have difficult time logging out...

https://vborg.vbsupport.ru/showthrea...iserable+users that is for 3.6.x

i tried bro it doesnt even work on this guys they post adul pics and all that crap and other members stays away from the site

G0F0RBR0KE 11-12-2006 04:31 AM

I've been there..try banning IP ranges..If he uses proxies...most likely all IP will start with the same digit...just the 2 or 3 last digit will be different..

Example

24.123.11.45* will block
24.123.11.1
24.123.11.43
etc...

aveon 11-12-2006 04:35 AM

i kno bro but for couple of chump all the members from that region will be band its not fear to others and dinamic ips changes on every restart if the modem ill try to see if i can entegrate Invision Power Boards cookie ban mod for vbulletin i dnd ewen kno how

?dit (Aveon)

here is a code ifound on internet can we integrate this for vb

Quote:

################################################## ############
## MOD Title: Ban_cookie
## MOD Author: Merlin Sythove < Merlin@silvercircle.org >
## MOD Description: Give banned users a cookie and check that too,
## in addition to the existing checks. Once the cookie is in place:
## if it matches the database, the user is banned, even if the user
## gets another IP or is not logged in so the user ID is unknown.
## MOD Version: 0.9
##
## Installation Level: (Easy/Intermediate/Advanced)
## Installation Time: 5 Minutes
## Files To Edit: includes/sessions.php
## Included Files: (N/A)
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
################################################## ############
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
################################################## ############
## Author Notes:
##
################################################## ############
## MOD History:
##
## 2005-1101: Version 0.9
##
################################################## ############
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############

#
#-----[ OPEN ]------------------------------------------
#
includes/sessions.php

#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT ban_ip, ban_userid, ban_email
FROM " . BANLIST_TABLE . "
WHERE ban_ip IN ('" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . "', '" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . "ff', '" . $user_ip_parts[1] . $user_ip_parts[2] . "ffff', '" . $user_ip_parts[1] . "ffffff')
OR ban_userid = $user_id";
if ( $user_id != ANONYMOUS )
{
$sql .= " OR ban_email LIKE '" . str_replace("\'", "''", $userdata['user_email']) . "'
OR ban_email LIKE '" . substr(str_replace("\'", "''", $userdata['user_email']), strpos(str_replace("\'", "''", $userdata['user_email']), "@")) . "'";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);
}

if ( $ban_info = $db->sql_fetchrow($result) )
{
if ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] )
{
message_die(CRITICAL_MESSAGE, 'You_been_banned');
}
}

#
#-----[ REPLACE WITH ]------------------------------------------
#
//START MOD Ban_cookie
//Give banned users a cookie and check that too, in addition to the existing checks.
//Once the cookie is in place: if it matches the database, the user is banned,
//even if the user gets another IP or is not logged in so the user ID is unknown.

//Get cookie ban settings.
$ban_cookie = '';
$banned_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'].'_banned_id']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'].'_banned_id'] : '';
$banned_ip = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'].'_banned_ip']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'].'_banned_ip'] : '';

//Yes, cookie ban settings were there. See if they match the database.
//If not, delete cookie.
if ($banned_ip || $banned_id)
{
$sql = "SELECT *
FROM " . BANLIST_TABLE . "
WHERE ";
$sql .= ($banned_ip) ? " ban_ip = '" . $banned_ip . "'" : '';
$sql .= ($banned_id) ? ($banned_ip ? ' OR ' : '') . ' ban_userid = ' . $banned_id : '';
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);
}
if ( $ban_info = $db->sql_fetchrow($result) )
{
$ban_cookie = ( $ban_info['ban_ip'] || $ban_info['ban_userid']);
}
//There was a cookie but no match in the database, so the ban is lifted:
//delete the cookie by setting the expiry time 1 hour ago
if (! $ban_cookie)
{
if ($banned_ip) setcookie($board_config['cookie_name'].'_banned_ip',$banned_ip, time()-3600);
if ($banned_id) setcookie($board_config['cookie_name'].'_banned_id',$banned_id, time()-3600);
}
}
//Have $ban_cookie, if not empty, the user is banned via a cookie.
//If empty, then there was no cookie, or there was no LONGER a database match so the cookie was deleted

//Check if there is database ban info - this is roughly the original ban code
$ban_database = '';
$sql = "SELECT *
FROM " . BANLIST_TABLE . "
WHERE ban_ip IN ('" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . $user_ip_parts[4] . "', '" . $user_ip_parts[1] . $user_ip_parts[2] . $user_ip_parts[3] . "ff', '" . $user_ip_parts[1] . $user_ip_parts[2] . "ffff', '" . $user_ip_parts[1] . "ffffff')
OR ban_userid = $user_id";
if ( $user_id != ANONYMOUS )
{
$sql .= " OR ban_email LIKE '" . str_replace("\'", "''", $userdata['user_email']) . "'
OR ban_email LIKE '" . substr(str_replace("\'", "''", $userdata['user_email']), strpos(str_replace("\'", "''", $userdata['user_email']), "@")) . "'";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not obtain ban information', '', __LINE__, __FILE__, $sql);
}
if ( $ban_info = $db->sql_fetchrow($result) )
{
$ban_database = ( $ban_info['ban_ip'] || $ban_info['ban_userid'] || $ban_info['ban_email'] );
//Fill these variables from database if not filled from cookie yet
if (! $banned_ip) $banned_ip = $ban_info['ban_ip'];
if (! $banned_id) $banned_id = $ban_info['ban_userid'];
}

//User is banned in some way?
if ($ban_cookie || $ban_database)
{
//Set the ban_cookie, time it for 1 year. The time restarts every time the user comes here
if ($banned_ip) setcookie($board_config['cookie_name'].'_banned_ip',$banned_ip, time()+365*24*3600);
if ($banned_id) setcookie($board_config['cookie_name'].'_banned_id',$banned_id, time()+365*24*3600);
//Close the forum to this person
message_die(CRITICAL_MESSAGE, 'You_been_banned');
}
//END MOD Ban_cookie

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

G0F0RBR0KE 11-12-2006 05:02 AM

Alrite...I'll see if I can get it transfer to vBulletin... I'll try my best...

aveon 11-12-2006 05:04 AM

Quote:

Originally Posted by EvilAkuma
Alrite...I'll see if I can get it transfer to vBulletin... I'll try my best...


thnx bro if u want any type of style im here im professional on html but not on php thanx again

G0F0RBR0KE 11-12-2006 05:20 AM

Before I decide to start on it..please tell me what version vB you're running...

aveon 11-12-2006 05:26 AM

Quote:

Originally Posted by EvilAkuma
Before I decide to start on it..please tell me what version vB you're running...

3.6.1

G0F0RBR0KE 11-12-2006 05:34 AM

not good >.> I'm on 3.5.4 and there is NO way for me to implement this till I upgrade my software (I have no attention in upgrading since they don't have ushop and ucash for that version)...Don't give up hope...I might see if my friend allows me to test stuff on his forum... :confused:

aveon 11-12-2006 05:41 AM

Quote:

Originally Posted by EvilAkuma
not good >.> I'm on 3.5.4 and there is NO way for me to implement this till I upgrade my software (I have no attention in upgrading since they don't have ushop and ucash for that version)...Don't give up hope...I might see if my friend allows me to test stuff on his forum... :confused:


like i said before just get a free domain and install vbulletin to it and test ur staff on that free site its better and clear

G0F0RBR0KE 11-12-2006 05:43 AM

You're running 3.6.x I'm running 3.5.x
You do realize I was planning to test it as a xml product...But i'll see if I can test it on my friends forum...I doubt he'll do it on a free domain..

aveon 11-12-2006 05:46 AM

actuallt i do have a free domain you can install vbuletin on it for ur test site there you lo ill give you the login by pm

G0F0RBR0KE 11-12-2006 05:51 AM

I dont have vB 3.6.x and my friend wont allow me to have his to test stuff


All times are GMT. The time now is 10:57 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.02065 seconds
  • Memory Usage 1,869KB
  • 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
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete