DVWA初始化
centos7部署DVWA
创建数据库和dvwa用户,设置远程访问
1 | create database dvwa; |
安装apache+php,启动httpd
1 | yum -y install apache2 php php-mysqli php-gd libapache2-mod-php |
验证php
1 | echo -e "<?php\nphpinfo();\n?>" > /var/www/html/phpinfo.php |
开放防火墙
1 | firewall-cmd --add-port=80/tcp --permanent |
部署dvwa
1 | cd /var/www/html/ |
初始化dvwa
访问http://ip/dvwa/
1 | DVWA System error - config file not found. Copy config/config.inc.php.dist to config/config.inc.php and configure to your environment. |
进入/var/www/html/dvwa/config
目录
1 | cp config.inc.php.dist config.inc.php |
vim config.inc.php
配置数据库
1 | $_DVWA = array(); |
注意这里要是localhost,127.0.0.1不行
添加keys,可访问这里获取
1 | # You'll need to generate your own keys at: https://www.google.com/recaptcha/admin |
红字报错解决
1 | vim /etc/php.ini |
1 | [User: root] Writable folder /var/www/html/dvwa/hackable/uploads/: **No** |
解决方法:
1 | chmod 777 /var/www/html/dvwa/hackableup/loads |
配置完成后,重启httpd服务
登录用户名/密码 admin/password
参考链接
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 DropAnn!