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

Skip to content

Commit 77e1b99

Browse files
committed
Fixes #3739
1 parent 98582d5 commit 77e1b99

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

data/xml/queries.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@
421421
<length query="CHAR_LENGTH(TRIM(%s))"/>
422422
<delimiter query="||"/>
423423
<limit query="ROWS %d TO %d"/>
424-
<limitregexp query="\s+ROWS\s+([\d]+)(\s+\TO\s+([\d]+))?"/>
424+
<limitregexp query="\s+ROWS\s+([\d]+)(\s+TO\s+([\d]+))?"/>
425425
<limitgroupstart query="1"/>
426426
<limitgroupstop query="2"/>
427427
<limitstring query=" ROWS "/>

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.6.16"
21+
VERSION = "1.3.6.17"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/core/testing.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from lib.core.data import kb
3737
from lib.core.data import logger
3838
from lib.core.data import paths
39+
from lib.core.data import queries
3940
from lib.core.enums import MKSTEMP_PREFIX
4041
from lib.core.exception import SqlmapBaseException
4142
from lib.core.exception import SqlmapNotVulnerableException
@@ -183,6 +184,27 @@ def smokeTest():
183184
status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
184185
dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
185186

187+
def _(node):
188+
for __ in dir(node):
189+
if not __.startswith('_'):
190+
candidate = getattr(node, __)
191+
if isinstance(candidate, str):
192+
if '\\' in candidate:
193+
try:
194+
re.compile(candidate)
195+
except:
196+
errMsg = "smoke test failed at compiling '%s'" % candidate
197+
logger.error(errMsg)
198+
raise
199+
else:
200+
_(candidate)
201+
202+
for dbms in queries:
203+
try:
204+
_(queries[dbms])
205+
except:
206+
retVal = False
207+
186208
clearConsoleLine()
187209
if retVal:
188210
logger.info("smoke test final result: PASSED")

0 commit comments

Comments
 (0)