Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2006, 02:16 AM
aveon's Avatar
aveon aveon is offline
 
Join Date: May 2006
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 07-31-2006, 02:55 AM
aveon's Avatar
aveon aveon is offline
 
Join Date: May 2006
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 "";
?>
Reply With Quote
  #3  
Old 08-03-2006, 05:08 AM
aveon's Avatar
aveon aveon is offline
 
Join Date: May 2006
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 08-03-2006, 06:02 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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");
}
?>
Reply With Quote
  #5  
Old 08-03-2006, 09:07 AM
aveon's Avatar
aveon aveon is offline
 
Join Date: May 2006
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where do i add this codes how do i creae a coockie i dont have any idea can you help me out with that???
Reply With Quote
  #6  
Old 08-07-2006, 06:00 AM
aveon's Avatar
aveon aveon is offline
 
Join Date: May 2006
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anybody to help me any body good on cookies ?????
Reply With Quote
  #7  
Old 08-07-2006, 12:04 PM
fxs158 fxs158 is offline
 
Join Date: May 2003
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 08-07-2006, 02:20 PM
aveon's Avatar
aveon aveon is offline
 
Join Date: May 2006
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...???
Reply With Quote
  #9  
Old 08-07-2006, 03:20 PM
Dilmah Dilmah is offline
 
Join Date: May 2005
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mac addresses are useless.
Reply With Quote
  #10  
Old 08-08-2006, 02:37 AM
aveon's Avatar
aveon aveon is offline
 
Join Date: May 2006
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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???
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04610 seconds
  • Memory Usage 2,266KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete