|
| None | __init__ (self, int error=84, int success=0, bool debug=False) |
| |
| bool | check_if_symbol_sql_injection (self, Union[str, List[str]] string) |
| |
| bool | check_if_command_sql_injection (self, Union[str, List[str]] string) |
| |
| bool | check_if_logic_gate_sql_injection (self, Union[str, List[str]] string) |
| |
| bool | check_if_symbol_and_command_injection (self, Union[str, List[str]] string) |
| |
| bool | check_if_symbol_and_logic_gate_injection (self, Union[str, List[str]] string) |
| |
| bool | check_if_command_and_logic_gate_injection (self, Union[str, List[str]] string) |
| |
| bool | check_if_sql_injection (self, Union[str, List[str]] string) |
| |
| bool | check_if_injections_in_strings (self, Union[str, List[str], List[List[str]]] array_of_strings) |
| |
| int | run_test (self, str title, List[str] array, object function, bool expected_response=False, int global_status=0) |
| |
| int | test_injection_class (self) |
| |
|
| bool | debug = debug |
| |
| int | error = error |
| |
| int | success = success |
| |
| Disp | disp |
| |
| tuple | injection_err = (-1) |
| |
| str | injection_message = "Injection attempt detected" |
| |
| list | symbols = [';', '--', '/*', '*/'] |
| |
| list | keywords |
| |
| List[str] | command = self.keywords |
| |
| list | logic_gates = ['OR', 'AND', 'NOT'] |
| |
| list | all = [] |
| |
| str | symbols = "(check_if_symbol_sql_injection) string must be a string or a List of strings" |
| |
| str | keywords = "(check_if_command_sql_injection) string must be a string or a List of strings" |
| |
| str | logic_gates = "(check_if_logic_gate_sql_injection) string must be a string or a List of strings" |
| |
| str | all = "(check_if_sql_injection) string must be a string or a List of strings" |
| |
Check if an sql injection is present
Definition at line 16 of file sql_injection.py.
◆ __init__()
| None src.lib.sql.sql_injection.SQLInjection.__init__ |
( |
| self, |
|
|
int | error = 84, |
|
|
int | success = 0, |
|
|
bool | debug = False ) |
◆ _is_base64()
| bool src.lib.sql.sql_injection.SQLInjection._is_base64 |
( |
| self, |
|
|
str | string ) |
|
protected |
◆ _perror()
| None src.lib.sql.sql_injection.SQLInjection._perror |
( |
| self, |
|
|
str | string = "" ) |
|
protected |
◆ check_if_command_and_logic_gate_injection()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_command_and_logic_gate_injection |
( |
| self, |
|
|
Union[str, List[str]] | string ) |
Check if command and logic gates are the source of the injection
Definition at line 144 of file sql_injection.py.
◆ check_if_command_sql_injection()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_command_sql_injection |
( |
| self, |
|
|
Union[str, List[str]] | string ) |
◆ check_if_injections_in_strings()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_injections_in_strings |
( |
| self, |
|
|
Union[str, List[str], List[List[str]]] | array_of_strings ) |
Check if there is an injection in the provided array of strings
Definition at line 171 of file sql_injection.py.
◆ check_if_logic_gate_sql_injection()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_logic_gate_sql_injection |
( |
| self, |
|
|
Union[str, List[str]] | string ) |
◆ check_if_sql_injection()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_sql_injection |
( |
| self, |
|
|
Union[str, List[str]] | string ) |
Check if there is an sql injection, uses all the parameters
Definition at line 152 of file sql_injection.py.
◆ check_if_symbol_and_command_injection()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_symbol_and_command_injection |
( |
| self, |
|
|
Union[str, List[str]] | string ) |
Check if symbols and commands are the source of the injection
Definition at line 128 of file sql_injection.py.
◆ check_if_symbol_and_logic_gate_injection()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_symbol_and_logic_gate_injection |
( |
| self, |
|
|
Union[str, List[str]] | string ) |
Check if symbols and logic gates are the source of the injection
Definition at line 136 of file sql_injection.py.
◆ check_if_symbol_sql_injection()
| bool src.lib.sql.sql_injection.SQLInjection.check_if_symbol_sql_injection |
( |
| self, |
|
|
Union[str, List[str]] | string ) |
Check if symbols are the source of the injection
Definition at line 59 of file sql_injection.py.
◆ run_test()
| int src.lib.sql.sql_injection.SQLInjection.run_test |
( |
| self, |
|
|
str | title, |
|
|
List[str] | array, |
|
|
object | function, |
|
|
bool | expected_response = False, |
|
|
int | global_status = 0 ) |
◆ test_injection_class()
| int src.lib.sql.sql_injection.SQLInjection.test_injection_class |
( |
| self | ) |
|
◆ all [1/2]
| list src.lib.sql.sql_injection.SQLInjection.all = [] |
◆ all [2/2]
| str src.lib.sql.sql_injection.SQLInjection.all = "(check_if_sql_injection) string must be a string or a List of strings" |
◆ command
| List[str] src.lib.sql.sql_injection.SQLInjection.command = self.keywords |
◆ debug
| bool src.lib.sql.sql_injection.SQLInjection.debug = debug |
◆ disp
| Disp src.lib.sql.sql_injection.SQLInjection.disp |
Initial value:= Disp(
TOML_CONF,
SAVE_TO_FILE,
FILE_NAME,
self.debug,
logger=self.__class__.__name__
)
Definition at line 25 of file sql_injection.py.
◆ error
| int src.lib.sql.sql_injection.SQLInjection.error = error |
◆ injection_err
| tuple src.lib.sql.sql_injection.SQLInjection.injection_err = (-1) |
◆ injection_message
| str src.lib.sql.sql_injection.SQLInjection.injection_message = "Injection attempt detected" |
◆ keywords [1/2]
| src.lib.sql.sql_injection.SQLInjection.keywords |
Initial value:= [
'SELECT', 'INSERT', 'UPDATE', 'DELETE',
'DROP', 'CREATE', 'ALTER', 'TABLE', 'UNION', 'JOIN', 'WHERE'
]
Definition at line 36 of file sql_injection.py.
◆ keywords [2/2]
| str src.lib.sql.sql_injection.SQLInjection.keywords = "(check_if_command_sql_injection) string must be a string or a List of strings" |
◆ logic_gates [1/2]
| list src.lib.sql.sql_injection.SQLInjection.logic_gates = ['OR', 'AND', 'NOT'] |
◆ logic_gates [2/2]
| str src.lib.sql.sql_injection.SQLInjection.logic_gates = "(check_if_logic_gate_sql_injection) string must be a string or a List of strings" |
◆ success
| int src.lib.sql.sql_injection.SQLInjection.success = success |
◆ symbols [1/2]
| src.lib.sql.sql_injection.SQLInjection.symbols = [';', '--', '/*', '*/'] |
◆ symbols [2/2]
| str src.lib.sql.sql_injection.SQLInjection.symbols = "(check_if_symbol_sql_injection) string must be a string or a List of strings" |
The documentation for this class was generated from the following file: