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)
-   -   Proxy Detector v3.1 - for Posts and WOL (https://vborg.vbsupport.ru/showthread.php?t=61331)

mtha 02-07-2004 10:00 PM

Proxy Detector v3.1 - for Posts and WOL
 
############################################
# Hack Name: Proxy Detector v3.1
# Orgiginal hack by Takara and Stadler (for vB 2.0)
# Modified for vB 3.0.1 and Addon by HacNho
# Compatibility to vB 3.0.x
# Date: 06.20.04
############################################
# History:
# Version 3.1: (update 06.20.04)
# 1. Display ProxyIP in WhoIsOnline list (in UserAgent section)
#
# Version 3.0:
# 1. Compatibility to vB 3.0 RC4
# 2. Admin with "adminpermission" will see the "ProxyIP when overmouse if the IP is not shown
# 3. Proxy IP will be displayed with IP address in show IP page
#
# # Version 2.0 ...
# # Version 1.0 by Takara and Stadler (for vB 2.x)

###########################################
# Description: This is little hack detects via the Environmental Variable
# HTTP_X_FORWARDED_FOR if the user is using a proxy. Most proxys give out this
# variable. If it is it will display it out for you, and allow you to view the
# real IP of the person, and proxy IP when you click the link (in Post or Who'sOnline).
#
# Files Edited: 5 - includes/init.php
# - Files edited for proxyIP in posts: 2- includes/functions_newpost.php, postings.php
# - Files edited for proxyIP in WOL: 2- includes/sessions.php, online.php
# Templates Modified for proxyIP in posts: 2 - postbit_ip_show, postbit_ip_hidden
# Templates Modified for ProxyIP in WOL: 1 - whosonlinebit
# SQL Query to run: 2 (add proxyip in post and session table)
# Phrase to add: thread_displayproxyip

#
# Remember to backup your files and DB before making any changes!
############################################

INSTALL: HN-ProxyDetextor-301.txt (8.9 KB)

Upgrade from version 3.0 or only install ProxyDetector for WOL:
HN-ProxyDetextor-WOL.txt (11.5 KB) - Update 06.20.04

Upgrade from version for vB beta7 to version 3.0HN-ProxyDetextor-upgrade-b7-RC4.txt (3.5 KB)

SCREENSHOTS:
proxydetected.jpg (7.8 KB)
proxyip-WOL.gif (10.1 KB)



*NEW: version 3.1 will save and show proxyIP in Who is Online page.
In order to see proxy, you need to turn "UserAgent" on:
http://YourDomain/Yourforum/online.php?ua=1


Remember to click https://vborg.vbsupport.ru/

version2 02-08-2004 08:12 PM

Rock on.

msimplay 02-08-2004 10:24 PM

please make it work for rc2

mtha 02-08-2004 10:44 PM

Quote:

Originally Posted by msimplay
please make it work for rc2

You can try installing on RC2 (or RC4 is the most current one). it should work fine. (version2, do you need to do anything else for your RC2 to work with this hack?)

I dont have any RC in use yet,

msimplay 02-08-2004 11:58 PM

i did try and i failed :) thats why i posed please make it work for rc2

mtha 02-09-2004 01:48 AM

Quote:

Originally Posted by msimplay
i did try and i failed :) thats why i posed please make it work for rc2

I have looked over the code for RC4, and there's nothing different, except for the search in functions.php, you look for

/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 22:43, Fri Feb 6th 2004
|| # CVS: $RCSfile: functions.php,v $ - $Revision: 1.944 $
|| ################################################## ##################
\*================================================ ======================*/

at the end of that file, and add the getproxyip() function above it. everything else should be the same.

(If codes RC4 and beta7 are the same (at the searching locations), I would assume that the code in RC 2 be the same)

If you tell me the error, or where you get stuck, I may be able to help you, without rewriting the mod, which I dont think I will, until Gold. :)

Frank 02-09-2004 08:21 AM

Nice thanks.

VampireMan 02-09-2004 10:23 AM

could this be altered for the who's online page ?

msimplay 02-09-2004 01:18 PM

omg i ran the querie now nomatter who i click on the profile always goes to my profile how do i reverse this querie please :(

mtha 02-09-2004 02:39 PM

Quote:

Originally Posted by VampireMan
could this be altered for the who's online page ?

This hack is for per post IP detection, and who's online page is for per login IP, so, this would not work in who's online page

However, you can use the same method, to read IP in who's online page. it'd be great too.

Quote:

Originally Posted by msimplay
omg i ran the querie now nomatter who i click on the profile always goes to my profile how do i reverse this querie please

I dont really understand what you mean. This hack should not effect profile.

the only SQL query is to add a column to your post table:
ALTER TABLE post ADD proxyip VARCHAR(50) not null AFTER ipaddress;

msimplay 02-09-2004 02:42 PM

Quote:

Originally Posted by mtha
This hack is for per post IP detection, and who's online page is for per login IP, so, this would not work in who's online page

However, you can use the same method, to read IP in who's online page. it'd be great too.


I dont really understand what you mean. This hack should not effect profile.

the only SQL query is to add a column to your post table:
ALTER TABLE post ADD proxyip VARCHAR(50) not null AFTER ipaddress;

sorry your right :o i needed to restart coz i just installed mozilla 1.6 sorry
very sorry

Metro Man 02-09-2004 05:35 PM

nice nice

gmarik 02-09-2004 06:48 PM

Why should I need one? :rolleyes:

Stadler 02-09-2004 06:54 PM

Thanks for the time I couldn't find to update the hack :)

btw: instead of using a function to detect the Proxy-Address, you could modify /includes/init.php by adding
PHP Code:

// #######################################################################
// establish client Proxy address (if it exists)
if ($_SERVER['HTTP_FORWARDED'] != '')
{
    
$proxyip $_SERVER['HTTP_FORWARDED'];
}
else if (
$_SERVER['HTTP_X_FORWARDED_FOR'] != '')
{
    
$proxyip $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else if (
$_SERVER['HTTP_CLIENT_IP'] != '')
{
    
$proxyip $_SERVER['HTTP_CLIENT_IP'];
}
else
{
    
$proxyip '';
}

$proxyip preg_replace('/javascript/i''java script'$proxyip);
$proxyip str_replace('"''"'$proxyip);
$proxyip str_replace('<''&lt;'$proxyip);
define('PROXYIP'str_replace('>''&gt;'$proxyip));
unset(
$proxyip); 

after
PHP Code:

{
    
define('ALT_IP'$_SERVER['REMOTE_ADDR']);


(At least I came this far ;))

mtha 02-09-2004 07:09 PM

Quote:

Originally Posted by Stadler
Thanks for the time I couldn't find to update the hack :)

btw: instead of using a function to detect the Proxy-Address, you could modify /includes/init.php by adding...

wondering what's the advantage/disadvantage of using init.php to functions.php? I'm kinda new to that init.php :)

Stadler 02-09-2004 07:14 PM

Not much advantages, but:
1. init.php is called in every script and it's among the first scripts called there.
2. The IP is determined in the same script.
3. It was my approach to that hack. ;)

MaDCaT75 02-10-2004 04:40 AM

There is no such template as post_ip_show !

mtha 02-10-2004 06:18 AM

Quote:

Originally Posted by MaDCaT75
There is no such template as post_ip_show !

:) template was changed in RC too.

it's postbit_ip

if you want, you can change this postbit_ip to:

PHP Code:

<if condition="$show['ip']">
 
$vbphrase[ip]: $post[ip] <if condition="($post[proxyip] != '')"><br>(Proxy DetectedReal IP$post[proxyip])</if>
<else />
 <
a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]title="$post[ip]border="0" /></a>
</if> 


achtungbaby 02-11-2004 02:43 AM

Quote:

Originally Posted by mtha
:) template was changed in RC too.

it's postbit_ip

if you want, you can change this postbit_ip to:

PHP Code:

<if condition="$show['ip']">
 
$vbphrase[ip]: $post[ip] <if condition="($post[proxyip] != '')"><br>(Proxy DetectedReal IP$post[proxyip])</if>
<else />
 <
a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]title="$post[ip]border="0" /></a>
</if> 


I'm confused. What exactly shoudl we add to postbit_ip...where does the code from iphidden and ipshow go?

MaDCaT75 02-11-2004 06:28 AM

can someone make this easy on me and translate it for RC2 :(

mtha 02-19-2004 09:48 PM

The MOD now work for vB3 RC4. See first post. (You may want to uninstall if you installed the version for beta7)
https://vborg.vbsupport.ru/showthrea...503#post474503

Quote:

Originally Posted by achtungbaby
I'm confused. What exactly shoudl we add to postbit_ip...where does the code from iphidden and ipshow go?

Dont worry about that postbit_ip_show and hidden anymore, just replace postbit_ip by:
# Replace all by

HTML Code:


<if condition="$show['ip']">
$vbphrase[ip]: $post[ip] <if condition="($post[proxyip] != '')">Proxy!<br>Real IP: $post[proxyip])</if>
<else />
<a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]">
<img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" title="$post[ip] <if condition="($post[proxyip] != '')">- Proxy Detected! Real IP: $post[proxyip])</if>" border="0" />
</a>
</if>


draculanowaday 02-29-2004 02:35 PM

Đi lang thang t?m hack/mod lại vớ phải đ?ng code của b?c Hắc Nho b?n n?y :) vui thật đ? :) I iem Dr?c?l? in GVN :D
[high]* draculanowaday will install it tomorrow :)[/high]

mtha 03-01-2004 07:07 AM

Quote:

Originally Posted by draculanowaday
Đi lang thang t?m hack/mod lại vớ phải đ?ng code của b?c Hắc Nho b?n n?y :) vui thật đ? :) I iem Dr?c?l? in GVN :D
[high]* draculanowaday will install it tomorrow :)[/high]

Welcome aboard :)

NexVision 03-01-2004 08:49 AM

ok i installed this hack on rc4 and didnt notice anything dif but then again i was a little confused by the instructions anyone got them in idiot terms

DVDF-Osiris 03-03-2004 10:15 PM

Quote:

Originally Posted by NexVision
ok i installed this hack on rc4 and didnt notice anything dif but then again i was a little confused by the instructions anyone got them in idiot terms

Here you are -
HTML Code:

############################################
# Hack Name: Proxy Detector v3.0
# Orgiginal hack by Takara and Stadler (for vB 2.0)
# Modified for vB 3.0 RC4 by HacNho
# Date: 02.19.04
############################################
# Changes and Fixes:
# Version 3.0:
# 1. Compatibility to vB 3.0 RC4
# 2. Admin with "adminpermission" will see the "ProxyIP when overmouse if the IP is not shown
# 3. Proxy IP will be displayed with IP address in show IP page
###########################################
# Description: This is little hack detects via the Environmental Variable
# HTTP_X_FORWARDED_FOR if the user is using a proxy. Most proxys give out this
# variable. If it is it will display it out for you, and allow you to view the
# real IP of the person, and proxy IP/hostmask when you click the link.
#
# Files Edited: init.php, functions_newpost.php, postings.php
# Templates Modified: postbit_ip_show, postbit_ip_hidden
# SQL Columns Added: proxyip
# Phrase to add: thread_displayproxyip
#
# Notes: Thanks to Takara and Stadler who wrote and modify this hack for vBulletin 2.x
# I just modify to make it work with vB 3.x (PHP 4.3.3)
# Remember to backup your files and DB before making any changes!
############################################


######################################
#RUN THE FOLLOWING SQL QUERY:
######################################

ALTER TABLE post ADD proxyip VARCHAR(50) not null AFTER ipaddress;



#####################################
#ADD NEW PHRASE:
#####################################

PHRASE TYPE: Front-End Error Messages

VARNAME: thread_displayproxyip

TEXT:
        The proxy IP Address is: $postinfo[ipaddress]<br>
        The proxy host name is: $postinfo[hostaddress]<br>
        The real IP Address is: $postinfo[proxyip]



#####################################
#Edit TEMPLATE: postbit_ip
#####################################
-----------------------------------
Replace the whole text with this:
-----------------------------------
<if condition="$show['ip']">
        $vbphrase[ip]: $post[ip] <if condition="($post[proxyip] != '')">Proxy!<br>Real IP: $post[proxyip])</if>
<else />
        <a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]">
        <img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" title="$post[ip] <if condition="($post[proxyip] != '')">- Proxy Detected! Real IP: $post[proxyip])</if>" border="0" />
        </a>
</if>

<author>
HacNho
</author>

<homepage>

</homepage>



