mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Fixes #3739
This commit is contained in:
@@ -36,6 +36,7 @@ from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.data import paths
|
||||
from lib.core.data import queries
|
||||
from lib.core.enums import MKSTEMP_PREFIX
|
||||
from lib.core.exception import SqlmapBaseException
|
||||
from lib.core.exception import SqlmapNotVulnerableException
|
||||
@@ -183,6 +184,27 @@ def smokeTest():
|
||||
status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
|
||||
dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
|
||||
|
||||
def _(node):
|
||||
for __ in dir(node):
|
||||
if not __.startswith('_'):
|
||||
candidate = getattr(node, __)
|
||||
if isinstance(candidate, str):
|
||||
if '\\' in candidate:
|
||||
try:
|
||||
re.compile(candidate)
|
||||
except:
|
||||
errMsg = "smoke test failed at compiling '%s'" % candidate
|
||||
logger.error(errMsg)
|
||||
raise
|
||||
else:
|
||||
_(candidate)
|
||||
|
||||
for dbms in queries:
|
||||
try:
|
||||
_(queries[dbms])
|
||||
except:
|
||||
retVal = False
|
||||
|
||||
clearConsoleLine()
|
||||
if retVal:
|
||||
logger.info("smoke test final result: PASSED")
|
||||
|
||||
Reference in New Issue
Block a user