Skip to content

Commit

Permalink
Minor improvements on code readability and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
andresriancho committed Apr 17, 2017
1 parent c85876e commit 9eed6dc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions w3af/core/controllers/sql_tools/blind_sqli_response_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ def _remove_all_special_chars(self, sql_statement):

# escape double white spaces, not sure if this has any logical value
# in the search engine, but just in case...
while ' ' in sql_statement:
sql_statement = sql_statement.replace(' ', ' ')
double_spaces = ' '
while double_spaces in sql_statement:
sql_statement = sql_statement.replace(double_spaces, ' ')

return sql_statement

Expand All @@ -142,11 +143,10 @@ def _find_bsql(self, mutant, statement_tuple, statement_type):
_, body_false_response = send_clean(mutant)

if body_true_response == body_false_response:
#
# There is NO CHANGE between the true and false responses.
# NO WAY I'm going to detect a blind SQL injection using
# response diffs in this case.
#
msg = ('There is NO CHANGE between the true and false responses.'
' NO WAY w3af is going to detect a blind SQL injection'
' using response diffs in this case.')
self.debug(msg)
return None

compare_diff = False
Expand Down

0 comments on commit 9eed6dc

Please sign in to comment.