#######################################
#Edit the file: includes/init.php
#######################################
-----------------------------------
search for:
-----------------------------------
{
        define('ALT_IP', $_SERVER['REMOTE_ADDR']);
}
-----------------------------------
insert after:
-----------------------------------
// ####################### HN getproxyip START########################
// establish client Proxy address (if it exists)
if ($_SERVER['HTTP_FORWARDED'] != '')
{
        $proxyip = $_SERVER['HTTP_FORWARDED'];
}
else if ($_SERVER['HTTP_X_FORWARDED_FOR'] != '')
{
        $proxyip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else if ($_SERVER['HTTP_CLIENT_IP'] != '')
{
        $proxyip = $_SERVER['HTTP_CLIENT_IP'];
}
else
{
        $proxyip = '';
}

$proxyip = preg_replace('/javascript/i', 'java script', $proxyip);
$proxyip = str_replace('"', '"', $proxyip);
$proxyip = str_replace('<', '&lt;', $proxyip);
define('PROXYIP', str_replace('>
', '&gt;', $proxyip));
unset($proxyip);
// ####################### HN getproxyip END ########################



######################################################
#edit the file: includes/functions_newpost.php
#####################################################
-----------------------------------
search for:
-----------------------------------
        if ($vboptions['logip'])
        {
                $post['ipaddress'] = IPADDRESS;
        }
        else
        {
                $post['ipaddress'] = '';
        }
-----------------------------------
replace with:
-----------------------------------
// Begin proxyip hack - HacNho
        if ($vboptions['logip'])
        {
                $post['ipaddress'] = IPADDRESS;
                $post['proxyip'] = PROXYIP;
        }
        else
        {
                $post['ipaddress'] = '';
                $post['proxyip'] = '';
        }
// End proxyip hack - HacNho


-----------------------------------
search for:
-----------------------------------
                // ### POST NEW POST ###
                $DB_site->query("
                        INSERT INTO " . TABLE_PREFIX . "post
                                (threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
                                showsignature, ipaddress, iconid, visible, attach)
                        VALUES
                                ($threadinfo[threadid], $parentid, '" . addslashes($post['title']) . "',
                                '" . addslashes($post['postusername']) . "', $bbuserinfo[userid], " . TIMENOW . ",
                                '" . addslashes($post['message']) . "', $post[enablesmilies], $post[signature],
                                '" . addslashes($post['ipaddress']) . "', $post[iconid], $post[visible], $totalattachments)
                ");
-----------------------------------
replace with:
-----------------------------------
// Begin proxyip hack - HacNho
                // ### POST NEW POST ###
                $DB_site->query("
                        INSERT INTO " . TABLE_PREFIX . "post
                                (threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
                                showsignature, ipaddress, proxyip, iconid, visible, attach)
                        VALUES
                                ($threadinfo[threadid], $parentid, '" . addslashes($post['title']) . "',
                                '" . addslashes($post['postusername']) . "', $bbuserinfo[userid], " . TIMENOW . ",
                                '" . addslashes($post['message']) . "', $post[enablesmilies], $post[signature],
                                '" . addslashes($post['ipaddress']) . "','" . addslashes($post['proxyip']) . "', $post[iconid], $post[visible], $totalattachments)
                ");
// End proxyip hack - HacNho





################################################
#edit the file: postings.php
###############################################
-----------------------------------
search for:
-----------------------------------
        eval(print_standard_error('thread_displayip', 1, 0));

-----------------------------------
replace with:
-----------------------------------
// Begin proxyip hack - HacNho
        if ($postinfo[proxyip] != '')
        {
                eval(print_standard_error('thread_displayproxyip', 1, 0));
        }
        else
        {
                eval(print_standard_error('thread_displayip', 1, 0));
        }
// End proxyip hack - HacNho

Nice hack mtha, installed :)

NexVision 03-03-2004 10:25 PM

installing now thanx

NexVision 03-03-2004 10:42 PM

ok i think i got it does this screen look right

DVDF-Osiris 03-04-2004 08:16 AM

Not sure about the 'Alt IP Address' bit, I don't get that.

This is what I get -

(IPs edited of course)

alkatraz 03-04-2004 08:20 AM

nice hack!!! thx

NexVision 03-04-2004 01:33 PM

can anyone help me not sure wut i did wrong i followed the reworded directions above and still nothing its not decoiphering the actual IP I have vb3 rc4

M1th 03-04-2004 02:39 PM

Cant remember exactly when, but floris released something similar to this a couple of weeks ago.

mtha 03-05-2004 06:13 AM

Quote:

Originally Posted by NexVision
can anyone help me not sure wut i did wrong i followed the reworded directions above and still nothing its not decoiphering the actual IP I have vb3 rc4

no one can help without information. How can I know what you did wrong, if you only say it doesnt work in your board?

btw, if proxy is not detected (and not all proxy is detected, only most of them are), it should look normal, as if nothing happened :P

Quote:

Cant remember exactly when, but floris released something similar to this a couple of weeks ago.
Are you refering to this one?
https://vborg.vbsupport.ru/showthread.php?t=59738


It's nice, but I dont know much about that ALT_IP function doing, and as I stated at the begining, the original hack for this one belongs to Takara and Stadler (HERE for vB 2.0)

NexVision 03-05-2004 06:19 AM

Quote:

Originally Posted by mtha
no one can help without information. How can I know what you did wrong, if you only say it doesnt work in your board?

btw, if proxy is not detected (and not all proxy is detected, only most of them are), it should look normal, as if nothing happened :P

see thats just it i dont think i did wut would you need to see to tell

mtha 03-05-2004 08:55 PM

Quote:

Originally Posted by NexVision
see thats just it i dont think i did wut would you need to see to tell

means you are having problems or not? is that a question?

things you can test:

- open post table (in phpMyAdmin, for example), and sort by proxyip, see if you have any IP in there
SELECT * FROM `post` WHERE 'proxyip' !='';

If there're some IPs in there, means you did record the proxy IPs. otherwise, it could either be none of the new posts posted under any ip or your proxy function doesnt work.

MAKE SURE that you did all the changes in the files correct.
- add any IP into some post that you can check, using phpMyAdmin, and see if it shows up in your testing post

good luck



it's hard to help, without information, you know. if you do everything correct, it should work properly.

NexVision 03-05-2004 09:29 PM

Quote:

Originally Posted by mtha
means you are having problems or not? is that a question?

things you can test:

- open post table (in phpMyAdmin, for example), and sort by proxyip, see if you have any IP in there
SELECT * FROM `post` WHERE 'proxyip' !='';

If there're some IPs in there, means you did record the proxy IPs. otherwise, it could either be none of the new posts posted under any ip or your proxy function doesnt work.

MAKE SURE that you did all the changes in the files correct.
- add any IP into some post that you can check, using phpMyAdmin, and see if it shows up in your testing post

good luck



it's hard to help, without information, you know. if you do everything correct, it should work properly.

sorry for not being to much help I think I followed the directions exactly however I really know nothing about this stuff and im just learning this is wut I see i tried to run the query again and it tells me duplicate entry

NexVision 03-05-2004 09:38 PM

ok i did some more looking and it shows me a proxy ip for 2 users on the last page of the post table so i guess i ++++ed up on the templates somewhere

mtha 03-06-2004 09:05 AM

Quote:

Originally Posted by NexVision
ok i did some more looking and it shows me a proxy ip for 2 users on the last page of the post table so i guess i ++++ed up on the templates somewhere

check that post id + thread ID to go with it. View that post, and click on IP, see if it call the new template.


also, check this part in postings.php

PHP Code:

// Begin proxyip hack - HacNho
if ($postinfo[proxyip] != ''
{
eval(
print_standard_error('thread_displayproxyip'10));
}
else 
{
eval(
print_standard_error('thread_displayip'10));
}
// End proxyip hack - HacNho 

and phrase thread_displayproxyip. Make sure the phrase property is correct

NexVision 03-06-2004 01:37 PM

ok I checked all those things now when I go to a post where the user is behing a proxy i get the following message pic 1

so I did a phrase search and got this pic 2

mtha 03-06-2004 06:06 PM

Quote:

Originally Posted by NexVision
ok I checked all those things now when I go to a post where the user is behing a proxy i get the following message pic 1

so I did a phrase search and got this pic 2

Go to Search in Phrases, search for proxy
Make sure that the thread_displayproxyip is belong to
Front-End Error Messages Phrases catalogue

Otherwise, remove that phrase, and add again, under FRONT-END ERROR MESSAGES



bwt. is this your post?
https://vborg.vbsupport.ru/showpost....4&postcount=27

seems like you installed floris' ALT_IP hacks? remember, this one is different. I didnt play with the other one, so I dont know if there's any conflict.

NexVision 03-06-2004 06:16 PM

Quote:

Originally Posted by mtha
Go to Search in Phrases, search for proxy
Make sure that the thread_displayproxyip is belong to
Front-End Error Messages Phrases catalogue

Otherwise, remove that phrase, and add again, under FRONT-END ERROR MESSAGES



bwt. is this your post?
https://vborg.vbsupport.ru/showpost....4&postcount=27

seems like you installed floris' ALT_IP hacks? remember, this one is different. I didnt play with the other one, so I dont know if there's any conflict.

yes that was my post and adding that to my front-end error message worked I didnt realize that the alt ip hack was installed my partner may have done it ill search for that hack and remove it thank you for all the help :) sorry im such a noob


All times are GMT. The time now is 07:22 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.01463 seconds
  • Memory Usage 1,924KB
  • 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_html_printable
  • (5)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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