go to /includes/functions_login.php:
Find:
if (($strikes_user['strikes'] % 5 == 0) AND $user = $vbulletin->db->query_first("SELECT userid, username, email, languageid FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string($username) . "' AND usergroupid <> 3"))
{ // they've got it wrong 5 times for this user lets email them
$ip = IPADDRESS;
eval(fetch_email_phrases('accountlocked', $user['languageid']));
vbmail($user['email'], $subject, $message, true);
Add Under:
///code added by EPC Login Detector
$ip = IPADDRESS;
$subject="Bad login - 5 tries";
$message="'$ip' was found trying to login to the account ".$vbulletin->GPC['vb_login_username']." and was blocked. Please investigate this as soon as you can.";
$admin = $vbulletin->db->query_read_slave("SELECT * FROM `user` WHERE `usertitle` = 'Administrator' limit 0,3000");
while ($item = $vbulletin->db->fetch_array($admin)) {
vbmail($item['email'], $subject, $message, true);
}
//code end by EPC Login Detector
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
go to /login.php
Find:
if (!verify_authentication($vbulletin->GPC['vb_login_username'], $vbulletin->GPC['vb_login_password'], $vbulletin->GPC['vb_login_md5password'], $vbulletin->GPC['vb_login_md5password_utf'], $vbulletin->GPC['cookieuser'], true))
{
Add under:
///code added by EPC Login Detector
$ip = IPADDRESS;
$subject="Bad login";
$message="'$ip' was found trying to login to the account ".$vbulletin->GPC['vb_login_username'].". Please investigate this as soon as you can.";
$admin = $vbulletin->db->query_read_slave("SELECT * FROM `user` WHERE `usertitle` = 'Administrator' limit 0,3000");
while ($item = $db->fetch_array($admin)) {
vbmail($item['email'], $subject, $message, true);
}
//code end by EPC Login Detector
Find:
// log this error if attempting to access the control panel
require_once(DIR . '/includes/functions_log_error.php');
log_vbulletin_error($vbulletin->GPC['vb_login_username'], 'security');
Add under:
///code added by EPC Login Detector
$ip = IPADDRESS;
$subject="ADMIN AREA: Bad login";
$message="'$ip' was found trying to login to the account ".$vbulletin->GPC['vb_login_username'].". Please investigate this as soon as you can.";
$admin = $vbulletin->db->query_read_slave("SELECT * FROM `user` WHERE `usertitle` = 'Administrator' limit 0,3000");
while ($item = $db->fetch_array($admin)) {
vbmail($item['email'], $subject, $message, true);
}
//code end EPC Login Detector
Find:
$vbulletin->userinfo = $original_userinfo;
if ($vbulletin->options['usestrikesystem'])
{
eval(standard_error(fetch_error('badlogin_strikes', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'], $strikes)));
}
else
{
eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl'])));
}
}
Add under:
///code added by EPC Login Detector
$ip = IPADDRESS;
$subject="Successeful login";
$message="'$ip' logged into the account ".$vbulletin->GPC['vb_login_username'].". Please investigate this as soon as you can.";
$admin = $vbulletin->db->query_read_slave("SELECT * FROM `user` WHERE `usertitle` = 'Administrator' limit 0,3000");
while ($item = $db->fetch_array($admin)) {
vbmail($item['email'], $subject, $message, true);
}
//code end EPC Login Detector