mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
minor refactoring
This commit is contained in:
parent
97bc816aeb
commit
deae534ee7
|
@ -457,8 +457,8 @@ def start():
|
||||||
|
|
||||||
if not conf.string and not conf.regexp:
|
if not conf.string and not conf.regexp:
|
||||||
errMsg += " Rerun by providing either a valid --string "
|
errMsg += " Rerun by providing either a valid --string "
|
||||||
errMsg += "or a valid --regexp, refer to the user's "
|
errMsg += "or a valid --regexp (refer to the user's "
|
||||||
errMsg += "manual for details"
|
errMsg += "manual for details)"
|
||||||
elif conf.string:
|
elif conf.string:
|
||||||
errMsg += " Rerun by providing a valid --string, perhaps "
|
errMsg += " Rerun by providing a valid --string, perhaps "
|
||||||
errMsg += "the string that you have choosen does not match "
|
errMsg += "the string that you have choosen does not match "
|
||||||
|
@ -530,7 +530,7 @@ def start():
|
||||||
finally:
|
finally:
|
||||||
showHttpErrorCodes()
|
showHttpErrorCodes()
|
||||||
|
|
||||||
if conf.loggedToOut and not conf.multipleTargets:
|
if kb.dataOutputFlag and not conf.multipleTargets:
|
||||||
logger.info("Fetched data logged to text files under '%s'" % conf.outputPath)
|
logger.info("Fetched data logged to text files under '%s'" % conf.outputPath)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Dump:
|
||||||
self.__outputFP.write(text)
|
self.__outputFP.write(text)
|
||||||
self.__outputFP.flush()
|
self.__outputFP.flush()
|
||||||
|
|
||||||
conf.loggedToOut = True
|
kb.dataOutputFlag = True
|
||||||
|
|
||||||
def __formatString(self, inpStr):
|
def __formatString(self, inpStr):
|
||||||
return restoreDumpMarkedChars(getUnicode(inpStr))
|
return restoreDumpMarkedChars(getUnicode(inpStr))
|
||||||
|
|
|
@ -1270,7 +1270,6 @@ def __setConfAttributes():
|
||||||
conf.dumpPath = None
|
conf.dumpPath = None
|
||||||
conf.httpHeaders = []
|
conf.httpHeaders = []
|
||||||
conf.hostname = None
|
conf.hostname = None
|
||||||
conf.loggedToOut = None
|
|
||||||
conf.multipleTargets = False
|
conf.multipleTargets = False
|
||||||
conf.outputPath = None
|
conf.outputPath = None
|
||||||
conf.paramDict = {}
|
conf.paramDict = {}
|
||||||
|
@ -1309,8 +1308,8 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.cache.stdev = {}
|
kb.cache.stdev = {}
|
||||||
|
|
||||||
kb.commonOutputs = None
|
kb.commonOutputs = None
|
||||||
|
|
||||||
kb.data = advancedDict()
|
kb.data = advancedDict()
|
||||||
|
kb.dataOutputFlag = False
|
||||||
|
|
||||||
# Active back-end DBMS fingerprint
|
# Active back-end DBMS fingerprint
|
||||||
kb.dbms = None
|
kb.dbms = None
|
||||||
|
|
|
@ -14,6 +14,7 @@ from extra.prettyprint import prettyprint
|
||||||
from lib.core.common import getUnicode
|
from lib.core.common import getUnicode
|
||||||
from lib.core.common import restoreDumpMarkedChars
|
from lib.core.common import restoreDumpMarkedChars
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
|
from lib.core.data import kb
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
from lib.core.exception import sqlmapFilePathException
|
from lib.core.exception import sqlmapFilePathException
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
|
@ -104,7 +105,7 @@ class XMLDump:
|
||||||
|
|
||||||
self.__outputFP.flush()
|
self.__outputFP.flush()
|
||||||
|
|
||||||
conf.loggedToOut = True
|
kb.dataOutputFlag = True
|
||||||
|
|
||||||
def __getRootChild(self,elemName):
|
def __getRootChild(self,elemName):
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user