mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-02-01 11:09:09 +00:00
minor improvements regarding data retrieval through DNS channel
This commit is contained in:
@@ -1599,9 +1599,9 @@ def parseXmlFile(xmlFile, handler):
|
||||
parse(stream, handler)
|
||||
stream.close()
|
||||
|
||||
def getSPLSnippet(dbms, name, **variables):
|
||||
def getSPQLSnippet(dbms, name, **variables):
|
||||
"""
|
||||
Returns content of SPL snippet located inside "procs" directory
|
||||
Returns content of SP(Q)L snippet located inside "procs" directory
|
||||
"""
|
||||
|
||||
filename = os.path.join(paths.SQLMAP_PROCS_PATH, DBMS_DIRECTORY_DICT[dbms], "%s.txt" % name)
|
||||
|
||||
@@ -1438,6 +1438,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||
kb.delayCandidates = TIME_DELAY_CANDIDATES * [0]
|
||||
kb.dep = None
|
||||
kb.dnsMode = False
|
||||
kb.dnsTest = None
|
||||
kb.docRoot = None
|
||||
kb.dumpMode = False
|
||||
kb.dynamicMarkings = []
|
||||
|
||||
@@ -92,6 +92,13 @@ def exceptionHandledFunction(threadFunction):
|
||||
print
|
||||
logger.error("thread %s: %s" % (threading.currentThread().getName(), errMsg))
|
||||
|
||||
def setDaemon(thread):
|
||||
# Reference: http://stackoverflow.com/questions/190010/daemon-threads-explanation
|
||||
if PYVERSION >= "2.6":
|
||||
thread.daemon = True
|
||||
else:
|
||||
thread.setDaemon(True)
|
||||
|
||||
def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardException=True, threadChoice=False, startThreadMsg=True):
|
||||
threads = []
|
||||
|
||||
@@ -128,11 +135,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
|
||||
for numThread in xrange(numThreads):
|
||||
thread = threading.Thread(target=exceptionHandledFunction, name=str(numThread), args=[threadFunction])
|
||||
|
||||
# Reference: http://stackoverflow.com/questions/190010/daemon-threads-explanation
|
||||
if PYVERSION >= "2.6":
|
||||
thread.daemon = True
|
||||
else:
|
||||
thread.setDaemon(True)
|
||||
setDaemon(thread)
|
||||
|
||||
try:
|
||||
thread.start()
|
||||
|
||||
Reference in New Issue
Block a user