前言
练习SQL注入,在本机搭建php靶场所需的php开发相关笔记。
安装 PHP 7.0
|
|
用php
访问。
安装 PHP 5.6
|
|
用php5.6
访问。
更低版本可能需要自行编译安装
https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/
https://gist.github.com/jniltinho/959f873a84b72ddd9fca2513a52a6b04
MySQL
新建数据库1create database sqli_test;
新建表1234567891011use sqli_testdrop table if exists sqlinj;create table if not exists sqlinj ( id int primary key auto_increment, info varchar(32));insert into sqlinj values (1, "item #1");insert into sqlinj values (2, "item #2");insert into sqlinj values (3, "item #3");insert into sqlinj values (100, "item #100");insert into sqlinj values (1000, "item #1000");
Apache2
重启12sudo systemctl restart apache2sudo systemctl stop apache2