()
Resume stored data values from HashDB
Resume stored data values from HashDB
Resume stored data values from HashDB
def _resumeHashDBValues():
    """
    Resume stored data values from HashDB
    """

    kb.absFilePaths = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True) or kb.absFilePaths
    kb.brute.tables = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_TABLES, True) or kb.brute.tables
    kb.brute.columns = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_COLUMNS, True) or kb.brute.columns
    kb.chars = hashDBRetrieve(HASHDB_KEYS.KB_CHARS, True) or kb.chars
    kb.dynamicMarkings = hashDBRetrieve(HASHDB_KEYS.KB_DYNAMIC_MARKINGS, True) or kb.dynamicMarkings
    kb.xpCmdshellAvailable = hashDBRetrieve(HASHDB_KEYS.KB_XP_CMDSHELL_AVAILABLE) or kb.xpCmdshellAvailable

    kb.errorChunkLength = hashDBRetrieve(HASHDB_KEYS.KB_ERROR_CHUNK_LENGTH)
    if kb.errorChunkLength and kb.errorChunkLength.isdigit():
        kb.errorChunkLength = int(kb.errorChunkLength)
    else:
        kb.errorChunkLength = None

    conf.tmpPath = conf.tmpPath or hashDBRetrieve(HASHDB_KEYS.CONF_TMP_PATH)

    for injection in hashDBRetrieve(HASHDB_KEYS.KB_INJECTIONS, True) or []:
        if isinstance(injection, InjectionDict) and injection.place in conf.paramDict and \
            injection.parameter in conf.paramDict[injection.place]:

            if not conf.tech or intersect(conf.tech, injection.data.keys()):
                if intersect(conf.tech, injection.data.keys()):
                    injection.data = dict(filter(lambda (key, item): key in conf.tech, injection.data.items()))

                if injection not in kb.injections:
                    kb.injections.append(injection)

    _resumeDBMS()
    _resumeOS()
def _resumeHashDBValues ( ) : kb . absFilePaths = hashDBRetrieve ( HASHDB_KEYS . KB_ABS_FILE_PATHS , True ) or kb . absFilePaths kb . brute . tables = hashDBRetrieve ( HASHDB_KEYS . KB_BRUTE_TABLES , True ) or kb . brute . tables kb . brute . columns = hashDBRetrieve ( HASHDB_KEYS . KB_BRUTE_COLUMNS , True ) or kb . brute . columns kb . chars = hashDBRetrieve ( HASHDB_KEYS . KB_CHARS , True ) or kb . chars kb . dynamicMarkings = hashDBRetrieve ( HASHDB_KEYS . KB_DYNAMIC_MARKINGS , True ) or kb . dynamicMarkings kb . xpCmdshellAvailable = hashDBRetrieve ( HASHDB_KEYS . KB_XP_CMDSHELL_AVAILABLE ) or kb . xpCmdshellAvailable kb . errorChunkLength = hashDBRetrieve ( HASHDB_KEYS . KB_ERROR_CHUNK_LENGTH ) if kb . errorChunkLength and kb . errorChunkLength . isdigit ( ) : kb . errorChunkLength = int ( kb . errorChunkLength ) else : kb . errorChunkLength = None conf . tmpPath = conf . tmpPath or hashDBRetrieve ( HASHDB_KEYS . CONF_TMP_PATH ) for injection in hashDBRetrieve ( HASHDB_KEYS . KB_INJECTIONS , True ) or [ ] : if isinstance ( injection , InjectionDict ) and injection . place in conf . paramDict and injection . parameter in conf . paramDict [ injection . place ] : if not conf . tech or intersect ( conf . tech , injection . data . keys ( ) ) : if intersect ( conf . tech , injection . data . keys ( ) ) : injection . data = dict ( filter ( lambda ( key , item ) : key in conf . tech , injection . data . items ( ) ) ) if injection not in kb . injections : kb . injections . append ( injection ) _resumeDBMS ( ) _resumeOS ( )