()
return kb.pageStable
This function checks if the URL content is stable requesting the
    same page two times with a small delay within each request to
    assume that it is stable.

    In case the content of the page differs when requesting
    the same page, the dynamicity might depend on other parameters,
    like for instance string matching (--string).
This function checks if the URL content is stable requesting the
    same page two times with a small delay within each request to
    assume that it is stable.
This function checks if the URL content is stable requesting the same page two times with a small delay within each request to assume that it is stable .
def checkStability():
    """
    This function checks if the URL content is stable requesting the
    same page two times with a small delay within each request to
    assume that it is stable.

    In case the content of the page differs when requesting
    the same page, the dynamicity might depend on other parameters,
    like for instance string matching (--string).
    """

    infoMsg = "testing if the target URL is stable"
    logger.info(infoMsg)

    firstPage = kb.originalPage  # set inside checkConnection()

    delay = 1 - (time.time() - (kb.originalPageTime or 0))
    delay = max(0, min(1, delay))
    time.sleep(delay)

    secondPage, _ = Request.queryPage(content=True, raise404=False)

    if kb.redirectChoice:
        return None

    kb.pageStable = (firstPage == secondPage)

    if kb.pageStable:
        if firstPage:
            infoMsg = "target URL is stable"
            logger.info(infoMsg)
        else:
            errMsg = "there was an error checking the stability of page "
            errMsg += "because of lack of content. Please check the "
            errMsg += "page request results (and probable errors) by "
            errMsg += "using higher verbosity levels"
            logger.error(errMsg)

    else:
        warnMsg = "target URL is not stable. sqlmap will base the page "
        warnMsg += "comparison on a sequence matcher. If no dynamic nor "
        warnMsg += "injectable parameters are detected, or in case of "
        warnMsg += "junk results, refer to user's manual paragraph "
        warnMsg += "'Page comparison' and provide a string or regular "
        warnMsg += "expression to match on"
        logger.warn(warnMsg)

        message = "how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] "
        test = readInput(message, default="C")

        if test and test[0] in ("q", "Q"):
            raise SqlmapUserQuitException

        elif test and test[0] in ("s", "S"):
            showStaticWords(firstPage, secondPage)

            message = "please enter value for parameter 'string': "
            test = readInput(message)

            if test:
                conf.string = test

                if kb.nullConnection:
                    debugMsg = "turning off NULL connection "
                    debugMsg += "support because of string checking"
                    logger.debug(debugMsg)

                    kb.nullConnection = None
            else:
                errMsg = "Empty value supplied"
                raise SqlmapNoneDataException(errMsg)

        elif test and test[0] in ("r", "R"):
            message = "please enter value for parameter 'regex': "
            test = readInput(message)

            if test:
                conf.regex = test

                if kb.nullConnection:
                    debugMsg = "turning off NULL connection "
                    debugMsg += "support because of regex checking"
                    logger.debug(debugMsg)

                    kb.nullConnection = None
            else:
                errMsg = "Empty value supplied"
                raise SqlmapNoneDataException(errMsg)

        else:
            checkDynamicContent(firstPage, secondPage)

    return kb.pageStable
def checkStability ( ) : infoMsg = "testing if the target URL is stable" logger . info ( infoMsg ) firstPage = kb . originalPage # set inside checkConnection() delay = 1 - ( time . time ( ) - ( kb . originalPageTime or 0 ) ) delay = max ( 0 , min ( 1 , delay ) ) time . sleep ( delay ) secondPage , _ = Request . queryPage ( content = True , raise404 = False ) if kb . redirectChoice : return None kb . pageStable = ( firstPage == secondPage ) if kb . pageStable : if firstPage : infoMsg = "target URL is stable" logger . info ( infoMsg ) else : errMsg = "there was an error checking the stability of page " errMsg += "because of lack of content. Please check the " errMsg += "page request results (and probable errors) by " errMsg += "using higher verbosity levels" logger . error ( errMsg ) else : warnMsg = "target URL is not stable. sqlmap will base the page " warnMsg += "comparison on a sequence matcher. If no dynamic nor " warnMsg += "injectable parameters are detected, or in case of " warnMsg += "junk results, refer to user's manual paragraph " warnMsg += "'Page comparison' and provide a string or regular " warnMsg += "expression to match on" logger . warn ( warnMsg ) message = "how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] " test = readInput ( message , default = "C" ) if test and test [ 0 ] in ( "q" , "Q" ) : raise SqlmapUserQuitException elif test and test [ 0 ] in ( "s" , "S" ) : showStaticWords ( firstPage , secondPage ) message = "please enter value for parameter 'string': " test = readInput ( message ) if test : conf . string = test if kb . nullConnection : debugMsg = "turning off NULL connection " debugMsg += "support because of string checking" logger . debug ( debugMsg ) kb . nullConnection = None else : errMsg = "Empty value supplied" raise SqlmapNoneDataException ( errMsg ) elif test and test [ 0 ] in ( "r" , "R" ) : message = "please enter value for parameter 'regex': " test = readInput ( message ) if test : conf . regex = test if kb . nullConnection : debugMsg = "turning off NULL connection " debugMsg += "support because of regex checking" logger . debug ( debugMsg ) kb . nullConnection = None else : errMsg = "Empty value supplied" raise SqlmapNoneDataException ( errMsg ) else : checkDynamicContent ( firstPage , secondPage ) return kb . pageStable