Last active
December 12, 2015 04:28
-
-
Save bdcravens/4714774 to your computer and use it in GitHub Desktop.
Generates SQL (SQL Server 2000) for searching all text columns for a given string. (Need to remove last UNION) Good for catching SQL injection results.
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
SELECT | |
'select ' + column_name + ' as txt, | |
''' + column_name + ''' as [column_name], | |
id from applications where ' + column_name + ' like ''%payday%'' union ' | |
FROM INFORMATION_SCHEMA.COLUMNS | |
where table_name = 'applications' | |
and data_type in ('nvarchar','varchar','char','nchar') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment