
phpmyadmin怎么跳过登陆?
phpMyAdmin跳过登陆的方法
本地总是需要登陆才行,嫌麻烦,就找了底层代码直接修改代码跳过登陆,修改方式如下:
phpMyAdmin\libraries\classes\Plugins\Auth\AuthenticationCookie.php 文件 readCredentials() 方法
添加了两段代码,下面截取部分代码,红色为添加的代码
立即学习“PHP免费学习笔记(深入)”;
$value = $this->cookieDecrypt(
$_COOKIE['pmaUser-' . $GLOBALS['server']],
$this->_getEncryptionSecret()
);
$value = 'root';
$_SESSION['browser_access_time'] = array('default'=> time());
$_COOKIE['pmaAuth-1'] = '{"iv":"40aTBsj8bIVduuNICE544w==","mac":"9a51ccbeb899a0ac4a37837bf35056663e218e5a","payload":"tZWA9CPztU8aAyAVMhFDgZy5NTuIQBISDQ3xPa8aVVg="}';
if ($value === false) {
return false;
}
$this->user = $value;
// user was never logged in since session start
if (empty($_SESSION['browser_access_time'])) {
return false;
} // check password cookie
if (empty($_COOKIE['pmaAuth-' . $GLOBALS['server']])) {
return false;
}
$value = $this->cookieDecrypt(
$_COOKIE['pmaAuth-' . $GLOBALS['server']],
$this->_getSessionEncryptionSecret()
);
$value = '{"password":"root"}';
if ($value === false) {
return false;
}
$auth_data = json_decode($value, true);以上就是phpmyadmin怎么跳过登陆的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号