

def brute_redis(host, port=6379, user=None, password=None, db=0):
    try:
        redis.StrictRedis(host=host, port=int(port), socket_connect_timeout=1, socket_timeout=1, password=password, db=db).ping()
        return True
    except redis.exceptions.ResponseError as e:
        if str(e).startswith('NOAUTH'):
            raise AuthRequired()
        else:
            return False
    except Exception:
        return False

dataset/ETHPy150Open cr0hn/enteletaor/enteletaor_lib/modules/brute/authers.py brute_redis/original