Php对接ilab,部署sqlilab

MySQL已经安装

Apache是yum安装的

查看httpd包是否可用:

yum list | grep httpd

安装Apache

yum install httpd

开启Apache

systemctl start httpd

测试Apache启动成功

698957c2ecd5eba28694695750931a65.png

文件路径说明:

服务目录 /etc/httpd

主配置文件 /etc/httpd/conf/httpd.conf

网站数据目录 /var/www/html

配置存储在的/etc/httpd/conf.d/目录

访问日志 /var/log/httpd/access_log

错误日志 /var/log/httpd/error_log

将sqlilab从github下载到本地

cd /var/www/html

git clone https://github.com/Audi-1/sqli-labs.git

[root@zh html]# ls -al

total 8

drwxr-xr-x. 3 root root 39 Nov 14 23:36 .

drwxr-xr-x. 4 root root 33 Nov 14 23:36 ..

-rw-r--r--. 1 root root 20 Nov 14 23:35 info.php

drwxr-xr-x. 78 root root 4096 Nov 14 21:46 sqli-labs

[root@zh html]#

根据https://github.com/Audi-1/sqli-labs 中的Install Instructions:

Open the file "db-creds.inc" which is under sql-connections folder inside the sql-labs folder.

Update your MYSQL database username and password.(default for Backtrack are used root:toor)

并且通过访问下面的路径进一步设置:

http://10.211.55.15/sqli-labs/

Click on the link setup/resetDB to create database, create tables and populate Data.

如果出现如下情况:

SETTING UP THE DATABASE SCHEMA AND POPULATING DATA IN TABLES:

[*]...................Could not connect to DB, check the creds in db-creds.inc: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

管理员权限运行命令提示符,登陆MySQL

mysql -u root -p

修改账户密码加密规则并更新用户密码

Alter user 'root'@'localhost' identified by 'root@123' password expire never;

Alter user 'root'@'localhost' identified with mysql_native_password by 'root@123';

刷新权限并重置密码

flush privileges;

alter user 'root'@'localhost' identified by '111111';

再次访问http://10.211.55.15/sqli-labs/

Click on the link setup/resetDB to create database, create tables and populate Data.

fffb10453238219d000bbaf098e3263b.png

接着就可以开始学习了

例如:

778b488738c836319e4550c70d33179d.png

6bf6dea17374bbe259647332cc53a36a.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值