def get_server_type(config):
	handlers = {
		'Redis': brute_redis,
		'RabbitMQ': is_rabbit,
		'ZeroMQ': brute_zmq
	}

	host = config.target
	port = config.port
	user = config.user
	password = None
	result = -1

	log.warning("    > Analyzing host '%s' with port '%s' " % (host, port))

	try:

		# Try to check if port is open
		s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
		s.settimeout(config.timeout)

		result = s.connect_ex((host, int(port)))

	except socket.gaierror as e:
		log.debug("%s error: %s" % (port, e))
	finally:
		s.close()

	# Is port open?
	if result == 0:
		log.info("         <i> Port '%s' is open in '%s'" % (port, host))

		# Check each serve
		for server_type, handle in six.iteritems(handlers):

			try:
				if handle(host, port, user, password, config) is True:
					return server_type, "open", port

			except AuthRequired:
				return server_type, "auth", port
	else:
		return None, "closed", port
Get information about the file from the client.
dataset/ETHPy150Open cr0hn/enteletaor/enteletaor_lib/modules/brute/utils.py/get_server_type--crossover with--dataset/ETHPy150Open google/grr/grr/lib/flows/general/transfer.py/GetFile.Start