Previous Thread
Next Thread
Print Thread
Rate Thread
#238392 02/28/2003 11:50 AM
Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Well, just as the old addage goes, necessity IS the mother of invention. Hopefully this is not re-inventing a wheel that already exists in the ThreadsDev repertoire, but here it is. As a result of some pretty malicious activity on our site I put these little tweaks together to keep a better eye on folks. You may find some of it useful.


Mod Name / Version - Additional Security Stuff 1.0

Description - This collection of modifications allows you to monitor potentially undesirable clientele by revealing IP info to the admins and moderators.

Working Under - UBB.Threads 6.2.2

Pre-requisites - none

Author - Raconteur - for discussions and bug reports come to www.ubbdev.com or email [][email protected][/]

Files Altered - /admin/showusers.php, showprofile.php, /templates/default/showprofile.tmpl

Caveats - None

Backup your files before doing any modifing of your code.
Attachments
71313-Additional Security Stuff.txt (0 Bytes, 55 downloads)


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks... you are catching on with posting your own mods. Good work.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Yes, that is really good. I think all these extra security mods should be included in the main distribution, if they don't add any extra load at least. At the very least I will use the mods as soon as I've updated to 6.2.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Tried to get this one installed with directions last night. Might be me but I had a tough time using the text"find" command while editing files. Had to manually search the files for tiny snippets then replace. Figure thats why I got the errors... Anybody install from directions yet?

Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Hey Marty,

Not sure what you mean... are you having troubles with your editor's search function or problems finding the text to replace?

This may actually be a problem with MY editor... I think I saved the file with line-feeds at column 79 for formatting purposes.

Let me know and I will update if necessary.

Sorry...


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Sponsored Links
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Finding the text to replace. Seems the format doesn't match whats in my files even though most of it looks the same. I had some serious trouble tryng to copy and paste. I was manually searching for lines and this is a fairly large job... It didn'come out clean on my end so undid what I had started.

Not sure what the best method to upload the files to threadsdeve is, some work very easier than others. I will give it a go again on a new file.

No problems or worries ...I like the toys if I can get them to work

Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Ok... I reformatted it. Give that a try and let me know if it is better for you.


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Appreciate it... gonna be at least a week before I can get to this. Will give it a go right after I get the update done.

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
ok i've installed this and can't see any differance, what am i looking for?

Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
When you view a user's profile as a mod or admin you will see their registration IP and current IP if they are online. You will also see their IP in the showusers pages which results from selecting users from the admin panel.


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Sponsored Links
Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
hmmm dont see anything. Any suggestions?
Do i have to turn it on in the admin section or something?

Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Nope... nothing to turn on. Should just work. Go to Admin and select users. There should be a new column in the result table that has Registration IP in it.


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
hmm looks like i'm being thick. I must have uploaded the back by accident duhhhh what year is it.

I uploaded the hacked version and tried viewing a profile and got an error, so i must have done it wrong somewhere....i'm going to try and do this again tonight

Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Let me know how it works, Dave. Good luck!


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
ok tried it again and saw the extra fields when I went to a users profile but they were empt and this error appear at the top of the page:

SQL ERROR: Fri, Mar 07 2003 00:54:45 +0000 Database error only visible to forum administrators

Warning: Supplied argument is not a valid MySQL result resource in /var/www/vodatones.com/html/ubb/mysql.inc.php on line 130


Any idea's?

Joined: Jan 2003
Posts: 250
Member
Member
Offline
Joined: Jan 2003
Posts: 250
Are you the admin on this board? That SQL error only shows if you are not the admin...

Look for:
Code
<br />// Show IPs on user profile screen for Admins and Mods - CB added 2/28/03<br />	$query = "<br />		SELECT O_CurrentIP<br />		FROM {$config['tbprefix']}Online<br />		WHERE O_Uid = '$UNumber'<br />	";<br /><br />	$stj = $dbh -> do_query($query);<br />	list($curIP) = $dbh -> fetch_array($stj);<br /><br />	if (($thisuser['U_Status'] == "Administrator") || ($thisuser['U_Status'] == "Moderator")) {<br />		$IPInfo = "<br />			<tr><br />				<td valign=\"top\" class=\"darktable\">Reged IP</td><br />				<td>$RegIP</td><br />			</tr><br />			<tr><br />				<td valign=\"top\" class=\"darktable\">Current IP</td><br />				<td>$curIP</td><br />			</tr><br />		";<br />	}<br /><br />---------------------------------------------------------------------<br />


in your showprofile.php... this stuff relys on another mod, and I didn't realize it was in there.

Make it look like this:

Code
<br />// Show IPs on user profile screen for Admins and Mods - CB added 2/28/03<br />	if (($thisuser['U_Status'] == "Administrator") || ($thisuser['U_Status'] == "Moderator")) {<br />		$IPInfo = "<br />			<tr><br />				<td valign=\"top\" class=\"darktable\">Reged IP</td><br />				<td>$RegIP</td><br />			</tr><br />		";<br />	}<br />---------------------------------------------------------------------<br />


You will not see the current IP for logged in users because that requires JustDave's Current IP mod.

Sorry for the hassle... I have been pretty sick lately and haven't been thinking clearly. I will update the attachment.

Cheers,

Chris


"Some dream of doing great things, while others stay awake and get on with it."
      -- Anonymous
Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
Hey,
Ok I've changed it and I see the new column under the show/edit users section in the admin section. 9/10 of them show the IP as "127.0.0.1" though.
Also when I click on a users name on the whose online the "reged ip" section just shows a number rather than an IP, others show nothing.
I tried a few names at random and clicked on them from the "who's online" box.
For example:
Reged IP "5" (is 1 users)
Reged IP "5" (another user)
Reged IP "" (another user (nothing there)
Reged IP "1" (another user)

Any idea's?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
You imported from Classic.... I'm not sure if Classic captured that info or not.

Do you get a real IP if you click on a newly registered user?

Your database would be limited to what data was imported.

Allen... Dave? Does Classic Capture registration IP... if so, does the importer handle it correctly?

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
ahh i'm not bothered, given up on this 1 lol thanks for the help anyway


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:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 410
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 12
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)