Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a4f2139

Browse files
committed
Fixes #1760
1 parent e03b2df commit a4f2139

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

lib/core/common.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
from lib.core.settings import PAYLOAD_DELIMITER
129129
from lib.core.settings import PLATFORM
130130
from lib.core.settings import PRINTABLE_CHAR_REGEX
131+
from lib.core.settings import PUSH_VALUE_EXCEPTION_RETRY_COUNT
131132
from lib.core.settings import PYVERSION
132133
from lib.core.settings import REFERER_ALIASES
133134
from lib.core.settings import REFLECTED_BORDER_REGEX
@@ -2183,7 +2184,22 @@ def pushValue(value):
21832184
Push value to the stack (thread dependent)
21842185
"""
21852186

2186-
getCurrentThreadData().valueStack.append(copy.deepcopy(value))
2187+
_ = None
2188+
success = False
2189+
2190+
for i in xrange(PUSH_VALUE_EXCEPTION_RETRY_COUNT):
2191+
try:
2192+
getCurrentThreadData().valueStack.append(copy.deepcopy(value))
2193+
success = True
2194+
break
2195+
except Exception, ex:
2196+
_ = ex
2197+
2198+
if not success:
2199+
getCurrentThreadData().valueStack.append(None)
2200+
2201+
if _:
2202+
raise _
21872203

21882204
def popValue():
21892205
"""

lib/core/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from lib.core.revision import getRevisionNumber
2121

2222
# sqlmap version and site
23-
VERSION = "1.0.0.21"
23+
VERSION = "1.0.0.22"
2424
REVISION = getRevisionNumber()
2525
STABLE = VERSION.count('.') <= 2
2626
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
@@ -139,6 +139,9 @@
139139
# Suffix used for naming meta databases in DBMS(es) without explicit database name
140140
METADB_SUFFIX = "_masterdb"
141141

142+
# Number of times to retry the pushValue during the exceptions (e.g. KeyboardInterrupt)
143+
PUSH_VALUE_EXCEPTION_RETRY_COUNT = 3
144+
142145
# Minimum time response set needed for time-comparison based on standard deviation
143146
MIN_TIME_RESPONSES = 30
144147

0 commit comments

Comments
 (0)