coldwind โพสต์ 2020-6-30 09:46:10

ผู้ดูแลระบบล็อค 15นาที->5นาที ได้ไหมครับ

แก้ไขครั้งสุดท้ายโดย coldwind เมื่อ 2020-7-5 07:13



2 or 3 times everyday!!T_T There is no wrong password. I changed my password and used it. But still...
Can I reduce 15 minutes to 5 minutes or less?

popiazaza โพสต์ 2020-6-30 19:16:52

NOT TESTED

source/function/function_member.php
find
function logincheck($username) {edit all 900 in that function to 300 and 901 to 301 from
function logincheck($username) {
      global $_G;

      $return = 0;
      $username = trim($username);
      loaducenter();
      if(function_exists('uc_user_logincheck')) {
                $return = uc_user_logincheck(addslashes($username), $_G['clientip']);
      } else {
                $login = C::t('common_failedlogin')->fetch_ip($_G['clientip']);
                $return = (!$login || (TIMESTAMP - $login['lastupdate'] > 900)) ? 5 : max(0, 5 - $login['count']);

                if(!$login) {
                        C::t('common_failedlogin')->insert(array(
                              'ip' => $_G['clientip'],
                              'count' => 0,
                              'lastupdate' => TIMESTAMP
                        ), false, true);
                } elseif(TIMESTAMP - $login['lastupdate'] > 900) {
                        C::t('common_failedlogin')->insert(array(
                              'ip' => $_G['clientip'],
                              'count' => 0,
                              'lastupdate' => TIMESTAMP
                        ), false, true);
                        C::t('common_failedlogin')->delete_old(901);
                }
      }
      return $return;
}to
function logincheck($username) {
      global $_G;

      $return = 0;
      $username = trim($username);
      loaducenter();
      if(function_exists('uc_user_logincheck')) {
                $return = uc_user_logincheck(addslashes($username), $_G['clientip']);
      } else {
                $login = C::t('common_failedlogin')->fetch_ip($_G['clientip']);
                $return = (!$login || (TIMESTAMP - $login['lastupdate'] > 300)) ? 5 : max(0, 5 - $login['count']);

                if(!$login) {
                        C::t('common_failedlogin')->insert(array(
                              'ip' => $_G['clientip'],
                              'count' => 0,
                              'lastupdate' => TIMESTAMP
                        ), false, true);
                } elseif(TIMESTAMP - $login['lastupdate'] > 300) {
                        C::t('common_failedlogin')->insert(array(
                              'ip' => $_G['clientip'],
                              'count' => 0,
                              'lastupdate' => TIMESTAMP
                        ), false, true);
                        C::t('common_failedlogin')->delete_old(301);
                }
      }
      return $return;
}
หน้า: [1]
ดูในรูปแบบกติ: ผู้ดูแลระบบล็อค 15นาที->5นาที ได้ไหมครับ