Skip to content

Commit efe41fb

Browse files
committed
1 parent 69bc875 commit efe41fb

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

lib/techniques/error/use.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from lib.core.enums import DBMS
3838
from lib.core.enums import HASHDB_KEYS
3939
from lib.core.enums import HTTP_HEADER
40+
from lib.core.exception import SqlmapDataException
4041
from lib.core.settings import CHECK_ZERO_COLUMNS_THRESHOLD
4142
from lib.core.settings import MIN_ERROR_CHUNK_LENGTH
4243
from lib.core.settings import MAX_ERROR_CHUNK_LENGTH
@@ -345,7 +346,14 @@ def errorUse(expression, dump=False):
345346
numThreads = min(conf.threads, (stopLimit - startLimit))
346347

347348
threadData = getCurrentThreadData()
348-
threadData.shared.limits = iter(xrange(startLimit, stopLimit))
349+
350+
try:
351+
threadData.shared.limits = iter(xrange(startLimit, stopLimit))
352+
except OverflowError:
353+
errMsg = "boundary limits (%d,%d) are too large. Please rerun " % (startLimit, stopLimit)
354+
errMsg += "with switch '--fresh-queries'"
355+
raise SqlmapDataException(errMsg)
356+
349357
threadData.shared.value = BigArray()
350358
threadData.shared.buffered = []
351359
threadData.shared.counter = 0

lib/techniques/union/use.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
from lib.core.dicts import FROM_DUMMY_TABLE
4444
from lib.core.enums import DBMS
4545
from lib.core.enums import PAYLOAD
46+
from lib.core.exception import SqlmapDataException
4647
from lib.core.exception import SqlmapSyntaxException
4748
from lib.core.settings import MAX_BUFFERED_PARTIAL_UNION_LENGTH
4849
from lib.core.settings import SQL_SCALAR_REGEX
@@ -231,7 +232,14 @@ def unionUse(expression, unpack=True, dump=False):
231232
return value
232233

233234
threadData = getCurrentThreadData()
234-
threadData.shared.limits = iter(xrange(startLimit, stopLimit))
235+
236+
try:
237+
threadData.shared.limits = iter(xrange(startLimit, stopLimit))
238+
except OverflowError:
239+
errMsg = "boundary limits (%d,%d) are too large. Please rerun " % (startLimit, stopLimit)
240+
errMsg += "with switch '--fresh-queries'"
241+
raise SqlmapDataException(errMsg)
242+
235243
numThreads = min(conf.threads, (stopLimit - startLimit))
236244
threadData.shared.value = BigArray()
237245
threadData.shared.buffered = []

0 commit comments

Comments
 (0)