def get_plugin_package_info_from_system_id(system_id): """ Get the alienvault-plugin-sids version from system with id system_id :param: system_id """ (success, system_ip) = get_system_ip_from_system_id(system_id) if success: (success, info) = get_plugin_package_info(system_ip) if not success: result = (False, "Can't get plugins version/md5 information") else: result = (True, info) else: result = (False, "Bad system id: %s" % str(system_id)) return result
def get_plugin_package_info_from_sensor_id(sensor_id): """ Get the alienvault-plugins-sids version and md5 from sensor with id sensor_id :param: sensor_id """ (success, sensor_ip) = get_sensor_ip_from_sensor_id(sensor_id) if success: (success, info) = get_plugin_package_info(sensor_ip) if not success: result = (False, "Can't get plugins version/md5 information") else: if info != '': result = (True, info) else: result = (False, "Can't obtain version information") else: result = (False, "Bad sensor id: %s" % str(sensor_id)) return result