Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Modification Name: Logged And Resolved IP Addresses

Author(s): CTM

Description: This modification attempts to resolve an IP address to give a host name when an Administrator or Moderator looks up a poster's IP address from the topic pages. If the IP address cannot be resolved, a "cannot be resolved" message will be shown instead. Also displays the resolved host name of visitors to the UBB in the "Recent Visitors" admin view. Useful for determining which ISP a visitor is using, or the country in which he or she lives. Fully Wordlet-ised.

Demo: "IP: Logged" link from post , PNTF admin view

Requirements: Valid UBB.classic license

Download Link: http://www.iphq.net/site/ubb/hacks/6.7/logged_and_resolved_ip.txt

Make sure that you don't go past the point I've specified in the mod installation instructions if you've already installed version 1.0.0 of this mod. It's clearly marked. wink

In order for this to work properly, your web server must have a version of Perl that is capable of using Socket. Saying that, most versions of Perl do, so that shouldn't be a problem.

For a Colorforums-compatible version of the template, see Trekkie\'s post in this thread . Thanks Trekkie! smile

This is my first hack for the new 6.6+ series, I hope it goes down well... smile

Sponsored Links
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
smile works great, thanks

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
GJ chris, can't wait to get her runnin smile .


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: May 2001
Posts: 27
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 27
And for those that want to use this hack with Colorofurms 6.7 just do the following for the public_show_ip.pl portion of the instructions:

Find:
Code
<tr class="lighttable">
<td width="20%">
<b>$vars_wordlets{ip}</b>
</td>
<td>
<b>$ip_number</b>
</td></tr>
Add after:
Code
<tr class="lighttable">
<td width="20%">
<b>$vars_wordlets{host}</b>
</td>
<td>
<b>$ip_host</b>
</td></tr>


-Trekkie
To point, click and boldly go...
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Thanks for the hint, Trekkie, I'll link to that in the top post. smile

Sponsored Links
Joined: May 2001
Posts: 27
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 27
You're welcome, just trying to give a little something back.


-Trekkie
To point, click and boldly go...
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Chris, any chance of you adding this to pntf, so that in admin view we can see hosts?

Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Will do in the next version, along with a couple of other features smile

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
laugh a new version? hehe... :cant wait:


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Already done an hour ago wink

Sponsored Links
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
umm chris...

This:
Code
Find:
=====

<td bgcolor="$vars_style{$colors[0]}" width="15%">$vars_style{FontTag}
$iplist
</font></td>

Replace with:
=============

<td bgcolor="$vars_style{$colors[0]}" width="25%">$vars_style{FontTag}
$hostlist
</font></td>
Should be:
Code
Find:
=====

<td bgcolor="$vars_style{$colors[0]}" width="15%">$vars_style{FontTag}
$iplist
</font></td>

add under:
=============

<td bgcolor="$vars_style{$colors[0]}" width="25%">$vars_style{FontTag}
$hostlist
</font></td>
shouldn't it?


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Yeah, it should, but I can't type... wink

Thanks James, all updated. smile

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Heh yup; I went and looked at the page and was all "humm, this doens't look right at all" lol...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
for those who want the look to match the normal pattern, change

Code
<td bgcolor="$vars_style{$colors[0]}" width="25%">$vars_style{FontTag}
$hostlist
</font></td>
to

Code
<td bgcolor="$vars_style{$colors[1]}" width="25%">$vars_style{FontTag}
$hostlist
</font></td>

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Al, i think that's probably what he wanted anyway, seeing as it begun as a replace :x...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Also fixed wink

Before I close my editor, is that all the bugs sorted now? wink

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Chris, this is awesome! I just noticed " crawl6.googlebot.com" in my list of recent visitors. Now I know when I'm being crawled laugh

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
*.inktomisearch.com love me...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Yeah, Inktomi is the most active search engine content indexer...

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
I wouldn't go that far... It's a war between GoogleBot and Inktomi on UGN :x...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Mar 2004
Posts: 5
Junior Member
Junior Member
Offline
Joined: Mar 2004
Posts: 5
Thanks, this works great! Even I could install it. laugh

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
A neat modification I added to this.

FIND:
Code
			$thishost = gethostbyaddr(inet_aton($thisip), AF_INET) or $thishost = $thisip;
ADD AFTER:
Code
			if($thishost =~ /google/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{google}/isg;
}elsif($thishost =~ /inktomi/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{inktomi}/isg;
}elsif($thishost =~ /msn/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{MSN}/isg;
}elsif($thishost =~ /turnit/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{turnitin}/isg;
}elsif($thishost =~ /jeeves/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{jeeves}/isg;
}elsif($thishost =~ /scooter/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{altavista}/isg;
}elsif($thishost =~ /turnit/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{turnitin}/isg;
}elsif($thishost =~ /fast-web/) {
$pdn =~ s/(<i>)(.+?)(</i>)/$vars_wordlets_pntf{alltheweb}/isg;
}
Then add the following lines to vars_wordlets_pntf.cgi

Code
    q!google! => q!GoogleBot!,
q!jeeves! => q!Ask Jeeves.com!,
q!altavista! => q!Alta-Vista!,
q!alltheweb! => q!AllTheWeb!,
q!turnitin! => q!TurnItIn.com!,
q!inktomi! => q!Inktomi!,
q!MSN! => q!MSN.com!,
This makes it so those spiders show up as members (ie, not listed as Guest xxxx) in the Admin View.

I could make this larger if anyone knows spiders and identifying traits so they can be distinguished via resolved IPs

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Ian, look through the awstats files, they have a load...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2003
Posts: 118
Member
Member
Offline
Joined: Jan 2003
Posts: 118
Help please, I added this hack including Ian's addition to the hack but it is not showing IP addresses or hostnames... frown


-GATOR

"Pain is temporary, Pride is forever"
Joined: Nov 2001
Posts: 1,704
CTM
Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
Would you mind PMing me details of an administrator account for your UBB please? It'd speed up the problem-solving process a lot. Thanks. smile

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
I just removed this from my forums, at least the pntf part. Resolving all of those IPs slowed the page down considerably

Joined: Mar 2004
Posts: 58
Member
Member
Offline
Joined: Mar 2004
Posts: 58
I've been using this mod for some time now with no special problems


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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

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

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