Esempio n. 1
0
def ossec_delete_agent(sensor_id, agent_id):
    (success, sensor_ip) = get_sensor_ip_from_sensor_id(sensor_id)
    if not success:
        return False, "Bad sensor_id"
    (success, data) = ans_ossec_delete_agent(sensor_ip, agent_id)

    if success:
        try:
            delete_hids_agent(agent_id, sensor_id)
        except APIException as e:
            data = str(e)
            success = False

    return success, data
Esempio n. 2
0
def ossec_delete_agent(sensor_id, agent_id):
    (success, sensor_ip) = get_sensor_ip_from_sensor_id(sensor_id)
    if not success:
        return False, "Bad sensor_id"
    (success, data) = ans_ossec_delete_agent(sensor_ip, agent_id)
    return success, data
Esempio n. 3
0
def ossec_delete_agent(sensor_id, agent_id):
    (success, sensor_ip) = get_sensor_ip_from_sensor_id(sensor_id)
    if not success:
        return False, "Bad sensor_id"
    (success, data) = ans_ossec_delete_agent(sensor_ip, agent_id)
    return success, data