linux虚拟机(centos)搭建sqli-labs
1.开启小皮

2.查看文件位置
配置文件路径为/usr/local/phpstudy/soft
[root@localhost soft]# cd /www/admin/localhost_80
[root@localhost soft]# pwd
/usr/local/phpstudy/soft
网站根目录为/www/admin/localhost_80/wwwroot
[root@localhost localhost_80]# cd wwwroot
[root@localhost wwwroot]# pwd
/www/admin/localhost_80/wwwroot
3.搭建sqli-labs
Step1:进入localhost_80目录,并设置该目录的文件权限
[root@localhost localhost_80]# pwd
/www/admin/localhost_80
[root@localhost localhost_80]# chmod 777 -R wwwroot
[root@localhost localhost_80]# ls
data log wwwroot
Step2:上传靶场源码到当前目录当中,这里是直接将GitHub上的源码下载下来,然后使用finalshell将sqli-labs-master.zip传到虚拟机中。


Step3:选择网站根目录

Step4:将sqli-labs-master.zip解压缩并删除
[root@localhost wwwroot]# ls
error sqli-labs-master sqli-labs-master.zip
[root@localhost wwwroot]# rm sqli-labs-master.zip
rm:是否删除普通文件 "sqli-labs-master.zip"?y
[root@localhost wwwroot]# ls
error sqli-labs-master
Step5:访问目标服务

使用物理机访问

使用虚拟机访问
