EAV123 commited on
Commit
fedc4fb
·
verified ·
1 Parent(s): 4af55c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -4
app.py CHANGED
@@ -168,15 +168,52 @@ if model_loading_error:
168
  # Example queries in a dropdown
169
  example_categories = {
170
  "Benign SQL Queries": [
171
- "SELECT * FROM users WHERE username='admin'",
172
- "SELECT id, name, price FROM products WHERE category_id=5"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  ],
174
  "Malicious SQL Queries": [
175
- "' OR 1=1 --",
176
- "admin'; DROP TABLE users; --"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  ]
178
  }
179
 
 
180
  category = st.selectbox("Choose query category:", options=list(example_categories.keys()))
181
  example = st.selectbox("Select an example:", options=example_categories[category])
182
  query_source = st.radio("Query source:", ["Use selected example", "Enter my own query"])
 
168
  # Example queries in a dropdown
169
  example_categories = {
170
  "Benign SQL Queries": [
171
+ "SELECT * FROM users WHERE username='admin'",
172
+ "SELECT id, name, price FROM products WHERE category_id=5",
173
+ "SELECT COUNT(*) FROM orders WHERE date > '2023-01-01'",
174
+ "INSERT INTO logs (user_id, action) VALUES (42, 'login')",
175
+ "UPDATE customers SET last_login='2023-06-15' WHERE id=101",
176
+ "DELETE FROM sessions WHERE last_activity < '2023-01-01'",
177
+ "SELECT email FROM subscribers WHERE active=1",
178
+ "INSERT INTO feedback (user_id, message) VALUES (87, 'Great service!')",
179
+ "UPDATE inventory SET stock = stock - 1 WHERE product_id = 300",
180
+ "SELECT name FROM employees WHERE department = 'Sales'",
181
+ "SELECT AVG(rating) FROM reviews WHERE product_id = 55",
182
+ "INSERT INTO audit_log (timestamp, event) VALUES (CURRENT_TIMESTAMP, 'update')",
183
+ "SELECT * FROM appointments WHERE doctor_id = 10 AND status = 'confirmed'",
184
+ "UPDATE settings SET value='dark' WHERE key='theme'",
185
+ "SELECT DISTINCT city FROM customers WHERE country='USA'",
186
+ "DELETE FROM cart_items WHERE user_id=12 AND product_id=78",
187
+ "SELECT MAX(salary) FROM employees WHERE role='manager'",
188
+ "INSERT INTO payments (user_id, amount, method) VALUES (33, 99.99, 'credit')",
189
+ "UPDATE products SET price = price * 1.1 WHERE category_id = 7",
190
+ "SELECT * FROM messages WHERE sender_id = 5 AND is_read = 0"
191
  ],
192
  "Malicious SQL Queries": [
193
+ "' OR 1=1 --",
194
+ "admin'; DROP TABLE users; --",
195
+ "SELECT * FROM users WHERE username='' UNION SELECT username,password FROM admin_users --",
196
+ "'; WAITFOR DELAY '0:0:10' --",
197
+ "admin' OR '1'='1",
198
+ "' OR 'a'='a",
199
+ "' OR 1=1#",
200
+ "' OR 1=1/*",
201
+ "admin'--",
202
+ "'; EXEC xp_cmdshell('dir'); --",
203
+ "' OR EXISTS(SELECT * FROM users WHERE username = 'admin') --",
204
+ "1; DROP TABLE sessions --",
205
+ "'; SHUTDOWN --",
206
+ "' OR SLEEP(5) --",
207
+ "' AND 1=(SELECT COUNT(*) FROM users) --",
208
+ "admin' AND SUBSTRING(password, 1, 1) = 'a' --",
209
+ "' UNION ALL SELECT NULL,NULL,NULL --",
210
+ "0' OR 1=1 ORDER BY 1 --",
211
+ "1' AND (SELECT COUNT(*) FROM users) > 0 --",
212
+ "' OR (SELECT ASCII(SUBSTRING(password,1,1)) FROM users WHERE username='admin') > 64 --"
213
  ]
214
  }
215
 
216
+
217
  category = st.selectbox("Choose query category:", options=list(example_categories.keys()))
218
  example = st.selectbox("Select an example:", options=example_categories[category])
219
  query_source = st.radio("Query source:", ["Use selected example", "Enter my own query"])