2022年12月27日 星期二

Debian 11 安裝 dvwa

apt install -y apache2 mariadb-server mariadb-client php php-mysqli php-gd libapache2-mod-php php-xml git

cd /home
git clone https://github.com/digininja/DVWA.git
cp /home/DVWA/config/config.inc.php.dist /home/DVWA/config/config.inc.php
chown -R www-data.www-data /home/DVWA

cat <<EOF|mysql
create database dvwa;
create user dvwa@localhost identified by 'p@ssw0rd';
grant all on dvwa.* to dvwa@localhost;
flush privileges;
EOF

編輯 /etc/php/7.4/apache2/php.ini  修改
allow_url_include = On
display_errors = On

systemctl restart apache2

預設帳號/密碼
admin / password


沒有留言: