public abstract class SqlInjectionChecker extends Object
Modifier and Type | Method and Description |
---|---|
void |
addInjectionExpression(String Expr)
Adds an entry to injection expressions.
|
static String |
enforceEscapeCharacters(String value)
Enforce escaping special characters in an expression by proceeding them with a backslash.
|
protected abstract HashSet<String> |
getCommentExpressions()
gets the database vendor specific sql comment begin/end definition
|
protected abstract HashSet<String> |
getInjectionFunctions()
gets the database vendor specific functions that are considered as sql injection.
|
protected abstract String |
getSqlCommandSeperator()
gets the database vendor specific sql command separator
|
protected abstract String |
getSqlConcat()
gets the database vendor specific sql string concatenation
|
boolean |
hasSqlInjection(String sql)
Checks if the given sql has SQL Injection expressions
|
public void addInjectionExpression(String Expr)
Expr
- the expression.public boolean hasSqlInjection(String sql)
sql
- the sql stringpublic static String enforceEscapeCharacters(String value)
value
- the expression valueprotected abstract String getSqlCommandSeperator()
protected abstract String getSqlConcat()
protected abstract HashSet<String> getCommentExpressions()
Copyright © 2012. All Rights Reserved.