(injection)
return retVal
This functions is called when boolean-based blind is identified with a
    generic payload and the DBMS has not yet been fingerprinted to attempt
    to identify with a simple DBMS specific boolean-based test what the DBMS
    may be
This functions is called when boolean-based blind is identified with a
    generic payload and the DBMS has not yet been fingerprinted to attempt
    to identify with a simple DBMS specific boolean-based test what the DBMS
    may be
This functions is called when boolean - based blind is identified with a generic payload and the DBMS has not yet been fingerprinted to attempt to identify with a simple DBMS specific boolean - based test what the DBMS may be
def heuristicCheckDbms(injection):
    """
    This functions is called when boolean-based blind is identified with a
    generic payload and the DBMS has not yet been fingerprinted to attempt
    to identify with a simple DBMS specific boolean-based test what the DBMS
    may be
    """
    retVal = False

    pushValue(kb.injection)
    kb.injection = injection

    for dbms in getPublicTypeMembers(DBMS, True):
        if not FROM_DUMMY_TABLE.get(dbms, ""):
            continue

        randStr1, randStr2 = randomStr(), randomStr()
        Backend.forceDbms(dbms)

        if checkBooleanExpression("(SELECT '%s'%s)='%s'" % (randStr1, FROM_DUMMY_TABLE.get(dbms, ""), randStr1)):
            if not checkBooleanExpression("(SELECT '%s'%s)='%s'" % (randStr1, FROM_DUMMY_TABLE.get(dbms, ""), randStr2)):
                retVal = dbms
                break

    Backend.flushForcedDbms()
    kb.injection = popValue()

    if retVal:
        infoMsg = "heuristic (extended) test shows that the back-end DBMS "  # Not as important as "parsing" counter-part (because of false-positives)
        infoMsg += "could be '%s' " % retVal
        logger.info(infoMsg)

    return retVal
def heuristicCheckDbms ( injection ) : retVal = False pushValue ( kb . injection ) kb . injection = injection for dbms in getPublicTypeMembers ( DBMS , True ) : if not FROM_DUMMY_TABLE . get ( dbms , "" ) : continue randStr1 , randStr2 = randomStr ( ) , randomStr ( ) Backend . forceDbms ( dbms ) if checkBooleanExpression ( "(SELECT '%s'%s)='%s'" % ( randStr1 , FROM_DUMMY_TABLE . get ( dbms , "" ) , randStr1 ) ) : if not checkBooleanExpression ( "(SELECT '%s'%s)='%s'" % ( randStr1 , FROM_DUMMY_TABLE . get ( dbms , "" ) , randStr2 ) ) : retVal = dbms break Backend . flushForcedDbms ( ) kb . injection = popValue ( ) if retVal : infoMsg = "heuristic (extended) test shows that the back-end DBMS " # Not as important as "parsing" counter-part (because of false-positives) infoMsg += "could be '%s' " % retVal logger . info ( infoMsg ) return retVal