I added a TINYTEXT field to nuke_users with the name user_ip. Then in mainfile.php in the online function I added (everything from "else{" on):
Code:
if (!isset($uname)) {
$uname = "$ip";
$guest = 1;
}else {
$result = $db -> sql_query("SELECT user_ip FROM ".$prefix."_users WHERE uname='$uname'");
list($user_ip) = $db -> sql_fetchrow($result);
if ($user_ip != $ip) {
$sql = "UPDATE ".$prefix."_users SET user_ip='$ip' WHERE username='$uname'";
$db -> sql_query($sql);
}
}
This means each time a user logs in it will update their last IP in the usertable. If you have a problem with a user, you always have the last IP they used. Sure someone could spoof or something, but I thought it would be just one more way to track back on someone if necessary.
--Hadron
sting Site Admin
Joined: Jul 24, 2003
Posts: 1986
Location: Apparently ALWAYS Online. . .
Posted:
Sun Aug 24, 2003 10:20 pm
It is a good idea - you are right about the spoofing and also proxy users at one location will have only one IP address, which could yield multiple users with the same IP, but I love the tracking.
Instead of editing mainfile.php, is there a way to add this as a mod or an include? I couldn't get over how many manual edits were made to mainfile.php over the last few mods I have looked at.
Its not a matter of 'IF' they can get in. Its a matter of what you have in place to track them when they do.
-sting
_________________ Is it paranoia if they are really out to get you?
-------------------------------------------------------
sting usually hangs out at nukehaven.net
Hadron Corporal
Joined: Aug 20, 2003
Posts: 61
Posted:
Sun Aug 24, 2003 10:57 pm
You could easily add the same code to the login function of Your_Account or even in the theme.php file. Heck, you can put it most anywhere you know will get accessed (like a User Info Block) every time they visit the site.
Most every Site Visitors block has a similar "if (!isset($uname)) {" code line from what I've seen since they have to test if the user is logged in so they can show the login fields.
--Hadron
Zhen-Xjell Nuke Cops Founder
Joined: Nov 14, 2002
Posts: 5939
Posted:
Mon Aug 25, 2003 5:00 am
Hi, I installed a user tracking module into our bundle that captures wonderful user data for each page visit.
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum