Previous Thread
Next Thread
Print Thread
Rating: 5
Joined: Oct 2002
Posts: 64
Power User
Power User
Offline
Joined: Oct 2002
Posts: 64
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
Attachments
91358-forwarder.txt (0 Bytes, 355 downloads)

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
That looks pretty frickin' nifty. I'll have to check this out at work tomorrow!

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
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
[/]

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
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;[/]

Joined: Oct 2002
Posts: 64
Power User
Power User
Offline
Joined: Oct 2002
Posts: 64
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

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
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.

Joined: Oct 2002
Posts: 64
Power User
Power User
Offline
Joined: Oct 2002
Posts: 64
look

Attachments
91789-Untitled-2 copy.gif (0 Bytes, 75 downloads)

Joined: Oct 2002
Posts: 64
Power User
Power User
Offline
Joined: Oct 2002
Posts: 64
ahh its workoking only for new post after you are inatall modification
Attachments
91790-Untitled-4 copy.gif (0 Bytes, 45 downloads)

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Okay. I guess my proxy just doesn't use the "forwarded for" information.

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
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.

Sponsored Links
Joined: Nov 2001
Posts: 126
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 126
This one doesnt seem to match 6.5 files.. will it be updated for that?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)