CentOS+Phpstudy安装Sqli-Labs

CentOS+Phpstudy安装Sqli-Labs

安装环境

CentOS 7.5 

vmware fusion

phpstudy

安装步骤

1. 下载sqli-labs

2. 将sqli-labs 移动到phpstudy的www目录下

3. 修改sql-connections下的db-creds.inc 文件

<?php

//give your mysql connection username n password
$dbuser ='root';
$dbpass ='root';
$dbname ="security";
$host = 'localhost';
$dbname1 = "challenges";
?>

4. 访问sqli-labs

5. 点击“Setup/reset Database for labs"

出现错误,修改db-creds.inc:

<?php

//give your mysql connection username n password
$dbuser ='root';
$dbpass ='root';
$dbname ="security";
$host = '127.0.0.1';
$dbname1 = "challenges";
?>

(通过分析setup.php文件,发现是数据库连接不上) 

再次点击链接,又出现错误

 将setup.php文件中的设置gbk字符集的地方改为utf8(共有两处)

刷新网页

安装完成!!!

posted @ 2019-12-03 11:10  Rosanne  阅读(699)  评论(0编辑  收藏  举报