(access_key, secret_key, session_token, region)
return output
Attempt to brute-force common describe calls.
Attempt to brute-force common describe calls.
Attempt to brute - force common describe calls .
def enumerate_using_bruteforce(access_key, secret_key, session_token, region):
    """
    Attempt to brute-force common describe calls.
    """
    output = dict()

    logger = logging.getLogger()
    logger.info('Attempting common-service describe / list brute force.')

    pool = ThreadPool(MAX_THREADS)
    args_generator = generate_args(access_key, secret_key, session_token, region)

    try:
        results = pool.map(check_one_permission, args_generator)
    except KeyboardInterrupt:
        print('')

        results = []

        logger.info('Ctrl+C received, stopping all threads.')
        logger.info('Hit Ctrl+C again to force exit.')

        try:
            pool.close()
            pool.join()
        except KeyboardInterrupt:
            print('')
            return output

    for thread_result in results:
        if thread_result is None:
            continue

        key, action_result = thread_result
        output[key] = action_result

    pool.close()
    pool.join()

    return output
def enumerate_using_bruteforce ( access_key , secret_key , session_token , region ) : output = dict ( ) logger = logging . getLogger ( ) logger . info ( 'Attempting common-service describe / list brute force.' ) pool = ThreadPool ( MAX_THREADS ) args_generator = generate_args ( access_key , secret_key , session_token , region ) try : results = pool . map ( check_one_permission , args_generator ) except KeyboardInterrupt : print ( '' ) results = [ ] logger . info ( 'Ctrl+C received, stopping all threads.' ) logger . info ( 'Hit Ctrl+C again to force exit.' ) try : pool . close ( ) pool . join ( ) except KeyboardInterrupt : print ( '' ) return output for thread_result in results : if thread_result is None : continue key , action_result = thread_result output [ key ] = action_result pool . close ( ) pool . join ( ) return output