Advertisement
efxtv

How to install DVWA Without any error (dvwa install github) t.me/efxtv

Mar 9th, 2023 (edited)
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | Cybersecurity | 0 0
  1. How to install DVWA Without any error (dvwa install github)
  2.  
  3. ERRORS FIXED:
  4. - DVWA install in kali linux
  5. - DVWA White screen error fixed
  6. - DVWA unable to login error fixed
  7. - DVWA how to create and delete database and user in MYSQL or mariadb
  8. - DVWA default login and password
  9. - Start stop start at boot apache2 and mariadb
  10. - Video link will be added soon
  11.  
  12. #----------------------------------------------------------------------------------#l
  13. #------ FIRST TIME INSTALLATION TO IF DVWA IN KALI LINUX / PARROT OS / UBUNTU------#
  14. #------ Please join https://t.me/efxtv to get it installed by us ------------------#
  15. #----------------------------------------------------------------------------------#
  16. #Install DVWA
  17. - google 'DVWA install'
  18. - Click on the first link (https://github.com/digininja/DVWA)
  19. - CTRL + f and search for git clone
  20. - Copy the command and paste it into your terminal
  21.  
  22. # Install requirements
  23. sudo apt install -y apache2 mariadb-server mariadb-client php php-mysqli php-gd libapache2-mod-php
  24.  
  25. # Git clone
  26. cd /var/www/html
  27. git clone https://github.com/digininja/DVWA.git
  28.  
  29. # Permissions
  30. sudo su -
  31. chmod -R 777 /var/www/html/DVWA
  32.  
  33. #Change php config
  34.  
  35. cp /var/www/html/DVWA/config/config.inc.php.dist /var/www/html/DVWA/config/config.inc.php
  36.  
  37.  
  38. # Start services
  39. sudo systemctl start apache2
  40. sudo systemctl start mariadb
  41. or
  42. sudo systemctl start mysql
  43.  
  44. # Stop services
  45. sudo systemctl stop apache2
  46. sudo systemctl stop mariadb
  47. or
  48. sudo systemctl stop mysql
  49.  
  50.  
  51. # Create a database and fix the white screen error
  52. sudo su -
  53. sudo msql -u root -p
  54.  
  55.  
  56. create database dvwa;
  57. create user dvwa@localhost identified by 'p@ssw0rd';
  58. grant all on dvwa.* to dvwa@localhost;
  59.  
  60. # Verify by logging in to the database with the same password
  61. - open a new terminal (ERROR: use the command in case of no login mysql -u dvwa -pp@ssw0rd )
  62. mysql -u dvwa -p
  63.  
  64. # Edit php.ini file
  65. nano /etc/php/7.4/apache2/php.ini (press ctrl w search for->> allow_ )
  66. change off to on (capital O small n)
  67. allow_url_include = On
  68.  
  69. #start services again
  70. sudo systemctl start apache2
  71. sudo systemctl status apache2
  72.  
  73. # Login to DVWA
  74. now go http://localhost/DVWA/setup.php and create database
  75. now go http://localhost/DVWA/login.php
  76.  
  77. #----------------------------------------------------------------------------------#
  78. #------ Run the commands in case of reinstall (delete database user and recreate)
  79. #----------------------------------------------------------------------------------#
  80.  
  81. # fix
  82.  
  83. sudo su -
  84. mysql -u dvwa -p
  85.  
  86. SHOW DATABASES;
  87. DROP DATABASE dvwa;
  88. drop user dvwa@localhost;
  89.  
  90. create database dvwa;
  91. create user dvwa@localhost identified by 'p@ssw0rd';
  92. grant all on dvwa.* to dvwa@localhost;
  93.  
  94.  
  95. Exit out of sudo user and login to db with password p@ssw0rd
  96. mysql -u dvwa -p
  97.  
  98.  
  99. (if you are logged great )
  100. now go http://localhost/DVWA/setup.php and create a database
  101. now go http://localhost/DVWA/login.php
  102.  
  103. Still facing white screen error?
  104.  
  105. # FIX which screen error (close all the terminals and open new terminal Run command one by one)
  106. sudo service apache2 stop
  107. sudo service mysql stop
  108. sudo service apache2 start
  109. sudo service mariadb start
  110.  
  111. now go http://localhost/DVWA/setup.php and create a database
  112. now go http://localhost/DVWA/login.php Cheers
  113.  
  114. username = admin
  115. password = password
  116.  
  117.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement