minor refactoring

This commit is contained in:
Miroslav Stampar 2011-05-10 20:44:36 +00:00
parent 97bc816aeb
commit deae534ee7
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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))

View File

@ -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

View File

@ -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):
''' '''