mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 11:45:46 +03:00
bug fix
This commit is contained in:
parent
fe67d3827c
commit
e355f92f22
|
@ -1109,7 +1109,7 @@ def __setConfAttributes():
|
|||
conf.trafficFP = None
|
||||
conf.wFileType = None
|
||||
|
||||
def __setKnowledgeBaseAttributes():
|
||||
def __setKnowledgeBaseAttributes(flushAll=True):
|
||||
"""
|
||||
This function set some needed attributes into the knowledge base
|
||||
singleton.
|
||||
|
@ -1158,7 +1158,6 @@ def __setKnowledgeBaseAttributes():
|
|||
kb.injection.parameter = None
|
||||
kb.injection.place = None
|
||||
kb.injections = []
|
||||
kb.keywords = set(getFileItems(paths.SQL_KEYWORDS))
|
||||
kb.lastErrorPage = None
|
||||
kb.lastQueryDuration = 0
|
||||
kb.lastRequestUID = 0
|
||||
|
@ -1188,8 +1187,6 @@ def __setKnowledgeBaseAttributes():
|
|||
kb.responseTimes = []
|
||||
kb.resumedQueries = {}
|
||||
kb.retriesCount = 0
|
||||
kb.tamperFunctions = []
|
||||
kb.targetUrls = set()
|
||||
kb.testedParams = set()
|
||||
kb.technique = None
|
||||
kb.testMode = False
|
||||
|
@ -1198,9 +1195,14 @@ def __setKnowledgeBaseAttributes():
|
|||
kb.unionCount = None
|
||||
kb.unionPosition = None
|
||||
kb.unionNegative = False
|
||||
kb.userAgents = None
|
||||
kb.valueStack = []
|
||||
|
||||
if flushAll:
|
||||
kb.keywords = set(getFileItems(paths.SQL_KEYWORDS))
|
||||
kb.tamperFunctions = []
|
||||
kb.targetUrls = set()
|
||||
kb.userAgents = None
|
||||
|
||||
def __saveCmdline():
|
||||
"""
|
||||
Saves the command line options on a sqlmap configuration INI file
|
||||
|
|
|
@ -26,6 +26,7 @@ from lib.core.enums import PLACE
|
|||
from lib.core.exception import sqlmapFilePathException
|
||||
from lib.core.exception import sqlmapGenericException
|
||||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.option import __setDBMS
|
||||
from lib.core.option import __setKnowledgeBaseAttributes
|
||||
from lib.core.session import resumeConfKb
|
||||
from lib.core.xmldump import dumper as xmldumper
|
||||
|
@ -275,7 +276,8 @@ def initTargetEnv():
|
|||
conf.parameters = {}
|
||||
conf.sessionFile = None
|
||||
|
||||
__setKnowledgeBaseAttributes()
|
||||
__setKnowledgeBaseAttributes(False)
|
||||
__setDBMS()
|
||||
|
||||
def setupTargetEnv():
|
||||
__createTargetDirs()
|
||||
|
|
Loading…
Reference in New Issue
Block a user