speed optimization and bug fix (kb.absFilePaths were not stored previously; also, they are now extracted only in heuristic phase)

This commit is contained in:
Miroslav Stampar
2011-11-22 08:39:13 +00:00
parent 493e436e16
commit 2ed3efba12
6 changed files with 49 additions and 20 deletions

View File

@@ -17,6 +17,7 @@ from lib.core.common import dataToSessionFile
from lib.core.common import intersect
from lib.core.common import paramToDict
from lib.core.common import readInput
from lib.core.common import unserializeObject
from lib.core.convert import urldecode
from lib.core.data import cmdLineOptions
from lib.core.data import conf
@@ -177,6 +178,7 @@ def __setHashDB():
"""
Check and set the HashDB SQLite file for query resume functionality.
"""
if not conf.hashDBFile:
conf.hashDBFile = "%s%shashdb" % (conf.outputPath, os.sep)
@@ -191,6 +193,13 @@ def __setHashDB():
conf.hashDB = HashDB(conf.hashDBFile)
def __resumeHashDBValues():
"""
Resume stored data values from HashDB
"""
kb.absFilePaths = unserializeObject(conf.hashDB.retrieve("kb.absFilePaths")) or kb.absFilePaths
def __setOutputResume():
"""
Check and set the output text file and the resume functionality.
@@ -383,4 +392,5 @@ def setupTargetEnv():
__setRequestParams()
__setOutputResume()
__setHashDB()
__resumeHashDBValues()
__setResultsFile()