vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Cerb's Anti-Proxy Hack - 15 seconds install (https://vborg.vbsupport.ru/showthread.php?t=68590)

Cerb 08-20-2004 10:00 PM

Cerb's Anti-Proxy Hack - 15 seconds install
 
This is my Anti-Proxy hack, works with any vBulletin version.

Just download the attachment.


What this hack does

This hack prevents anyone from accessing your site through a proxy.

This is pretty useful if you have a large/semi-large community like mine (www.bnfreak.com) with a lots of young / immature members.

If someone gets banned he will most likely try to come back through a proxy, this is what this hack prevents.



You can also customize it (like I did on my forums) to simply prevent new registrations from proxies rather than the whole site. To do this, just edit register.php instead of global.php



Don't forget to click Install ;)

nexialys 08-21-2004 03:19 PM

description please ???

Cerb 08-21-2004 04:51 PM

Pretty self-explainable:

Prevents proxies from accessing your forums.

nexialys 08-21-2004 04:56 PM

hum... i see, the only thing that will be brought here is that 30% of the internet will not be able to visit your board... good for you, but not really useful. anyway, anybody can release a hack.. ;)

pjdaley 08-21-2004 05:32 PM

with all due respect to my vb duders but what the hell is the point of this hack?

Zachery 08-21-2004 05:34 PM

Quote:

Originally Posted by pjdaley
with all due respect to my vb duders but what the hell is the point of this hack?

To keep users, youve banned from your site via ip, off your site.

Loki12 08-21-2004 05:40 PM

Quote:

Originally Posted by Zachery
To keep users, youve banned from your site via ip, off your site.

Indeed, can be very useful if one has a particular problem with trollers. Thanks :)

Cerb 08-21-2004 05:49 PM

Quote:

Originally Posted by nexialys
hum... i see, the only thing that will be brought here is that 30% of the internet will not be able to visit your board... good for you, but not really useful. anyway, anybody can release a hack.. ;)

Look man, I have a forum I can call large enough and we're a young community, many are very immature for instance if they get banned, they'll proxy back in and spam the website.

That's what this hack prevents.

pjdaley 08-21-2004 06:21 PM

thank you. i didn't mean to sound in any way like a smart mouth...

ohh i see....yes this is very useful...lol...

next time dude, explain for us that may not know. :nervous:

Cerb 08-21-2004 06:31 PM

Quote:

Originally Posted by pjdaley
thank you. i didn't mean to sound in any way like a smart mouth...

ohh i see....yes this is very useful...lol...

next time dude, explain for us that may not know. :nervous:

Alright, just edited my first post

pjdaley 08-21-2004 06:33 PM

thank you sir

Remi 08-21-2004 07:35 PM

Nice work

Is there a way to exclude some proxies please :)

Thanks

Cakes 08-21-2004 07:41 PM

Stupid question, but won't this block all AOL users and anyone else who's ISP automatically goes through a proxy (like Freeserve for me)?

Cerb 08-21-2004 07:53 PM

This blocks all proxies that gives out HTTP_X_FORWARDED_FOR, HTTP_FORWARDED or the most common, HTTP_VIA.

High anonymity (sp?) proxies don't return any of those variables, so if you're on one of those you're fine.

Couldn't really say if AOL has one of those variables since this connection is very uncommon where I'm from.


And @ excluding proxies, yes there's a way, you can add safe proxies in an array and check if the remote address = this proxy.



PHP Code:


// Add the safe proxies in this array
$safe_proxies = array('127.0.0.1','127.0.0.2','24.223.123.123'); // Safe Proxies

if (( isset($_SERVER['HTTP_FORWARDED']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || isset($_SERVER['HTTP_VIA'])) && !in_array($_SERVER['REMOTE_ADDR'],$safe_proxies) )
{    die(
"No Proxies");    } 


Wential 08-22-2004 04:12 AM

Excellent Hack!

Jolten 08-22-2004 04:46 AM

Thanks for sharing Cerb. Installed and happy.

Wential 08-22-2004 04:53 AM

1 question. Is there an easy way to test this?

Floris 08-22-2004 07:53 AM

Quote:

Originally Posted by Wential
1 question. Is there an easy way to test this?

Use your ISP proxy, and surf to your own site. :)

BladeZ 08-22-2004 09:28 AM

Great Hack,thanks!!

Bison 08-23-2004 01:44 AM

Very nice ... ;)

Click install!

Wential 08-23-2004 04:16 AM

Hehe! Great hack after playing with it for a day, pissed off 1 or 2 people in the process but who cares. Security should always be the #1 priority.

dethfire 08-23-2004 06:59 PM

this is exclude alot of users who browse inside companies or schools who must use proxies

Wential 08-23-2004 07:10 PM

