# Copyright (C) 2015-2020, Wazuh Inc. # Created by Wazuh, Inc. <*****@*****.**>. # This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 from copy import deepcopy from wazuh.core.common import MAX_SOCKET_BUFFER_SIZE, wazuh_version as wazuh_full_version GENERIC_ERROR_MSG = "Wazuh Internal Error. See log for more detail" WAZUH_VERSION = 'current' if wazuh_full_version == '' else '.'.join(wazuh_full_version.split('.')[:2]).lstrip('v') class WazuhException(Exception): """ Wazuh Exception object. """ ERRORS = { # < 999: API # Wazuh: 0999 - 1099 999: 'Incompatible version of Python', 1000: {'message': 'Wazuh Internal Error', 'remediation': 'Please, check `WAZUH_HOME/logs/ossec.log`, `WAZUH_HOME/logs/cluster.log` and ' '`WAZUH_HOME/logs/api.log` to get more information about the error'}, 1001: 'Error importing module', 1002: 'Error executing command', 1003: 'Command output not in JSON', 1004: 'Malformed command output ', 1005: {'message': 'Error reading file', 'remediation': 'Please, ensure you have the right file permissions in Wazuh directories'},
# Copyright (C) 2015-2020, Wazuh Inc. # Created by Wazuh, Inc. <*****@*****.**>. # This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 from copy import deepcopy from wazuh.core.common import wazuh_version as wazuh_full_version GENERIC_ERROR_MSG = "Wazuh Internal Error. See log for more detail" WAZUH_VERSION = 'current' if wazuh_full_version == '' else '.'.join( wazuh_full_version.split('.')[:2]).lstrip('v') class WazuhException(Exception): """ Wazuh Exception object. """ ERRORS = { # < 999: API # Wazuh: 0999 - 1099 999: 'Incompatible version of Python', 1000: { 'message': 'Wazuh Internal Error', 'remediation': 'Please, check `WAZUH_HOME/logs/ossec.log`, `WAZUH_HOME/logs/cluster.log` and ' '`WAZUH_HOME/logs/api.log` to get more information about the error' }, 1001: 'Error importing module', 1002: 'Error executing command',