

def brute_zmq(host, port=5555, user=None, password=None, db=0):
    context = zmq.Context()
    socket = context.socket(zmq.SUB)
    socket.setsockopt(zmq.SUBSCRIBE, b'')
    socket.setsockopt(zmq.LINGER, 0)
    socket.RCVTIMEO = 1000
    socket.connect(('tcp://%s:%s' % (host, port)))
    try:
        socket.recv()
        return True
    except Exception:
        return False
    finally:
        socket.close()

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