UBB.Dev
Posted By: magik Finished-[6.3] X_FORWARDED ver 1.0.1 - 08/10/2003 3:41 PM
Mod Name / Version: X_FORWARDED ver 1.0

Description: After install this modification you can see user IP even if he use a proxy.

You can ban IP with any proxy

example 80.85.226.143 (%)

IP with only one proxy

217.144.200.8 (proxy: 217.144.192.86)

baned IP or proxy + IP

80.85.226.143%



Working Under: UBB.Threads 6.3

Mod Status: Finished

Any pre-requisites: ubbthreads

Author(s): xysiu magik

Date: 08/10/03

Credits: Forum Tarnów Online (http://www.forum.tarnow.pl)

Files Altered: ubbt.inc.php
start_page.php
mysql.inc.php
dopoll.php
adduser.php
addpost.php


New Files: no

Database Altered: no

Info/Instructions:

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.




ver 1.0.1 fixed Instructions


Attached File
91358-forwarder.txt  (355 downloads)
Posted By: AKD96 Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/11/2003 4:48 AM
That looks pretty frickin' nifty. I'll have to check this out at work tomorrow!
Posted By: AKD96 Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/13/2003 2:25 PM
I'm getting this error:

[]
Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/drumlin/public_html/threads/mysql.inc.php on line 228

Fatal error: Cannot instantiate non-existent class: sql in /home/drumlin/public_html/threads/ubbt.inc.php on line 145
[/]
Posted By: AKD96 Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/13/2003 2:26 PM
Line 228 is not changed in mysql.inc.php from stock:
[] $u_status = @$user['U_Status'];[/]

Line 145 in ubbt.inc.php is also unchanged and is:
[] $dbh = new sql;[/]
Posted By: magik Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/13/2003 2:34 PM
I do mistake in instruction

was


Code
 <br /> <br />################## <br />#OPen <br /># mysql.inc.php <br />################## <br /> <br />###find <br /> <br /> <br />$who = find_environmental('REMOTE_ADDR'); <br /> <br />###change for this : <br /> <br />//				$who = find_environmental('REMOTE_ADDR'); <br />		   if ($_SERVER["HTTP_X_FORWARDED_FOR"]) { <br />   if ($_SERVER["HTTP_CLIENT_IP"]) { <br />     $PROXY = $_SERVER["HTTP_CLIENT_IP"]; <br />   } else { <br />    $PROXY = $_SERVER["REMOTE_ADDR"]; <br />   } <br />   $IP = $_SERVER["HTTP_X_FORWARDED_FOR"]; <br />   } else { <br />   if ($_SERVER["HTTP_CLIENT_IP"]) { <br />     $IP = $_SERVER["HTTP_CLIENT_IP"]; <br />   } else { <br />    $IP = $_SERVER["REMOTE_ADDR"]; <br />   } <br />   } <br /> <br />   if (isset($PROXY)) { <br />   $IP=$IP." (proxy: $PROXY)"; <br />   } <br />   $who=$IP; <br />			} <br /> <br /> <br />


soud by


Code
 <br /> <br />################## <br />#OPen <br /># mysql.inc.php <br />################## <br /> <br />###find <br /> <br /> <br />$who = find_environmental('REMOTE_ADDR'); <br /> <br />###change for this : <br /> <br />//				$who = find_environmental('REMOTE_ADDR'); <br />		   if ($_SERVER["HTTP_X_FORWARDED_FOR"]) { <br />   if ($_SERVER["HTTP_CLIENT_IP"]) { <br />     $PROXY = $_SERVER["HTTP_CLIENT_IP"]; <br />   } else { <br />    $PROXY = $_SERVER["REMOTE_ADDR"]; <br />   } <br />   $IP = $_SERVER["HTTP_X_FORWARDED_FOR"]; <br />   } else { <br />   if ($_SERVER["HTTP_CLIENT_IP"]) { <br />     $IP = $_SERVER["HTTP_CLIENT_IP"]; <br />   } else { <br />    $IP = $_SERVER["REMOTE_ADDR"]; <br />   } <br />   } <br /> <br />   if (isset($PROXY)) { <br />   $IP=$IP." (proxy: $PROXY)"; <br />   } <br />   $who=$IP; <br /> <br /> <br />




edited first post
Posted By: AKD96 Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/13/2003 5:22 PM
Okay, it's not returning errors now! But how do I know it's working? For example, I'm behind a proxy at work, yet I posted a test post and it still displays my proxy's IP.
Posted By: magik Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/13/2003 5:36 PM
look



Attached picture 91789-Untitled-2 copy.gif
Posted By: magik Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/13/2003 5:42 PM
ahh its workoking only for new post after you are inatall modification

Attached picture 91790-Untitled-4 copy.gif
Posted By: AKD96 Re: Finished-[6.3] X_FORWARDED ver 1.0 - 08/13/2003 6:30 PM
Okay. I guess my proxy just doesn't use the "forwarded for" information.
Posted By: smoknz28 Re: Finished-[6.3] X_FORWARDED ver 1.0.1 - 12/16/2003 8:40 PM
Just installed this hack under my v6.4 and working good. I've been checking the "Who's Online" and it's picking up some proxies.

Question however, does this hack only enable those who can see IPs see who's using proxies in the "Who's Online"? I click on members profiles and look at their IPs they've used and I've yet to run across anyone with a captured proxy server listed and I'm sure there have been a few of my jokers who have done this. Does this hack capture these proxies and input them anywhere? Probably not seeing how this hack does not touch the database?

Thanks however for a nice hack.
Posted By: BryanDS Re: Finished-[6.3] X_FORWARDED ver 1.0.1 - 09/28/2004 8:19 AM
This one doesnt seem to match 6.5 files.. will it be updated for that?
© UBB.Developers