Some more preparing for 2to3 (keys() is iter in 3)

This commit is contained in:
Miroslav Stampar
2019-01-22 03:00:44 +01:00
parent 1adc66b763
commit 8f13bda035
14 changed files with 37 additions and 37 deletions

View File

@@ -615,7 +615,7 @@ def checkSqlInjection(place, parameter, value):
page, headers, _ = Request.queryPage(reqPayload, place, content=True, raise404=False)
output = extractRegexResult(check, page, re.DOTALL | re.IGNORECASE)
output = output or extractRegexResult(check, threadData.lastHTTPError[2] if wasLastResponseHTTPError() else None, re.DOTALL | re.IGNORECASE)
output = output or extractRegexResult(check, listToStrValue((headers[key] for key in headers.keys() if key.lower() != URI_HTTP_HEADER.lower()) if headers else None), re.DOTALL | re.IGNORECASE)
output = output or extractRegexResult(check, listToStrValue((headers[key] for key in headers if key.lower() != URI_HTTP_HEADER.lower()) if headers else None), re.DOTALL | re.IGNORECASE)
output = output or extractRegexResult(check, threadData.lastRedirectMsg[1] if threadData.lastRedirectMsg and threadData.lastRedirectMsg[0] == threadData.lastRequestUID else None, re.DOTALL | re.IGNORECASE)
if output:

View File

@@ -90,7 +90,7 @@ def _selectInjection():
if point not in points:
points[point] = injection
else:
for key in points[point].keys():
for key in points[point]:
if key != 'data':
points[point][key] = points[point][key] or injection[key]
points[point]['data'].update(injection['data'])
@@ -244,7 +244,7 @@ def _saveToResultsFile():
if key not in results:
results[key] = []
results[key].extend(injection.data.keys())
results[key].extend(list(injection.data.keys()))
try:
for key, value in results.items():
@@ -427,7 +427,7 @@ def start():
checkStability()
# Do a little prioritization reorder of a testable parameter list
parameters = conf.parameters.keys()
parameters = list(conf.parameters.keys())
# Order of testing list (first to last)
orderList = (PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER, PLACE.URI, PLACE.POST, PLACE.GET)