View Full Version : Administrative and Maintenance Tools - Proxy to Real IP Conversion
Paul M
07-01-2006, 10:00 PM
This modification is no longer available or supported.
This hack makes the forum always use the members real ip when a proxy is detected, meaning that all existing ip functions should continue to work, basically ignoring the proxy server (other than recording it's presence).
i.e.
* The real ip (or host) is displayed in the who's online page.
* The real and proxy server ip's are accesible for each post, the button is red for members using a proxy server.
* The real ip is searchable in the admin/mod cp (but not the proxy ip).
* The real ip can be banned by admins.
etc etc ......
Note: Obviously this hack relies on the proxy server passing the correct http variables to allow detection.
If a proxy is detected, then a red ip icon is displayed instead of the standard one. This mod will also detect if the ipinfo hack is installed and adjust itself to call the ipinfo code.
History:
v2.20 : Updated for vb 3.6. IP Info detection added.
v2.21 : Dependancies updated for 3.6.0 Gold.
v2.22 : Updated for Version Checking.
v2.23 : Fixed bug causing wrong ip in WOL display.
v2.24 : Rewritten slightly to fix a minor issue with spiders.
v2.25 : Updated for changes in vB 3.6.4.
Remember that this modification involves changes to the class_core.php file - if you upgrade your vbulletin, you must reapply those changes.
Please do not post asking why this does not work with some proxy servers, the answer is already in the notes above, and also in Post #160 (https://vborg.vbsupport.ru/showthread.php?p=1111071#post1111071).
Shazz
07-01-2006, 11:35 PM
Thanx!
Not installed anymore on vBCoderz (http://www.vbcoderz.com/)
________
clear trichomes (http://trichomes.org)
Paul M
07-01-2006, 11:38 PM
Only for the beta :(Not really sure what you mean by that - vb 3.6 only exists as a beta atm.
Michael_Tree
07-02-2006, 12:36 AM
3.5.4?
Shazz
07-02-2006, 12:38 AM
3.5.4?
Yea. thats what i ment sorta n stuff
or is 3.5.4 for Use real ip when proxy server is detected.
________
Edsel Pacer (http://www.ford-wiki.com/wiki/Edsel_Pacer)
Paul M
07-02-2006, 12:52 AM
The 3.5 version, and 3.0 version, are listed in the similar threads at the bottom of this page.
Michael_Tree
07-02-2006, 02:03 PM
thanks paul, i probably wouldn't trust this if i didn't see your name as the author. dunno tho
Tungsten
07-05-2006, 02:56 PM
Would this display the dynamic IP assigned to an AOL user and ignore the AOL proxy IP, for example?
Paul M
07-05-2006, 04:09 PM
No, AOL's stupid proxy servers don't pass on the correct variables.
ET240
07-21-2006, 03:34 AM
anyone tried on vb 3.6 RC2 ?
Paul M
07-21-2006, 04:17 AM
Yes.
ET240
07-21-2006, 09:26 AM
Yes.
so it's working perfectly in 3.6 rc2?
Paul M
07-21-2006, 04:06 PM
Yes.
TygerTyger
07-22-2006, 04:32 PM
The sections of code you're to find/replace don't match what's in class_core.php for RC2 though. It looks like the same instructions as from 3.5 in the zip. In fact, the appropriate code to replace (plus some extra elsewhere in the file) has some extra stuff about proxy detection which 3.5 didn't. How does this hack fit in with all that?
Paul M
07-22-2006, 05:08 PM
The sections of code you're to find/replace don't match what's in class_core.php for RC2 though.Yes they do.
It looks like the same instructions as from 3.5 in the zip. Maybe you downloaded the 3.5 instructions then, they are not the same.
In fact, the appropriate code to replace (plus some extra elsewhere in the file) has some extra stuff about proxy detection which 3.5 didn't. How does this hack fit in with all that?Not sure what you are referring to, but nothing has really changed from 3.5 (except possibly the comments).
TygerTyger
07-22-2006, 05:43 PM
I'm terribly sorry, not even I can find what on Earth Find/Replace was finding. Go figure.
I take it back, works immaculately in RC2. :D Thank you very much for your work.
Paul M
07-22-2006, 07:02 PM
Glad to hear. :)
mano1.com
07-31-2006, 03:37 AM
clicked INSTALL!
I hope this helps with all the trolls and clones... I wish the ip in the "whos online" list was BOLD AND RED when someone is using a proxy... to spot them fast and double check if they are doings omething wrong
thank you
Shazz
08-03-2006, 07:45 PM
*Installed thanx
________
Toyota Platz history (http://www.toyota-wiki.com/wiki/Toyota_Platz)
rasp187
08-03-2006, 07:47 PM
clicked INSTALL!
I hope this helps with all the trolls and clones... I wish the ip in the "whos online" list was BOLD AND RED when someone is using a proxy... to spot them fast and double check if they are doings omething wrong
thank you
Yeah, that'd be pretty convenient.
I install it and all went smoothly. Looking forward to seeing it work.
stinger2
08-06-2006, 01:05 PM
downloaded
Phaedrus
08-06-2006, 04:30 PM
Installed. I have no idea if it is working though...
Phaedrus
08-06-2006, 04:45 PM
Does anybody use a Proxy, any Brits online? I'm anxious to see if this is working. I have this one user... Keeps coming 'round uninvited.
Treasure Quest
08-06-2006, 07:46 PM
Hi,
I can't find this in class_core.php anywhere using the find feature:
// fetch client IP address
$registry->ipaddress = $this->fetch_ip();
define('IPADDRESS', $registry->ipaddress);
// attempt to fetch IP address from behind proxies - useful, but don't rely on it...
$registry->alt_ip = $this->fetch_alt_ip();
define('ALT_IP', $registry->alt_ip);
Paul M
08-06-2006, 08:01 PM
I guess your find isn't working too well, they are there (lines 1557 - 1563). :)
Treasure Quest
08-06-2006, 08:20 PM
I'll try again:)
Treasure Quest
08-06-2006, 09:00 PM
Used another editor other than note pad and found the code.
Greg clicks Install
fxs158
08-06-2006, 09:24 PM
Sorry if this has been asked before, will this work with anonymous proxies?
Paul M
08-06-2006, 09:31 PM
No.
Obviously this hack relies on the proxy server passing the correct http variables to allow detection.Obviously anonymous proxyies do not do this, that's the point of them.
Stokerockscene
08-06-2006, 09:36 PM
this is a huge help, espeically as my site has been hacked by folk on NTL proxys
fxs158
08-06-2006, 09:37 PM
No.
Obviously anonymous proxyies do not do this, that's the point of them.
Thanks for the reply, sorry for asking a question that had an obvious answer. I am still installing the hack to give it a whirl.
Cyruski
08-09-2006, 01:43 PM
So if a user using anonymous proxy and tries to log on board, he wont be able to, is that what this hack based on ?
rasp187
08-09-2006, 01:58 PM
I've noticed it displays the same IP twice for both fields. For example, when a proxy is detected is says:
The real IP is: "IP here"
"IP here again"
The proxy IP is: "IP here"
"IP here again"
Paul M
08-09-2006, 05:54 PM
It displays whatever information it is passed - I have seen proxy servers that do that for some bizarre reason.
Zelos
08-09-2006, 07:23 PM
I get this when I look at the who's online list: http://img477.imageshack.us/img477/8648/wtfav9.png
If I click one, it says "Unable to resolve IP address". The ips in the posts however are still showing.
Paul M
08-10-2006, 01:35 AM
I don't see how anything in this mod could cause that.
Phaedrus
08-10-2006, 02:40 AM
This one works perfectly for me. I have tested it and have actually used it banning a member who kept finding proxies... It definitely works. The "anon" proxies are unreliable and after a while they simply give up.
ssslippy
08-10-2006, 02:51 AM
I had to add another at the end of the first edit another } otherwise when I tried to upload another product I received errors. Is this a possible mistake on my part or an error in the plugin?
Paul M
08-10-2006, 04:23 AM
I think you need to edit your post as the first bit seems wrong.
There are no errors in the plugins, or the code, so I guess it must have been something else you did.
jw00dy
08-10-2006, 07:55 AM
Thanks Paul, I was hoping you had this for 3.6, and I'm glad to see you do!
*installed*
forzablues
08-15-2006, 09:08 AM
i get this
Fatal error: Call to undefined function: fetch_substr_ip() in /home/fhlinux185/s/street-stylers-southwest.co.uk/user/htdocs/forum/includes/class_core.php on line 1568
Got this when doing it now i cant access forum. Tried changing it back to the original code and i now get this any ideas?
Paul M
08-15-2006, 05:06 PM
That function is part of class_core.php so I would say you have made a mistake in editing it - re-upload the original and start again.
Total666
08-20-2006, 04:10 PM
Hello : I did all the changes , how can I see if it is working ?? Thanks
I||usi0nz
08-20-2006, 05:49 PM
I get this when I look at the who's online list: http://img477.imageshack.us/img477/8648/wtfav9.png
If I click one, it says "Unable to resolve IP address". The ips in the posts however are still showing. I think you might of deleted this line
define('SESSION_HOST', substr($registry->ipaddress, 0, 15));
under
In class_core.php ;
Find ;
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
Replace with ;
// Paul M - define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
iatbm
08-20-2006, 05:56 PM
Installed !
DaveAK
08-20-2006, 11:44 PM
This all seems a bit flaky on my board, not that I'm saying there's anything wrong with it, just that I don't understand what's happening.
Here's my problem :
Sometimes the icon appears red and when you click for info the proxy server IP address simply reads 'PROXYIP', sometimes the icon is the normal green. Either way the actual IP address is the same, and you never get a proxy server IP. This happens for most users, regardless of the service they use. Any idea as to where the problem lies?
Paul M
08-21-2006, 09:48 PM
Sounds to me like you haven't done the file edits to class_core.php
DaveAK
08-22-2006, 01:39 AM
Sounds to me like you haven't done the file edits to class_core.php
I followed your instructions to the letter and did the file edits. It's an intermittent problem, so I'm guessing it's not a problem with your code, or my installation of it. Something else is screwy and I was looking for ideas as to what it might be as I don't understand too much about proxy servers. Could it be something on my server set up?
As a very basic rule of thumb would it be fair to say that most home users won't be using a proxy, (excluding AOL users), where as members logging in from work might well be using a corporate proxy server? This might give me an idea as to which IP's are having a problem.
Paul M
08-22-2006, 02:09 AM
The only way it can say "PROXYIP" is if the code has not run.
BTW, as far as I know, this won't detect AOL proxies as they don't pass on the correct http variables.
DaveAK
08-22-2006, 02:29 AM
Thanks Paul. I've just been checking my board again and all seems normal. Why it happened first time around I guess we'll never know.
NeitherSparky
08-23-2006, 02:54 AM
I have a really terrible person who has been threatening me and plagiarising portions of my website to his for a long time. He's just seriously been a thorn in my side for quite a while, and he follows me everywhere. I banned his home IP from my website a while ago but then he started using proxies of some kind...the other day he signed up for an account on my new vBulletin mimicing my username there, obviously intending to try to fool people into thinking he was me. I've HAD it with him. I have installed this hack, and hopefully it will help! Thank you.
Zelos
08-23-2006, 05:58 AM
I think you might of deleted this line
define('SESSION_HOST', substr($registry->ipaddress, 0, 15));
under
In class_core.php ;
Find ;
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
Replace with ;
// Paul M - define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
That solved the problem! Thank you so much! :D
EDIT: Is it safe to install the "Extra user IP information" mod, having already installed this one?
Paul M
08-23-2006, 06:47 AM
EDIT: Is it safe to install the "Extra user IP information" mod, having already installed this one?Yes.
NeitherSparky
08-23-2006, 07:48 PM
This is unfortunately not working with my problem user - he's on right now. Poop. :(
Neal-UK
08-23-2006, 08:29 PM
He probably using a fake IP then. Just moderate new members. If their IP hostname comes back as nothing or something weird or that you have never heard of, delete them.
Zelos
08-23-2006, 08:35 PM
Yes.
I just installed the extra IP info mod, but now I'm not sure this mod is working correctly anymore.
This is what I get when I click the IP button of someone who has a proxy: http://img182.imageshack.us/img182/8080/ipproxyuf0.png
Not only does it not list the fake adress, but the "real" IP adress it lists has (according to the list) only been posted from twice. Should I just uninstall the extra info mod?
Shazz
08-23-2006, 08:38 PM
Updated yesterday? Anything major.
Paul M
08-23-2006, 09:57 PM
I just installed the extra IP info mod, but now I'm not sure this mod is working correctly anymore.
This is what I get when I click the IP button of someone who has a proxy: http://img182.imageshack.us/img182/8080/ipproxyuf0.pngYou cannot have both displays off one link, so you need to choose which you prefer.
Updated yesterday? Anything major.There is a version history in the first post.
slowhand.chen
08-24-2006, 01:48 AM
my vbb server is:172.24.32.108
proxy server is:172.24.32.187
if I use proxy ,user this Plugin don't record the proxy
I already note if (preg_match("#^(127|10|172\.(1[6-9]|2[0-9]|3[0-1])|192\.168|169\.254)\.#", $alt_ip)) $alt_ip = ''
Paul M
08-24-2006, 02:14 AM
Please put code inside php or code tags.
Also note ;
Obviously this hack relies on the proxy server passing the correct http variables to allow detection.
slowhand.chen
08-24-2006, 03:12 AM
Please put code inside php or code tags.
Also note ;
ok. but why I'm use this plug, in post table ,proxyip field is empty
Zelos
08-24-2006, 03:22 AM
You cannot have both displays off one link, so you need to choose which you prefer. But it is still working? If it is, then there's no problem, I guess I don't really need to see the fake IP. My concern is that the "real" IP adress it lists has (according to the list) only been posted from twice.
Paul M
08-24-2006, 03:36 AM
But it is still working? If it is, then there's no problem, I guess I don't really need to see the fake IP. Yes, it's still working in the background.
My concern is that the "real" IP adress it lists has (according to the list) only been posted from twice.The 'real' ip will only have been recorded while this hack is installed, it can't see back in time. :)
SCS_Rocket-Devi
08-25-2006, 11:53 AM
It doesn't show the real IP in the whos online part, it shows the real ip on posts but not there :confused:
Any suggestions??
Thanks SCS_R-D
Snake
08-25-2006, 12:46 PM
Thankies!
Paul M
08-29-2006, 04:18 AM
It doesn't show the real IP in the whos online part, it shows the real ip on posts but not there :confused:
Yes, thank you for mentioning that, it's been spotted on my own site as well - and yes, it's a bug (!) - I will hopefull have time to fix it later today. :cool:
NeitherSparky
08-29-2006, 05:32 AM
That would be nice to have! A lot of weirdos don't even post, after all. They just log in and sit there, lol.
Paul M
08-29-2006, 07:29 AM
The fixed version is uploaded.
The change is in step 3 of the file edits to class_core.php - to fix your copy you will need to find the "define session constants" comment and replace the two lines below it (that define SESSION_IDHASH & SESSION_HOST) with the new ones in the instructions (or re-edit a fresh, unaltered, class_core.php as per steps 1/2/3).
jw00dy
08-29-2006, 07:59 AM
Thanks changed mine and it's working as it's supposed to now
Your hard work is greatly appreciated.
thablewprnt
08-29-2006, 06:15 PM
I double checked the edits to class_core.php. Got a error the first time.
So i redid it again and got the same error
Parse error: syntax error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/xxxxx/public_html/forum/includes/class_core.php on line 2126
I really want to install this....Can I get some help please?
Shazz
08-29-2006, 08:26 PM
thanx for the email update!
NeitherSparky
08-29-2006, 09:20 PM
I installed the update; don't know if it's working just yet, but I'm sure it's fine. :) Thank you very much.
Paul M
08-29-2006, 10:20 PM
I double checked the edits to class_core.php. Got a error the first time.
So i redid it again and got the same error
Parse error: syntax error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/xxxxx/public_html/forum/includes/class_core.php on line 2126
I really want to install this....Can I get some help please?
I would say you are making an error in step 1 by removing an extra curly bracket at the bottom of the function.
SaN-DeeP
08-30-2006, 01:20 AM
does the hack runs a query to alter the post table ?
is it going to alter all the posts in database with a new field
please confirm, this is what I understood reading/checking the .xml file
Regards,
thablewprnt
08-30-2006, 03:42 AM
I would say you are making an error in step 1 by removing an extra curly bracket at the bottom of the function.
I baby stepped it, triple checked my edits.....And I can gladly say, all is well...thanks for the help. *finally clicks install* :cool:
Paul M
08-30-2006, 04:24 AM
does the hack runs a query to alter the post table ?
Yes.
eclectica
08-30-2006, 08:02 AM
It would be nice to get something that can read MAC addresses of the users.
Total666
08-30-2006, 01:12 PM
The fixed version is uploaded.
The change is in step 3 of the file edits to class_core.php - to fix your copy you will need to find the "define session constants" comment and replace the two lines below it (that define SESSION_IDHASH & SESSION_HOST) with the new ones in the instructions (or re-edit a fresh, unaltered, class_core.php as per steps 1/2/3).
doing the code changes to the class_core.php file .. ( step 3 )
MY existing code
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
The new code from the read me
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
these look unchanged ?? Wondering .. Total
ForumDog
08-30-2006, 03:00 PM
Try downloading the zip again? I just compared the new readme to the old readme, the code is different.
Total666
08-30-2006, 03:09 PM
Try downloading the zip again? I just compared the new readme to the old readme, the code is different.
Weird - is your step 3 different ??
Step 3.
In class_core.php ;
Find ;
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
Replace with ;
// Paul M - define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
fxs158
08-30-2006, 06:22 PM
Just installed the mod, things seem to work well with one exception. Under the ip on the whos online screen one of my users now says unknown. Is this because he is using anon proxy?
fxs158
08-30-2006, 06:25 PM
Weird - is your step 3 different ??
Step 3.
In class_core.php ;
Find ;
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
Replace with ;
// Paul M - define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
I put on bold the difference.
fxs158
08-30-2006, 08:36 PM
Member is using tmobile sidekick (cellphone), for some reason after the hack instead of an ip it shows a message that says unknown.
This is the only member that shows this anomalie.
Paul M
08-30-2006, 10:51 PM
doing the code changes to the class_core.php file .. ( step 3 )
MY existing code
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
The new code from the read me
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
these look unchanged ?? Wondering .. TotalThat's not what is in the current zip, that's the previous (old) version.
fxs158
08-30-2006, 11:13 PM
Is there a way to show the porxy ip, if the peerson is using anon rather than showing the unknown message? When the member posted I clicked on the red icon "that indicates a proxy present" and at least it showed me the proxy ip. But when I look on the who is online, I get the unkbown ip message.
Total666
08-31-2006, 12:19 AM
That's not what is in the current zip, that's the previous (old) version.
Thanks man , all good , weird I kept getting the wrong version ( I believe something to do with winzip ) I deleted the temp dir and NOW I have the correct new update , good work ...
Scorpior
09-02-2006, 06:57 AM
So the "The real ip can be banned by admins." Can you make it so that the proxy IP can also be banned by admins as well?
I have a situation that the proxy IP is detected properly, but the real IP is listed at 127.0.0.1. This is not the case for all of them, but I do see this happening in one particular proxy. So yea, making proxy IPs also bannable (so it checks the real IP and proxy IP to ban) would be helpful here.
Paul M
09-02-2006, 08:25 AM
That would (I think) be another file edit, and probably not used by most people - but I'll consider it when I next work on this.
BruceWest
09-03-2006, 03:00 AM
Love the product! Testing it out now!
I noticed that after installation, all original (registration) IPs were missing from the database... at least I no longer see them in the AdminCP.
Cheers!
Luke Brown256
09-08-2006, 03:34 PM
hi just a quick ntoe i followed instructions completely, but it always shows the person as having a proxy even when some users are not using a proxy and it then displays the same 2 IP addresses.
(Just to note it DOES correctly identify proxy users and report 2 different IP addresses aswell)
Robbed
09-09-2006, 12:47 AM
So when do we see that icon that's included in this zip.
NeitherSparky
09-09-2006, 03:11 AM
So when do we see that icon that's included in this zip.
If someone was using a proxy when they made a post, the included icon will replace the normal little computer-looking one you (or anyone else you have set up to see IPs on posts) see in the postbit.
Robbed
09-09-2006, 11:55 PM
Thanks
smoknz28
09-11-2006, 08:35 PM
You mentioned that this is packaged with vb v3.6. I just upgraded to vb v3.6.0....so does this mean that this hack is already included in my version of vb?
Thank you,
Gonzo
Paul M
09-11-2006, 10:46 PM
Who mentioned that :confused:
This is not part of standard vb, if it was then there would be no point in this release. :)
Scorpior
09-13-2006, 12:17 AM
That would (I think) be another file edit, and probably not used by most people - but I'll consider it when I next work on this.
Hmm, can I just ban the IP 127.0.0.1 then? Because again, proxy is detected properly, but real IP is detected at 127.0.0.1.
Paul M
09-13-2006, 12:55 AM
Yes you can.
You can also turn off detection of private range addresses if you want - but you have to edit one of the changes in class_core.php ( find $ignoreprivate = false and change it to true).
vchase
09-13-2006, 04:13 AM
Paul, please tell what i did wrong :surprised: i changed the code exactly as the instruction, upload the image to the directory, import the xml as product. So it was done. I know a guy with proxy ip, he is online ...but i see nothing from who's online or from his post :surprised: Why ?
Paul M
09-13-2006, 08:48 AM
Paul, please tell what i did wrong :surprised: i changed the code exactly as the instruction, upload the image to the director, import the xml as product. So it was done. I know a guy with proxy ip, he is online ...but i see nothing from who's online or from his post :surprised: Why ?As the notes say ;
This hack makes the forum always use the members real ip when a proxy is detected ....
etc etc ......
Obviously this hack relies on the proxy server passing the correct http variables to allow detection.
optrex
09-17-2006, 07:41 PM
I've started to get a red icon with all posts.
Details include
The Real IP Address is: 192.xxx.xxx.xxx
static-192-xxx-xxx-xxx.adsl.provider.net
The Proxy Server IP Address is: PROXYIP
The IP's are identical (just used x's for security in the post). I'm running 3.6.1
Paul M
09-17-2006, 11:56 PM
You didn't re-edit class_core.php when you upgraded.
teedizz
09-18-2006, 12:57 AM
hey, Paul..... will this work against sites like http://www.siteunlocker.com/ .... im noticing one previously banned user bragging about using that site to join back. thanks for any info bro.
optrex
09-18-2006, 08:17 AM
Thanks Paul. I've tried the edit twice now and get this error on both occasions
Parse error: parse error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /xxxx/xxxx/htdocs/xxxx/class_core.php on line 2130
Paul M
09-18-2006, 12:31 PM
Edit it a third time, and don't remove the extra closing } bracket you keep deleting (in step 1) this time :)
optrex
09-18-2006, 01:41 PM
:nervous: thanks Paul, the simple things in life can lead to a lot of frustration
teedizz
09-18-2006, 04:56 PM
paul, can you answer my question i listed above bro. thanks.
Paul M
09-18-2006, 05:03 PM
As it says in the main post ;
Obviously this hack relies on the proxy server passing the correct http variables to allow detection.I doubt siteunblocker are going to do that, it would be pretty stupid of them.
daylight
09-18-2006, 05:12 PM
i have got error while opening admincp
Parse error: parse error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/sites/*************/includes/class_core.php on line 2128
i have edited php file as instructed
and made a backup of the old file (which i am using now)
just wondering if you can help me out?
Paul M
09-18-2006, 10:30 PM
Go back about four posts (previous page, post #104).
daylight
09-19-2006, 12:03 AM
Go back about four posts (previous page, post #104).
thanks buddy....simple double mistake first ..haven't notice that } and second not read the post fully.
thanks again
btw...
i was looking for something to be safe from Ddos...will hack help me in this ? as the people who attack my site use proxies ..
any information or advice are highly admired.....:)
BruceWest
09-19-2006, 12:29 AM
Working great so far, Paul! Thanks again!
Quick question: I wasn't able to get the mod re-installed after our initial upgrade to 3.6.1, resulting in a fair number of posts incorrectly marked as proxied... (my fault, I know). Is there anything I can do to remove proxy status from posts less than 2 days old? Their unifying characteristic, of course, is The Proxy Server IP Address is: PROXYIP.
Bruce
EDIT: I should point out that I just recently re-modified the class_core.php.
Paul M
09-21-2006, 07:11 AM
Run this SQL ;
UPDATE post SET proxyip = ' ' WHERE proxyip = 'PROXYIP'
teedizz
09-22-2006, 11:07 PM
Nevermind, wasnt this hacks falut for my error. Sorry..haha
thetootall
09-24-2006, 02:50 AM
Great mod; works perfectly! :clicks install:
Total666
09-25-2006, 04:01 AM
Run this SQL ;
UPDATE post SET proxyip = ' ' WHERE proxyip = 'PROXYIP'
Thanks , you are a smart dude .. Thanks again .. Total
CORSO
09-28-2006, 11:06 AM
I have a problem
This addon is detected and blocking users who conect at home, with no proxyss
Help???
Sorry by my english...
Paul M
09-28-2006, 12:04 PM
This does not block anything, are you sure you are in the right thread ?
photongbic
10-02-2006, 10:50 AM
Installation went well but after installing your mod, the "Google Spider" entry in Who's Online doesn't show an IP address like all the other entries do.
Thoughts?
EDIT - Reworded to make the orginal question less confusing....sorry....
Paul M
10-02-2006, 01:14 PM
I have no idea what "Google Spider" is.
photongbic
10-02-2006, 01:42 PM
I have no idea what "Google Spider" is.
In Who's Online, Google Spider is the name given to the web spider (bot) that Google uses to probe web pages for content. Before adding your mod, there was always something in the IP address field for this entry but now it is blank. What would cause your mod to return a blank field?
Thanks!
Paul M
10-02-2006, 05:34 PM
Hmm, it looks like some spiders (Google and MSN) are putting text data in one of the http headers that should contain an ip address, and the current logic doesn't handle this well. I'll release an update later.
Paul M
10-05-2006, 08:50 AM
An updated version as been uploaded this morning (v2.24).
This should fix the problem caused by Google and MSN spiders putting non ip data in the http headers. It should also stop some of the file editing mistakes people make as the edits and instructions have changed.
To upgrade you need to upload the latest product and then take a default copy of class_core.php (3.6.x) and apply the new file edits to it.
:cool:
Neal-UK
10-05-2006, 10:25 AM
Great thankyou, was thinking i'd done something wrong when it showed noip@google or something in the information.
Medina
10-05-2006, 11:42 AM
Thanks for updating Paul ;)
Shazz
10-05-2006, 01:04 PM
Thanx paul
Zelos
10-05-2006, 03:08 PM
Is it still compatible with the IP info mod?
Also, it says the xml file has been updated as recently as october 2nd. Should we reupload it or something?
Zelos
10-05-2006, 04:10 PM
I'm getting this error: Fatal error: Call to undefined method vB_Input_Cleaner::fetch_ip() in /home/.taj/themys2/forums.themysticalforestzone.com/Forums/includes/class_core.php on line 1558
Paul M
10-05-2006, 04:18 PM
I'm getting this error: Fatal error: Call to undefined method vB_Input_Cleaner::fetch_ip() in /home/.taj/themys2/forums.themysticalforestzone.com/Forums/includes/class_core.php on line 1558
Then I would guess you have made a mistake in the file edits (probably Step 1).
Check what you have done, or start with a fresh class_core and do them again.
photongbic
10-05-2006, 07:12 PM
Works great for me...thanks!!
Zelos
10-05-2006, 07:33 PM
Then I would guess you have made a mistake in the file edits (probably Step 1).
Check what you have done, or start with a fresh class_core and do them again.
Yeah, I accidently replaced instead of inserting underneath :o
Still, is it still compatible with the IP info mod?
Also, it says the xml file has been updated as recently as october 2nd. Should we reupload it or something?
Total666
10-08-2006, 03:20 PM
It started working now :) all good .. Total
Ikoru
10-08-2006, 08:35 PM
Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in /home/ikorucom/public_html/forum/includes/class_core.php on line 262
I keep doing it exactly to the book, I've done it 5 times now.
Paul M
10-08-2006, 08:40 PM
I have no idea what you are doing, but line 262 is at least 1000 lines away from any of the edits this mod requires.
Ikoru
10-08-2006, 08:47 PM
On line 262 is function db_connect($servername, $port, $username, $password, $usepconnect).
I haven't touched that thought and this is the first time I'm editing the file.
Paul M
10-08-2006, 08:52 PM
Use a text editor with line numbers.
The edits for this hack are beyond line 1500. You may well be editing the correct place - since that error is so far away from any edits, it would suggest that the copy of class_core.php you are starting with is faulty. Get a fresh copy from the original zip file.
Ikoru
10-09-2006, 07:28 AM
Use a text editor with line numbers.
The edits for this hack are beyond line 1500. You may well be editing the correct place - since that error is so far away from any edits, it would suggest that the copy of class_core.php you are starting with is faulty. Get a fresh copy from the original zip file.
Yeah I used dreamweaver to edit it this time, and also used a new copy of class_core.php. There must have been something wrong with mine, thank you for your help.
jcodemasters
10-09-2006, 06:14 PM
if i am not wrong i can block ip address from this mod. right?
Paul M
10-09-2006, 07:22 PM
You cannot block ip addesses with this as such, ip bans are a standard part of vb.
chuBaRo
10-15-2006, 12:51 AM
Does this work with vb 3.6.1 ? Thank you.
Shazz
10-15-2006, 12:58 AM
Does this work with vb 3.6.1 ? Thank you.
Yes...
Q:
On a few of my members, I know they don't use proxy's and they say they don't, It shows that they do?
jw00dy
10-15-2006, 05:58 AM
Some of mine show that way too. Particularly AOL users. I doubt the users actually know they r using a proxy. I don't think it's anything you need to worry about.
Paul M
10-15-2006, 10:10 AM
What people say, and reality, are two different things. In the UK many ntl users do not realise they are routed via proxy servers.
Red Matrix
10-16-2006, 10:14 AM
This was very easy to install, instructions were easy to follow.
Thanks. +install
v2.20 : Updated for vb 3.6. IP Info detection added.
Paul, when IP Info is detected, it links to IP Info => No real IP displayed?
Seems like the two hacks should be merged somehow? :)
Alfa1
10-21-2006, 02:02 AM
Very neat hack Paul! Works like a charm.
Paul M
10-21-2006, 03:46 AM
Paul, when IP Info is detected, it links to IP Info => No real IP displayed? IP info will display any real ip info collected, obviously there isn't going to be much until this has been installed for a while.
Lucas
11-04-2006, 05:42 PM
How can I see if it is working or not?
apiasto
11-04-2006, 05:56 PM
Like it, but one problem instead of red picture i get a X mark when proxy is detected. What i am doing wrong. help
beishe8
11-04-2006, 06:13 PM
How can I see if it is working or not?
I second that... Can't see anything.
Regards,beishe8
Shazz
11-04-2006, 06:55 PM
Well they have to be using a PROXY
Paul M
11-04-2006, 07:37 PM
Like it, but one problem instead of red picture i get a X mark when proxy is detected. What i am doing wrong. helpYou haven't uploaded the image to the correct place for your style.
Wild-Wing
11-04-2006, 11:11 PM
oh im glad to see this ported over its been helpful for canning problem people
Wild-Wing
11-04-2006, 11:11 PM
your the best paul!
beishe8
11-05-2006, 12:56 AM
Well they have to be using a PROXY
I'm using a proxy to try it...
www.mywebsite/forum
Log in as "myname" .
New TAB.
www.mywebsite/forum
Currently Active Users
"myname"
Change TAB.
Who's Online?
"myname" XX.111.....
guest 85.195.123.22
http://Anonymouse.org/ (Unix)
Shouldn't it be twice XX.111.... ? Puzzles me...
Paul M
11-05-2006, 01:03 AM
Nope, only one ip is displayed in WOL.
beishe8
11-05-2006, 01:26 AM
Nope, only one ip is displayed in WOL.
"myname" XX.111.....
"guest" should be XX.111....
The two are the same! Me.
Paul M
11-05-2006, 01:37 AM
Sorry, I don't understand you.
beishe8
11-05-2006, 02:10 AM
Sorry, I don't understand you.
I normally log in once as "user1". I am the admin.
Then log in again as "user2" with the help of a proxy.
Currently active users:
As user2 I can see online: user1 and user2. No IP
As user1 I can see online:
user1 IP=XX.111...
user2 IP=YY.222... Why not XX.111... ?
user1 and user2 have the same IP because both of them are myself.
I should see twice XX.111.
I see YY.222 which is the proxy. This hack in my case does not show the real IP...
Paul M
11-05-2006, 09:33 AM
Please read the notes.
This hack makes the forum always use the members real ip when a proxy is detected
Obviously this hack relies on the proxy server passing the correct http variables to allow detection.
Obviously annonymouse is not going to pass on those variables (nor will any "annonymous" proxy) - they wouldn't be annonymous if they did. :)
apiasto
11-05-2006, 11:37 AM
You haven't uploaded the image to the correct place for your style.
I did uploaded px.gif to images>buttons folder, where the ip gif is. as it says in the instruction:confused:
Paul M
11-05-2006, 05:18 PM
The instructions cannot cover all possibilities - like I said, it needs to be the correct place for your style.
beishe8
11-06-2006, 02:50 AM
... - they wouldn't be annonymous if they did. :)
Grrr... Thanks Paul. :)
taydu
11-10-2006, 09:05 AM
please help, do i need to enable this hack after install ?? Mind the doesn't seem to be working
influence
11-13-2006, 01:15 AM
what is the CVS folder for? do i need to upload it to my server? to where?
Shazz
11-13-2006, 02:03 AM
Where do you see a CVS folder?
Paul M
11-13-2006, 02:13 AM
I was wondering that as well. There shouldn't be one in the zip, and as far as I can see there isn't.
If you do have one for some bizarre reason then just ignore/delete it.
influence
11-13-2006, 02:53 AM
please download your hack again. yes there is a cvs folder because I just re-open the zip file that i downloaded again and that folder still shows up.
oh well. *deleted*
Paul M
11-13-2006, 03:20 AM
Winzip is not showing it, but does create the empty folder when I unzip it ... weird ....
Shazz
11-13-2006, 03:22 AM
please download your hack again. yes there is a cvs folder because I just re-open the zip file that i downloaded again and that folder still shows up.
oh well. *deleted*
I still don't see anything?? =??
I tried unzipping it, Winrar it
NeitherSparky
11-13-2006, 04:15 AM
Winzip is not showing it, but does create the empty folder when I unzip it ... weird ....
That happened to me too and it actually scared me, I thought it was some kind of virus-related issue because I didn't know where it had come from. Lol hopefully it is perfectly safe. ;)
Paul M
11-13-2006, 02:16 PM
That happened to me too and it actually scared me, I thought it was some kind of virus-related issue because I didn't know where it had come from. Lol hopefully it is perfectly safe. ;)It's fine, all my mods are stored in cvs locally, that's where the folder comes from. It's just weird how it's not listed.
Mecho
11-13-2006, 03:48 PM
Thanks Paul M ,
Installed . but i could find Install Button in this topic !! i think its gone after upgrade version of VB !
Paul M
11-13-2006, 05:35 PM
Installed . but i could find Install Button in this topic !! i think its gone after upgrade version of VB !It's in the links, above the file you downloaded.
taydu
11-13-2006, 08:59 PM
does anyone know a proxy that will trigger this mod so I can use to test it??? I have test dozen proxy and it doesn't seem to work\.
influence
11-13-2006, 09:40 PM
does anyone know a proxy that will trigger this mod so I can use to test it??? I have test dozen proxy and it doesn't seem to work\.
same here. my members laughed hard at me after I posted a annoucement saying that I just installed something that will put an end to track down people who are using proxy and they all decided to use proxy to make fun of me. aha . I love them though. smart ass kids
beishe8
11-16-2006, 01:18 AM
Hmmm...
It's gone silly ATM... It is reporting all the posts to come from proxies.(red button )
Including my posts...
My own post reported to come from a proxy:
The Real IP Address is: 00.111.222.333
Replacement of real details
The Proxy Server IP Address is: PROXYIP
This post is from a real proxy:
The Real IP Address is: 85.195.123.22
85.195.123.22
The Proxy Server IP Address is: PROXYIP
Paul M
11-16-2006, 02:54 AM
You have probably upgraded and not re-done the file edits.
The Finman
11-22-2006, 05:38 AM
Hi Paul,
I had an idea from something a ran across a long time ago. I'm not sure if I should post this idea in this thread or PM you. I figured since you got promoted that you probably get tons of PMs already from people asking you about this that and the other...that a post might work better. :nervous:
I'm posting this here (you may delete it if you want) as I think this idea could possibly be merged with this hack, and also because you are one of the few people I think could pull it off.
A long time ago, I ran across a UBB hack that checked what port a post or thread was posted from. The hack denied all posts the were not from port 80 (http), and it was effective in blocking any post that was made from proxies that were using non-standard ports (those other than http port 80, with the exception of any "whitelisted" the admin wished to designate), which are quite a fairly large number of proxies.
Since your hack works on all but anonymous proxies, this would also eliminate even anonymous proxies if they weren't using port 80 to connect, thereby giving this an even stronger "bite".
It's been a number of years ago since I ran across this "hack" that my friend was using on his UBB board. I have looked for it over at UBB Developers (http://www.ubbdev.com/forums/ubbthreads.php/ubb/postlist/Board/19) for it, and I've tried to get in touch with my friend that used it, but he has since moved back to Hungary. I suspect given the time frame that it was done either in PERL (he was using UBB classic at the time) and/or it he may have used something like an .htaccess file. I do know that it existed, but I don't know any more of the details than that. :ermm:
Anyway, if the idea is silly or shouldn't even be posted in this thread, I apologize and please go ahead and delete it, as I don't have the level of PHP skills necessary to try recreate it on my own, and I thought if it was entwined with your original hack that it could be used to help make it even a little stronger. :nervous:
sound likes a great idea to me
Paul M
11-22-2006, 07:31 AM
I don't quite follow how this would work, as all requests to the final server (i.e. your server) will be on port 80, regardless of what ports were used before that.
if you backtrace the connection, you will be able to see if it was connected through port 80 or an alternative just view your own log file
Paul M
11-22-2006, 07:56 AM
Nope, 99% of the worlds webservers only listen on port 80 (for http) so your logs will only show port 80.
The Finman
11-22-2006, 08:41 AM
I don't quite follow how this would work, as all requests to the final server (i.e. your server) will be on port 80, regardless of what ports were used before that.
You know...I may be remembering this incorrectly and I may also be explaining it incorrectly as well.
This is what I remember that it did.
Let's grab a "fresh" proxy list
Anonymous List:
89.34.43.181:6588
89.34.32.224:6588
202.68.151.108:6588
220.226.63.254:8008
58.143.98.224:8080
222.235.104.129:8080
http://www.proxy-list.net/show-proxy-lists.shtml?b2e870eb7fa884d1b19
The first proxies on that list are connected at port: 6588 and the remaining three are connected via port: 8080
This is where I am having trouble explaining this, as I know what it did...I'm just not sure how it was done.
He used UBB Classic (which was completely written in PERL until the later versions that used PHP as an accelerant), the server was Linux and I do know that he often relied on .htaccess files to handle problem boards linking to him, the "hot" linking of images on his server, Etc.
He had a script that somehow was able to detect proxies that were connected at other ports besides port 80.
How he was able to do this exactly is what I am not sure of and was why I was over at UBB Developers seeing if I could find it.
I was a Moderator on his UBB board and one day I was unable to connect to the board because I had left my connection to a proxy server on. I asked him and he said it was a "script" that was able to block most proxies. A few weeks later I noticed that I was able to connect and post using a proxy server, and I asked him if he had disabled the proxy script, he said that he hadn't...I asked him why I was able to connect presently as I was posting to him behind a proxy. He asked me what port I was connected on and I told him port 80, he confided in me that the port 80 was the only proxy connection that the script failed to block, and he asked me not to mention it as it had seriously cut down on the number of problem posters/troll that were posting using a proxy that used a port connection of 80.
I really wish I could find him, as I am not sure if my memory regarding the event is faulty or that I was just too "green" at the time to understand it.
He was a very quiet person and was not prone to bragging or lying which is why I am treading very gingerly in describing that event. He was very good at writing his own scripts in PERL (and I know he used to contribute to UBB Developers which is why I went there looking first).
I remember also, because I asked him about learning PERL (remember this was about 4 years ago) and he told me at the time to concentrate on PHP instead.
So, what I am carefully trying to say without looking silly...is that he was able to detect and block proxy servers that the user had connected to using a port other than 80. He was able to block those proxy connections, but the "Achilles heel" (so to speak) was proxy connections that used standard (http - port 80) connections. I don't know know if it was a script he wrote in PERL (I don't think UBB was using PHP yet at that time), or if had configured something on their server to detect and block it directly.
I do know that like so many proxy fixes that people have developed to try and fix/stop the problem that his also didn't work 100% either.
I have recently been looking at various ways other people (such as yourself) have approached the problem, and I remembered the way he approached it and I was thinking if his way (again, I remember pretty clearly the details of what it did...I'm just not sure of the details of how he did it https://vborg.vbsupport.ru/external/2010/01/19.gif) could be combined with your method, that even though it still would be 100%, if it was possible...it would still be pretty damn powerful.
Like I said, I do remember that he asked me not to say or mention the flaw, or post about it on the board which I helped moderate and that he owned/ran, as he said that the majority of proxies that the users connect too, don't use port 80 and that the "script" (I am almost positive that he called it a script) was able to stop all those with that one exception being those that connected to the proxy they were using via port 80.
But maybe it wasn't a script...maybe have been something he did at the server itself (similar to the way that .htaccess works).
Or, maybe my memory really is that faulty. https://vborg.vbsupport.ru/external/2010/01/19.gif
Paul M
11-24-2006, 11:22 PM
<u>vBulletin 3.6.4</u>
Version 2.25 Uploaded.
An extra step has been added to the class_core.php edits to take account of new code added to this file in vB version 3.6.4. When upgrading to 3.6.4 you should start with a fresh copy of class_core and apply all the edits.
Shazz
11-24-2006, 11:31 PM
SO if where still back on 3.6.2 we should just stay with what we got? :)
Total666
11-25-2006, 12:41 AM
Step 3.
In class_core.php ;
Find ;
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
define('SESSION_HOST', substr($registry->ipaddress, 0, 15));
Replace with ;
// Paul M - Define session constants
define('SESSION_HOST', substr(IPADDRESS, 0, 15));
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip(IPADDRESS)));
Mine with 3.64 is differnet ..
// define session constants
define('SESSION_HOST', substr($registry->ipaddress, 0, 15));
if (!defined('SESSION_IDHASH'))
{
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . $this->fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
}
What I'm trying to say is that my code is not the same , the last two are not in the same location .. Total
Paul M
11-25-2006, 02:06 AM
You're right, I hadn't noticed that had changed as well.
I've uploaded a new set of instructions for both changes.
Total666
11-25-2006, 02:11 AM
Thanks man , I thought that either I went insane or my carbon monxide detector was faulty ( or both ) .. Total
Shazz
11-25-2006, 03:33 AM
If where using 3.6.2
Should we just stay put on the release before this new one ? :confused:
firstrebel
11-25-2006, 07:12 AM
if (!defined('SESSION_IDHASH'))
{
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . $this->fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
}
Not found in my 3.6.4 copy of class_core.php
Bob
jw00dy
11-25-2006, 07:46 AM
I JUST edited my 3.6.4 version and it is there.
If you are doing a search with vi, it won't find anything with a ' or " in it.
So do a search for $this->fetch_substr_ip($registry->alt_ip))) and you'll find it.
Paul M
11-25-2006, 09:30 AM
Not found in my 3.6.4 copy of class_core.php
BobLook again, it's somewhere around line 2500.
firstrebel
11-25-2006, 09:54 AM
For some reason Dreamweaver 8 could not find it, but Programmers Notepad did. All done now.
Bob
you should use UltraEdit32 for programming when you use windows
firstrebel
11-25-2006, 01:54 PM
you should use UltraEdit32 for programming when you use windows
Programmers Notepad (http://www.pnotepad.org/) is free.
Bob
Shazz
11-25-2006, 03:38 PM
Question:If where using 3.6.2
Should we just stay put on the release before this new one ? :confused:
Paul M
11-25-2006, 03:58 PM
Guess .......
v2.25 : Updated for changes in vB 3.6.4
Shazz
11-25-2006, 04:03 PM
Guess .......
Means probablly just stay with the old one :D
just wanted to clarify :glasses:
Zelos
11-26-2006, 05:02 AM
I just noticed that the version of the current XML file (v2.25) outdates the one I have installed on my site (from when I first installed the mod (v2.21)). Should I replace the old one with the new one? If so, how would I go about doing that? Should I uninstall the old one first, or just upload and overwrite?
I'm running 3.6.4 if that matters, and yes, I have already upgraded my class_core.php
Aclikyano
11-26-2006, 05:37 AM
Ugh.... vB 3.6.4 already comes with this built in.
So am I overwriting whats in 3.6.4?
I see a similar code EX BELOW:
ONE THAT COMES WITH VB 3.6.4
/**
* Fetches an alternate IP address of the current visitor, attempting to detect proxies etc.
*
* @return string
*/
function fetch_alt_ip()
{
$alt_ip = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_CLIENT_IP']))
{
$alt_ip = $_SERVER['HTTP_CLIENT_IP'];
}
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3 }#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches))
{
// make sure we dont pick up an internal IP defined by RFC1918
foreach ($matches[0] AS $ip)
{
if (!preg_match("#^(10|172\.16|192\.168)\.#", $ip))
{
$alt_ip = $ip;
break;
}
}
}
else if (isset($_SERVER['HTTP_FROM']))
{
$alt_ip = $_SERVER['HTTP_FROM'];
}
return $alt_ip;
}
THE ONE YOU INCLUDED IN ZIP FILE
/*
Paul M - Try to detect real ip when proxy is in use.
*/
function fetch_real_ip()
{
$real_ip = '';
$ignoreprivate = false;
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$real_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else if (isset($_SERVER['HTTP_CLIENT_IP']))
{
$real_ip = $_SERVER['HTTP_CLIENT_IP'];
}
else if (isset($_SERVER['HTTP_FROM']))
{
$real_ip = $_SERVER['HTTP_FROM'];
}
if (preg_match("#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#", $real_ip, $iplist))
{
$real_ip = $iplist[0];
if ($ignoreprivate AND preg_match("#^(127|10|172\.(1[6-9]|2[0-9]|3[0-1])|192\.168|169\.254)\.#", $real_ip))
{
$real_ip = '';
}
}
else
{
$real_ip = '';
}
return $real_ip;
}
Paul M
11-26-2006, 10:16 AM
I know what's built in :) If you want to use this then follow the instructions.
Aclikyano
11-28-2006, 05:55 AM
<a href="http://www.vbulletin.com/forum/showthread.php?p=1260425#post1260425" target="_blank">http://www.vbulletin.com/forum/showt...25#post1260425</a>
Whole site crashed... after doing those specific edits to class_core.php
Paul M
11-28-2006, 07:48 AM
That error has nothing to do with this mod, or any edits to class_core.php (as you proved yourself by uploading the original). That is a basic mysql connection error meaning the database/user/password in your config.php is being rejected by the server.
Mecho
11-28-2006, 09:58 AM
How can i make it hide for Moderators ??
Thanks
Aclikyano
11-28-2006, 07:42 PM
That error has nothing to do with this mod, or any edits to class_core.php (as you proved yourself by uploading the original). That is a basic mysql connection error meaning the database/user/password in your config.php is being rejected by the server.
ah.. before I edited the class_core.php the site was up.
As soon after.. i edited the class_core.php with the hack the site had a DB error. I checked the sites email and it said it was from class_core.php Line 237 (i think thats the number..)
IM NOT KNOCKING YOUR HACKS.. I just found it...rather..funny..thats all..
This is a great hack and you make good hacks that ive seen.. but hopefully you understood to a point were I came from seeing I didnt understand why that specific file I edited with the hack happened to be the same one throwing the site of or whatever.
Thanks Paul :)
NeitherSparky
11-29-2006, 04:20 AM
I don't remember which mod it was, but after installing one and editing some file or another my site went down (I just got a white page). Turned out I had left a single bracket out when making the edits. Are you positive you made all your edits 100% correctly? Those darn php files are so picky. ;)
kellogs
11-29-2006, 11:17 AM
Hi Paul,
Thank you for this addon.
The proxy is using the following HTTP HEADER
X-Remote-Addr
May i know how do i edit your script?
Thank you
Edy
Paul M
11-29-2006, 05:19 PM
As far as I can tell, X-Remote-Addr is not the ip address of the client, but the ip address of the proxy server, therefore it is not much use in this code as you already know the proxy server ip. This is designed to pick out the headers giving the client ip.
Aclikyano
12-02-2006, 04:47 PM
Paul... youll be happier to know that this hack did indeed install properly this time.. we did alot of troubleshooting and it was infact our password being the same as our WHM's which infact was the server host's fault as we were misinformed.
So... needless to say.. great hack as you know..! :)
I assumed wrong at the time of the install (long story).. just keep making good hacks!.
peace.
Paul M
12-02-2006, 07:16 PM
Glad you sorted it. :)
Calibre_k
12-03-2006, 08:33 PM
Where do i find class_core.php?
Shazz
12-03-2006, 08:36 PM
Where do i find class_core.php?
Did you extract the zip? It should say
forum root/includes/class_core.php
Calibre_k
12-03-2006, 08:56 PM
Shaz found it on the server Thanks
I did all edits got this error
Fatal error: Call to undefined function: fetch_real_ip() in /home/forum/includes/class_core.php on line 1569
vBulletin version 3.6.4
I did step 1, 2, 4, 5
Paul M
12-03-2006, 09:14 PM
Then you need to check what you did wrong, step 1 adds the function code.
Calibre_k
12-03-2006, 09:26 PM
tried from start again this time
Parse error: syntax error, unexpected $end in /home/forum/includes/class_core.php on line 1515
geppeto
12-04-2006, 12:59 PM
In vB 3.6.4 edited new class_core.php 1,2,4 & 5 steps. No errors but don't work, don't detect proxys IP.
Best regards
HeLLCiTo
12-05-2006, 01:19 PM
to make an update from 2.23 what a i need?
Paul M
12-05-2006, 06:14 PM
tried from start again this time
Parse error: syntax error, unexpected $end in /home/forum/includes/class_core.php on line 1515Then redo the edits - there are no errors if you do them correctly.
In vB 3.6.4 edited new class_core.php 1,2,4 & 5 steps. No errors but don't work, don't detect proxys IP.
Read the notes.
to make an update from 2.23 what a i need?Re-install it.
None of you have marked this as installed, please do this if you have further questions.
McMendo
12-05-2006, 07:11 PM
Using vb 3.6.4 here and trying to install this.
Step 3 tells to find in class_core.php:
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
define('SESSION_HOST', substr($registry->ipaddress, 0, 15));Instead there is:
// define session constants
define('SESSION_HOST', substr($registry->ipaddress, 0, 15));and on another part of the code:
if (!defined('SESSION_IDHASH'))
{
define('SESSION_IDHASH', md5($_SERVER ['HTTP_USER_AGENT'] . $this->fetch_substr_ip($registry->alt_ip)));//this should *never* change during a session
}
It's confusing.
Paul M
12-05-2006, 07:16 PM
Using vb 3.6.4 here and trying to install this.
Step 3 tells to find in class_core.php:
Please read the instructions carefully ;
Step 3 (vB Versions 3.6.0 to 3.6.3 only).
:)
McMendo
12-05-2006, 09:14 PM
Sorry, my fault. Got to have some sleep one of these days.
Thank you ;)
Paul M
12-05-2006, 09:19 PM
Sorry, my fault. Got to have some sleep one of these days.
Thank you ;)When you have got your sleep, please feel free to click on the "Mark as Installed" link. :)
McMendo
12-05-2006, 09:45 PM
*click* (installed)
Tells you loads about the anonymity of most proxies. I suppose that there will be proxies for which it doesn't work?
Great hack, thank you.
andrew67
12-06-2006, 11:27 PM
Installed , thanks Paul :)
Paul M
12-07-2006, 12:21 AM
Tells you loads about the anonymity of most proxies. I suppose that there will be proxies for which it doesn't work?There will be plenty it will not work for, it can only function if the proxy passes on the details, many (quite deliberately) do not.
Zelos
12-07-2006, 02:03 AM
I just noticed that the version of the current XML file (v2.25) outdates the one I have installed on my site (from when I first installed the mod (v2.21)). Should I replace the old one with the new one? If so, how would I go about doing that? Should I uninstall the old one first, or just upload and overwrite?
I'm running 3.6.4 if that matters, and yes, I have already upgraded my class_core.php
Paul M
12-07-2006, 04:01 AM
Just import the new xml via the product manager.
There are a couple of minor bug fixes between 2.21 and 2.25 so it's worth updating it.
brhoom
12-07-2006, 09:38 AM
Thanks.
Zidane007nl
01-12-2007, 10:48 AM
Thanks for this hack!
I'm having trouble lately with some idiot who keeps making accounts since he has been banned. >.<
nocte
01-15-2007, 06:36 PM
I asked on vbulletin-germany.com (http://www.vbulletin-germany.com/forum/showthread.php?p=171779#post171779) about the reason why my database error emails don't contain the Referrer but instead the string "REFERRER".
example:
Datenbankfehler in vBulletin :
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections
/var/www/web1/html/forum.tld/forum/includes/class_core.php on line 273
MySQL-Fehler :
Fehler-Nr. :
Datum : Wednesday, January 10th 2007 @ 11:49:00 PM
Skript : http://www.forum.tld/forum/attachment.php?attachmentid=21039&stc=1&thumb=1&d=1164658385
Referrer : REFERRER
IP-Adresse : 62.47.21.XX
Benutzername :
Klassenname : vB_Database
StGaensler said that maybe this hack is the reason for this..
hmusic
01-18-2007, 09:09 AM
excellent hack.
installed with ease
MR. Paul M the Greatest admin, The gr8test vb.Hacker & the best Supporter
Your Hacks .. are always great ones :cool: please accept our Deep Thanks Mr. Admin
Q: The Real IP Address .. will it be stored in DB for any future use?
.
.
.
.
Thank you Paul.
Paul M
01-18-2007, 07:30 PM
The Real IP Address .. will it be stored in DB for any future use?
Thank you Paul.Both real and proxy ip are stored.
nocte
01-18-2007, 07:49 PM
Both real and proxy ip are stored.
please take a look at my posting: https://vborg.vbsupport.ru/showpost.php?p=1160064&postcount=231 - may this hack cause the Problem with the 'REFERRER' ?
Paul M
01-18-2007, 10:17 PM
Nope, this does not touch the referrer variable.
Salvar
01-19-2007, 12:09 AM
I get:
XML Error: not well-formed (invalid token) at Line 1
Whats the problem
Paul M
01-19-2007, 01:35 AM
It would help if you actually said what what you are doing to get that error.
If you are importing the product, then the xml file you have is corrupt, redownload and unzip it.
WAHMama
01-19-2007, 10:59 AM
OK I feel like a total idiot, and I appologize if this has been asked before or if the answer is so simple my 6 year old could do it, but I need help here. I downloaded the zip file, I looked at the instructions, I tried to find the class_core.php but I don't know where or how to find this. I used the ctrl + F feature to find the text but it can't find it, I saw on here that it was in lines 1550 or something but when I opened the xml document in my html-kit there were only 150 lines so now I am so confused it's pathetic....can anyone help an idiot out and explain this all to me? I would really appreciate it!
Paul M
01-19-2007, 05:00 PM
class_core.php is a default vbulletin file, in the includes folder.
SHOBizzy
01-19-2007, 07:55 PM
Paul,
Forgive me if this has already been covered, but 16 pages of info and I may have missed it.
Yesterday I had a known problem user sign on with another user name so I banned his IP address in the admincp. I was also viewing who was online page to watch and see what he did next. The next thing I know I see his user name still browsing the forum with no error or stop message. Over where it listed the IP addresses it showed a different IP address.....along with the text below.
"Hide My IP Trial (Purchase At WWW.HIDE-MY-IP.COM To Remove This Message)"
My question for you is, do you think that this mod will bypass or "beat" that type of program?
TIA!
nocte
01-19-2007, 09:57 PM
Paul,
Forgive me if this has already been covered, but 16 pages of info and I may have missed it.
Yesterday I had a known problem user sign on with another user name so I banned his IP address in the admincp. I was also viewing who was online page to watch and see what he did next. The next thing I know I see his user name still browsing the forum with no error or stop message. Over where it listed the IP addresses it showed a different IP address.....along with the text below.
"Hide My IP Trial (Purchase At WWW.HIDE-MY-IP.COM To Remove This Message)"
My question for you is, do you think that this mod will bypass or "beat" that type of program?
TIA!
see hack description:
Note: Obviously this hack relies on the proxy server passing the correct http variables to allow detection.
SHOBizzy
01-20-2007, 01:32 AM
D'oh! I didn't see that, I think I must need new eyes. :o Thanks for pointing it out.
WAHMama
01-20-2007, 11:41 AM
Thank you for answering that question, I found the class_core.php file and made the template changes, however now when I click on the person who shows up with the red proxy ip icon, this is the message I receive. The Real IP Address is: 62.252.128.16
renf-cache-2.server.ntli.net
The Proxy Server IP Address is: PROXYIP
Now I have tried uninstalling and reinstalling the product, replacing the class_core.php file with the original and starting over with the template edits...did that 4 times, however that is still the message I receive. Can you explain what I might be doing wrong?
Paul M
01-20-2007, 05:36 PM
There are no template changes to this so I don't know what you are referring to there.
The problem displayed can only occur if you have not correctly edited (and reuploaded) class_core.php
You can add these addresses to you .htaccess file to stop them. The zip also have ip addresses on other well know proxy servers
Hello i install it and i try to post one message via anonymouse.org!
byt the ip its still from anonymouse and no red icon apeard!
Maybe its the way that anonymouse work?
Paul M
01-21-2007, 10:13 PM
Please see post #160.
blind-eddie
02-10-2007, 11:39 PM
This is the best!!!!!! Thanks Paul
PinkDaisy
02-14-2007, 02:46 PM
I just tried to install did, did all the changes in the class_core for 3.6.4 and I get this:
http://www.belliesbabiesnbeyond.com/boards/imagehosting/145d33bc758185.jpg
So it doesn't even let me get to the final stage of importing the produce. :( HELP!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.