Last active
July 14, 2018 21:17
-
-
Save Tehada/181626ce8103115c0811cb1a9817f2c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
HEADERS = '(first integer)' | |
bad_request = '1; delete some_table;' | |
conn = sqlite3.connect('test_sqlite_injection.db') | |
cursor = conn.cursor() | |
cursor.execute('CREATE TABLE IF NOT EXISTS some_table' + HEADERS) | |
cursor.execute('SELECT * FROM some_table WHERE first = {0}'.format(bad_request)) | |
conn.commit() | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment