mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor code consistency patch
This commit is contained in:
parent
1f5e6606a7
commit
2c2f83f67b
|
@ -64,11 +64,11 @@ def _oneShotErrorUse(expression, field=None):
|
||||||
threadData.resumed = retVal is not None and not partialValue
|
threadData.resumed = retVal is not None and not partialValue
|
||||||
|
|
||||||
if Backend.isDbms(DBMS.MYSQL):
|
if Backend.isDbms(DBMS.MYSQL):
|
||||||
chunk_length = MYSQL_ERROR_CHUNK_LENGTH
|
chunkLength = MYSQL_ERROR_CHUNK_LENGTH
|
||||||
elif Backend.isDbms(DBMS.MSSQL):
|
elif Backend.isDbms(DBMS.MSSQL):
|
||||||
chunk_length = MSSQL_ERROR_CHUNK_LENGTH
|
chunkLength = MSSQL_ERROR_CHUNK_LENGTH
|
||||||
else:
|
else:
|
||||||
chunk_length = None
|
chunkLength = None
|
||||||
|
|
||||||
if retVal is None or partialValue:
|
if retVal is None or partialValue:
|
||||||
try:
|
try:
|
||||||
|
@ -84,7 +84,7 @@ def _oneShotErrorUse(expression, field=None):
|
||||||
if extendedField != field: # e.g. MIN(surname)
|
if extendedField != field: # e.g. MIN(surname)
|
||||||
nulledCastedField = extendedField.replace(field, nulledCastedField)
|
nulledCastedField = extendedField.replace(field, nulledCastedField)
|
||||||
field = extendedField
|
field = extendedField
|
||||||
nulledCastedField = queries[Backend.getIdentifiedDbms()].substring.query % (nulledCastedField, offset, chunk_length)
|
nulledCastedField = queries[Backend.getIdentifiedDbms()].substring.query % (nulledCastedField, offset, chunkLength)
|
||||||
|
|
||||||
# Forge the error-based SQL injection request
|
# Forge the error-based SQL injection request
|
||||||
vector = kb.injection.data[kb.technique].vector
|
vector = kb.injection.data[kb.technique].vector
|
||||||
|
@ -146,8 +146,8 @@ def _oneShotErrorUse(expression, field=None):
|
||||||
else:
|
else:
|
||||||
retVal += output if output else ''
|
retVal += output if output else ''
|
||||||
|
|
||||||
if output and len(output) >= chunk_length:
|
if output and len(output) >= chunkLength:
|
||||||
offset += chunk_length
|
offset += chunkLength
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user