That is true! This hack is not for everyone.

Cerb 08-23-2004 07:55 PM

Yeah this hack is for people with forums like mine (www.bnfreak.com) with lots of kids that knows some things about computers and try to be funny by registering through a proxy and spamming. Anyways, doesn't work anymore with this ^_^

And if you wanna test it, just get a proxy (www.stayinvisible.com is a good site for them), Avant Browser is the most idiot-proof browser for proxy support :-D and well, try visiting your forum, you should see a "No Proxy" error message.

-Sidekick- 08-26-2004 03:34 AM

I signed up for and am surfing your site via a proxy right now and it's not doing anything to me.

Cerb 08-26-2004 03:48 AM

Read your PM.

Like I told you, this hack does not work on High Anonymousity proxies.

it only works on proxies that return the HTTP_VIA variable, which contains every but High Anonymous proxies.

rinkrat 08-26-2004 05:29 AM

I added this and a lot of my regulars complained that they couldn't get on so I removed it.

Burns 10-11-2004 12:15 PM

I need a hack like this, but is there really no way to detect a high anonymity proxy?
I guess, the most trolls will use high anonymity proxies :(

Burns 10-18-2004 09:51 AM

Could anyone help me to modify this hack, so that high anonymity proxies are blocked too?
Isn't it possible to identify a high anonymity proxy on the basis of missing private header information?
( or just any proxy? )

alloutvb 10-18-2004 08:19 PM

Great Hack This Will Work Great For ME!

yinyang 10-21-2004 07:45 PM

Quote:

Originally Posted by Cerb

You can also customize it (like I did on my forums) to simply prevent new registrations from proxies rather than the whole site. To do this, just edit register.php instead of global.php

Don't forget to click Install ;)


*clicks install* great hack. i'm a bit of a noob at this, but i like the idea of preventing proxy users to register, but still letting them view the forum.

following your instructions above, am i correct to put the hack above this line?

PHP Code:

// ####################### SET PHP ENVIRONMENT ########################### 


jd-inflames 10-29-2004 02:34 AM

Erm...this sounds like a good idea and all, but do you think there is any way to keep those kids who just change their IP's and reregister away? I have more problem with those than people with proxies. Most people I catch on my board using a proxy are people who are at school or something and need to get around their schools web administration. I have a few people that use 'em to get around proxies at work as well.

Dys 12-14-2004 12:19 AM

I too couldnt find the "//identify where we are" in teh register.php and havent successfully installed it in the register.php, always get errors. Anyone know where this should do then if not on top?

Thanks

WhiteOx2 01-05-2005 03:48 AM

Find this bit in register.php:
PHP Code:

define('NO_REGISTER_GLOBALS'1); 

And underneath add:
PHP Code:

if (( isset($_SERVER['HTTP_FORWARDED']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || isset($_SERVER['HTTP_VIA'])) && !in_array($_SERVER['REMOTE_ADDR'],$safe_proxies) ) 
{    die(
"No Proxies");    } 


WhiteOx2 01-05-2005 03:51 AM

BTW: Does anyone know how to make this redirect to an html page instead of it saying No Proxies?

Dys 01-13-2005 03:37 AM

I upgraded to 3.0.5 which of course overwrote my register.php but when I put it back in the new register.php it no longer works correctly.... I am now getting this error

Warning: in_array(): Wrong datatype for second argument in /home/al7bar/public_html/forums/register.php on line 19

sananedir 03-07-2005 07:07 PM

really excellent you may have saved my forums

yoyoyoyo 03-08-2005 11:57 AM

great work! thanks

shadiguy1 05-01-2005 06:33 PM

anyway to display something like my forums header and the message or ability to display a graphics box with text in rather than just plain text

Zero Tolerance 05-02-2005 08:46 AM

Quote:

Originally Posted by WhiteOx2
BTW: Does anyone know how to make this redirect to an html page instead of it saying No Proxies?

Change:
Code:

if ( isset($_SERVER['HTTP_FORWARDED']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || isset($_SERVER['HTTP_VIA']) )
{        die("No Proxies");        }

To:
Code:

$Proxy_Detect = isset($_SERVER['HTTP_FORWARDED']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || isset($_SERVER['HTTP_VIA']);

if($Proxy_Detect){
header("Location: http://YOURSITE.com/YOURPAGE.HTML");
}

Change: http://YOURSITE.com/YOURPAGE.HTML to your settings. :)

It's a good modification, however in the process it will knock off a lot of users, perhaps research proxies and find out what information they do output, collect this information into an array and check if this is matched while browsing? That way it would only knock off those proxies instead of all, just a thought.

- Zero Tolerance


All times are GMT. The time now is 12:27 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.01528 seconds
  • Memory Usage 1,815KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (7)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