From 3cf44386da727d218c23983ec04dde52637b4d3e Mon Sep 17 00:00:00 2001 From: marcan2020 Date: Tue, 17 Nov 2020 19:59:11 -0500 Subject: [PATCH] Remove unnecessary condition to extract columns Since we retrieve only the rows with a specific table name `name ='table_name', the table name won't start with `sqlite_` . Thus, we can remove the unnecessary condition. --- SQL Injection/SQLite Injection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQL Injection/SQLite Injection.md b/SQL Injection/SQLite Injection.md index dcece85..1d3b8d9 100644 --- a/SQL Injection/SQLite Injection.md +++ b/SQL Injection/SQLite Injection.md @@ -37,7 +37,7 @@ Use limit X+1 offset X, to extract all tables. ## Integer/String based - Extract column name ```sql -SELECT sql FROM sqlite_master WHERE type!='meta' AND sql NOT NULL AND name NOT LIKE 'sqlite_%' AND name ='table_name' +SELECT sql FROM sqlite_master WHERE type!='meta' AND sql NOT NULL AND name ='table_name' ``` For a clean output