Version 3.3.5
除了install与change_encrypt_pass操作以外,所有io操作移至dio.php
This commit is contained in:
29
login.php
29
login.php
@@ -3,6 +3,7 @@ define("IN_XSS_PLATFORM", true);
|
||||
|
||||
require_once("load.php");
|
||||
require_once("functions.php");
|
||||
require_once("dio.php");
|
||||
|
||||
//CSP开启
|
||||
header("Content-Security-Policy: default-src 'self'; object-src 'none'; frame-src 'none'");
|
||||
@@ -48,34 +49,6 @@ if (!isset($forbiddenIPList[$ip]) || $forbiddenIPList[$ip] <= 5) {
|
||||
} else
|
||||
$is_pass_wrong = true;
|
||||
|
||||
function loadForbiddenIPList() {
|
||||
$logfile = DATA_PATH . '/forbiddenIPList.dat';
|
||||
!file_exists($logfile) && @touch($logfile);
|
||||
$str = @file_get_contents($logfile);
|
||||
if ($str === false)
|
||||
return array();
|
||||
|
||||
$str = decrypt($str);
|
||||
|
||||
|
||||
if ($str != '') {
|
||||
$result = json_decode($str, true);
|
||||
if ($result != null)
|
||||
return $result;
|
||||
else
|
||||
return array();
|
||||
} else
|
||||
return array();
|
||||
}
|
||||
|
||||
function saveForbiddenIPList($forbiddenIPList) {
|
||||
$logfile = DATA_PATH . '/forbiddenIPList.dat';
|
||||
!file_exists($logfile) && @touch($logfile);
|
||||
$str = json_encode($forbiddenIPList);
|
||||
$str = encrypt($str);
|
||||
@file_put_contents($logfile, $str);
|
||||
}
|
||||
|
||||
/*
|
||||
生成密码
|
||||
php -r "$salt='!KTMdg#^^I6Z!deIVR#SgpAI6qTN7oVl';$key='bluelotus';$key=md5($salt.$key.$salt);$key=md5($salt.$key.$salt);$key=md5($salt.$key.$salt);echo $key;"
|
||||
|
||||
Reference in New Issue
Block a user