Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 11-25-2001
Last Update: Never
Installs: 233
No support by the author.
Here's my version:
In sessions.php find this code:
Code:
if (md5($loginpassword)!=$bbuserinfo[password]) {
right below it, add this code:
Code:
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
$iphostname = @gethostbyaddr($ipaddress);
$message="Someone is trying to login using your admin account!\n\nUsername he tried to use: $loginusername\nPassword he tried to use: $loginpassword (".md5($loginpassword)." in encryption)\n\nThe IP address is: $ipaddress\nThe host is: $iphostname";
mail($webmasteremail,"Warning: vBulletin Admin Login Tried",$message,"From: \"$bbtitle Admin CP\" <$webmasteremail>");
You will get a message:
Quote:
Someone is trying to login using your admin account!
Username he tried to use: xxx
Password he tried to use: xxx (xxxxxxxxxxxxxxxxxxxx in encryption)
The IP address is: xx.xx.xx.xx
every time someone is trying to login to the admin cp with no success.
Have fun.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
not sure if this works yet. just playing around with it so if anyone can think of how to fix/improve it let me know.
I added the scriptpath, real username as found from cookie, real username as found from sessions, and a link to search for username using that ip
PHP Code:
// email alert
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
$iphostname = @gethostbyaddr($ipaddress);
if ($sessionid=$DB_site->query("SELECT userid FROM session WHERE host='$ipaddress'")) {
$realusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$sessionid[userid]'");
$MessageAddon .= "Sessions identifys them as ".addslashes($realusername);
}
if ($HTTP_COOKIE_VARS['bbuserid']) {
$realuserid = $HTTP_COOKIE_VARS['bbuserid'];
$realusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$realuserid'");
$MessageAddon .= "Thier cookie identifys them as ".addslashes($realusername);
}
$message="Someone is trying to login using your admin account!\nThe Script was : ".addslashes($scriptpath)."\n\nUsername they tried to use: $loginusername\nPassword they tried to use: $loginpassword (".md5($loginpassword)." in encryption)\n\nThe IP address is: $ipaddress\nThe host is: $iphostname\n\nSearch for members using this ip\n $bburl\admin\user.php?action=doips&s=&ipaddress=$ipaddress\n\n$MessageAddon";
mail($webmasteremail,"Warning: vBulletin Admin Login Tried",$message,"From: \"$bbtitle Admin CP\" <$webmasteremail>");
// email alert
got it working for the most part but can't seem to get any memberinfo from the cookies
doesn't identify anyone. i logged into the forums under a test account then did a bogus login to the admin section and i only got this message in teh email alert
Sessions identifys them as Thier cookie identifys them as Array