萌新在搭建XVWA靶场时遇见的问题
0x01 准备工作
首先前往GitHub下载XVWA靶场 XVWA 下载后进行解压,最好为全英文目录。
本人使用小皮面板(phpstudy pro)进行搭建 将解压文件放入小皮面板安装目录下的WWW文件夹 
0x02 启动
创建网站  点击右侧 管理-打开网站 即可看到成功报错 
Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) in E:\phpstudy_pro\WWW\xvwa-master-test\config.php on line 7
Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) in E:\phpstudy_pro\WWW\xvwa-master-test\config.php:8 Stack trace: #0 E:\phpstudy_pro\WWW\xvwa-master-test\config.php(8): PDO->__construct('mysql:host=loca...', 'root', '') #1 E:\phpstudy_pro\WWW\xvwa-master-test\header.php(18): include('E:\\phpstudy_pro...') #2 E:\phpstudy_pro\WWW\xvwa-master-test\index.php(34): include('E:\\phpstudy_pro...') #3 {main} thrown in E:\phpstudy_pro\WWW\xvwa-master-test\config.php on line 8
经过简单的分析可以看出是数据库错误
0x03 Debug
按照提示打开E:\phpstudy_pro\WWW\xvwa-master-test\config.php (目录下的config.php文件)  按照本图修改配置文件
返回浏览器刷新,即可进入XVWA的主页面
0x04 新的错误
打开主页面后发现所有的子页面都进不去 
Not Found
The requested URL /xvwa/vulnerabilities/xpath/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
这时我们在文件夹中新建文件夹并改名为xvwa,并将所有的文件都复制过去就好了
本萌新的第一篇文章
|