mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
some refactoring
This commit is contained in:
@@ -21,6 +21,7 @@ import urlparse
|
||||
import ntpath
|
||||
import posixpath
|
||||
import subprocess
|
||||
import threading
|
||||
|
||||
from ConfigParser import DEFAULTSECT
|
||||
from ConfigParser import RawConfigParser
|
||||
@@ -1533,14 +1534,17 @@ def pushValue(value):
|
||||
Push value to the stack
|
||||
"""
|
||||
|
||||
kb.valueStack.append(value)
|
||||
threadId = threading.currentThread().ident
|
||||
if threadId not in kb.valueStack:
|
||||
kb.valueStack[threadId] = []
|
||||
kb.valueStack[threadId].append(value)
|
||||
|
||||
def popValue():
|
||||
"""
|
||||
Pop value from the stack
|
||||
"""
|
||||
|
||||
return kb.valueStack.pop()
|
||||
return kb.valueStack[threading.currentThread().ident].pop()
|
||||
|
||||
def wasLastRequestDBMSError():
|
||||
"""
|
||||
|
||||
@@ -1118,7 +1118,6 @@ def __setConfAttributes():
|
||||
conf.sessionFP = None
|
||||
conf.start = True
|
||||
conf.tests = []
|
||||
conf.threadContinue = True
|
||||
conf.threadException = False
|
||||
conf.trafficFP = None
|
||||
conf.wFileType = None
|
||||
@@ -1198,11 +1197,12 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||
kb.technique = None
|
||||
kb.testMode = False
|
||||
kb.testQueryCount = 0
|
||||
kb.threadContinue = True
|
||||
kb.unionComment = ""
|
||||
kb.unionCount = None
|
||||
kb.unionPosition = None
|
||||
kb.unionNegative = False
|
||||
kb.valueStack = []
|
||||
kb.valueStack = {}
|
||||
|
||||
if flushAll:
|
||||
kb.keywords = set(getFileItems(paths.SQL_KEYWORDS))
|
||||
|
||||
Reference in New Issue
Block a user