Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Proxy Detector v3.1 - for Posts and WOL Details »»
Proxy Detector v3.1 - for Posts and WOL
Version: 1.00, by mtha mtha is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.0.1 Rating:
Released: 02-07-2004 Last Update: 06-20-2004 Installs: 68
DB Changes
 
No support by the author.

############################################
# 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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 06-19-2004, 03:42 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha
This proxy is only for posts, and record "real IP" into post table. I did not do anything with online users and banning system.

I think BAN system do work with regular IP (which would be proxy IP in your case), so if you want to ban someone, you have to ban his proxy IP. there's nothing related to real IP revealed yet.

For rightnow, I am not interested in banning system (I dont ban anyone, there's no bad guy in my site tho), so ... I dont think I can help you yet.


anyway, if you wanna write it yourself, check out this part in functions.php

Code:
 
// ###################### Start checkipban #######################
function verify_ip_ban()
{
// checkes to see if the current ip address is banned
global $vboptions, $session;
$vboptions['banip'] = trim($vboptions['banip']);
if ($vboptions['enablebanning'] == 1 AND $vboptions['banip'])
{
$addresses = explode(' ', preg_replace("/[[:space:]]+/", " ", $vboptions['banip']) );
foreach ($addresses AS $val)
{
if (strpos(' ' . IPADDRESS, ' ' . trim($val)) !== false)
{
	eval(print_standard_error('error_banip'));
}
}
}
}

You need to mahe sure that $proxyip is detected, and then compare this value with $val, something like

Code:
 
if (strpos(' ' . $proxyip, ' ' . trim($val)) !== false)
{
	eval(print_standard_error('error_banip'));
}

Maybe you just need to add the code bellow

Code:
 
if (strpos(' ' . IPADDRESS, ' ' . trim($val)) !== false)
{ 
	eval(print_standard_error('error_banip'));
}

remember, I DID NOT test the script, so if you try, give it some extra carefull

Hmmm, I'm affraid I don't have enough PHP knowledge to make something like that . Any idea's? Does somebody want to make something like this?
Reply With Quote
  #53  
Old 06-20-2004, 09:15 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A new version to catch proxyIP for Whois Online is available in the first post:

https://vborg.vbsupport.ru/showthrea...503#post474503
Reply With Quote
  #54  
Old 06-20-2004, 09:21 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Soccerquest
Hmmm, I'm affraid I don't have enough PHP knowledge to make something like that . Any idea's? Does somebody want to make something like this?
Try this:

in functions.php

Look for
if (strpos(' ' . IPADDRESS, ' ' . trim($val)) !== false)
{
eval(print_standard_error('error_banip'));
}

Add after:

if (strpos(' ' . PROXYIP, ' ' . trim($val)) !== false)
{
eval(print_standard_error('error_banip'));
}


(given that you did installed my mod)


PS. I DIDNOT test the function, so if you want to do it, backup first.
Reply With Quote
  #55  
Old 06-21-2004, 12:54 AM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Proxy Detector Version 3.1 works fine for me
thanks mtha
Reply With Quote
  #56  
Old 06-21-2004, 02:22 PM
Acido Acido is offline
 
Join Date: Apr 2003
Location: Argentina
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting this error in the online.php script

Quote:
Database error in vBulletin 3.0.1:
Invalid SQL:
SELECT user.username, user.smsstatus, user.username as loginname, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.proxyip, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM session AS session

LEFT JOIN user AS user USING (userid)
WHERE session.lastactivity > 1087830026

ORDER BY user.username asc
mysql error: Unknown column 'user.smsstatus' in 'field list'
mysql error number: 1054
Can you help ?
Reply With Quote
  #57  
Old 06-21-2004, 03:00 PM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My syntax in online.php looks like this
PHP Code:
$allusers $DB_site->query("
    SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.proxyip, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo,
    IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
    FROM " 
TABLE_PREFIX "session AS session
    "
iif($vboptions['WOLguests'], " LEFT JOIN " TABLE_PREFIX "user AS user USING (userid) "", " TABLE_PREFIX "user AS user") ."
    WHERE session.lastactivity > 
$datecut
        "
iif(!$vboptions['WOLguests'], " AND session.userid = user.userid""") ."
    ORDER BY 
$sqlsort $sortorder
"
); 
There is no "user.username as loginname" in it !
Check installation instruction and your original files to fix !
Reply With Quote
  #58  
Old 06-21-2004, 03:18 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
There is no "user.username as loginname" in it !
Check installation instruction and your original files to fix !
You are right my board was heavily hacked. I didnt look back at the original file to check. Sorry
the installation files are updated.


Quote:
Originally Posted by Acido
I'm getting this error in the online.php script


Can you help ?
In online.php, replace the old part by this one:

PHP Code:
// HN - ProxyIP UserOnline - BEGIN
$allusers $DB_site->query("
SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.proxyip, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM " 
TABLE_PREFIX "session AS session
"
iif($vboptions['WOLguests'], 
            LEFT JOIN " 
TABLE_PREFIX "user AS user USING (userid) "", " TABLE_PREFIX "user AS user") ."
WHERE session.lastactivity > 
$datecut
"
iif(!$vboptions['WOLguests'], " AND session.userid = user.userid""") ."
ORDER BY 
$sqlsort $sortorder
"
);
// HN - ProxyIP UserOnline - END 

Or you just need to add session.proxyip, after session.host, in the original online.php file
Reply With Quote
  #59  
Old 07-19-2004, 08:12 AM
SmartGnome's Avatar
SmartGnome SmartGnome is offline
 
Join Date: Mar 2003
Location: Amsterdam
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed the hack..... Thanks MTA and now I'm looking for proxy users.
Reply With Quote
  #60  
Old 08-11-2004, 10:45 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed it and done what you said in the last 2 posts and still don't see nothing

all I see is theres what looks like a dash next to the original IP icon

but I only see the one IP in posts and in whos online.. I am using proxy myself and it just shows the one IP

I am using 3.0.3 btw

and I am not a newbie to hacking so I did everything correctly
I turn on my proxy I see the new IP (the proxy iP), I turn my proxy off I see my real IP nothing more , it won't show if I was behind proxy


also on that board I am pretty sure at least 90% of users/visiters are behind proxy
Reply With Quote
  #61  
Old 08-11-2004, 10:56 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OOps.. I am a newbie after all

sorry mate.. I didn't have user agent on

its working

thnx
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08407 seconds
  • Memory Usage 2,336KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete