<commit_before><?php
if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
#
#  Copyright 2003-2015 Opmantek Limited (www.opmantek.com)
#
#  ALL CODE MODIFICATIONS MUST BE SENT TO <EMAIL>
#
#  This file is part of Open-AudIT.
#
#  Open-AudIT is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published
#  by the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Open-AudIT is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Open-AudIT (most likely in a file named LICENSE).
#  If not, see <http://www.gnu.org/licenses/>
#
#  For further information on Open-AudIT or for a license other than AGPL please see
#  www.opmantek.com or email <EMAIL>
#
# *****************************************************************************

/*
 * @package Open-AudIT
 * @author <NAME> <<EMAIL>>
 *
 * @version   2.2.7

 * @copyright Copyright (c) 2014, Opmantek
 * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
 */

# Vendor Arista

$get_oid_details = function ($ip, $credentials, $oid) {
    $details = new stdClass();
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7048.427.3648') {
        $details->type = 'switch';
        $details->model = 'DCS-7048T-A';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7048.427.4.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7048T-4S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.2512.16') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-16';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.2512.16.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-16SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3095.32') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-X32';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3095.32.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-X32CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3095.32.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-X32SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.52') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-52';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.52.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-52SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.64') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-64';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.64.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-64SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3741.128') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-X128';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3741.128.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-X128SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.36') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-36';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.52') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-52';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.52.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-52SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.64') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-64';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.64.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-64SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7120.427.4.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7120T-4S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.2312') {
        $details->type = 'switch';
        $details->model = 'DCS-7124F-X';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.2312.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7124F-XCL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7124-S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.3741') {
        $details->type = 'switch';
        $details->model = 'DCS-7124-SX';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.3741.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7124S-XSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7140.427.8.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7140T-8S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7148.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7148S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7148.3741') {
        $details->type = 'switch';
        $details->model = 'DCS-7148S-X';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.24') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-24';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.24.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-24CL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.24.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-24CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.52.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-52CL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.52.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-52CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.64.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-64CL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.64.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-64CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7250.3095.64') {
        $details->type = 'switch';
        $details->model = 'DCS-7250Q-X64';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7250.3095.64.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7250Q-X64SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7304') {
        $details->type = 'switch';
        $details->model = 'DCS-7304';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7308') {
        $details->type = 'switch';
        $details->model = 'DCS-7308';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7504') {
        $details->type = 'switch';<commit_msg>Added an Arista model switch into helper.<commit_after><?php
if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
#
#  Copyright 2003-2015 Opmantek Limited (www.opmantek.com)
#
#  ALL CODE MODIFICATIONS MUST BE SENT TO <EMAIL>
#
#  This file is part of Open-AudIT.
#
#  Open-AudIT is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published
#  by the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Open-AudIT is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with Open-AudIT (most likely in a file named LICENSE).
#  If not, see <http://www.gnu.org/licenses/>
#
#  For further information on Open-AudIT or for a license other than AGPL please see
#  www.opmantek.com or email <EMAIL>
#
# *****************************************************************************

/*
 * @package Open-AudIT
 * @author <NAME> <<EMAIL>>
 *
 * @version   2.2.7

 * @copyright Copyright (c) 2014, Opmantek
 * @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
 */

# Vendor Arista

$get_oid_details = function ($ip, $credentials, $oid) {
    $details = new stdClass();
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7048.427.3648') {
        $details->type = 'switch';
        $details->model = 'DCS-7048T-A';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7048.427.4.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7048T-4S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.2512.16') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-16';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.2512.16.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-16SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3095.32') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-X32';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3095.32.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-X32CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3095.32.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050Q-X32SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.52') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-52';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.52.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-52SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.64') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-64';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3282.64.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-64SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3741.128') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-X128';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.3741.128.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050S-X128SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.36') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-36';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.52') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-52';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.52.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-52SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.64') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-64';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7050.427.64.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7050T-64SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7120.427.4.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7120T-4S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.2312') {
        $details->type = 'switch';
        $details->model = 'DCS-7124F-X';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.2312.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7124F-XCL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7124-S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.3741') {
        $details->type = 'switch';
        $details->model = 'DCS-7124-SX';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7124.3741.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7124S-XSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7140.427.8.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7140T-8S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7148.3282') {
        $details->type = 'switch';
        $details->model = 'DCS-7148S';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7148.3741') {
        $details->type = 'switch';
        $details->model = 'DCS-7148S-X';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.24') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-24';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.24.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-24CL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.24.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-24CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.52.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-52CL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.52.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-52CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.64.2745') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-64CL';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7150.3282.64.2745.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7150S-64CLSSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7250.3095.64') {
        $details->type = 'switch';
        $details->model = 'DCS-7250Q-X64';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7250.3095.64.761') {
        $details->type = 'switch';
        $details->model = 'DCS-7250Q-X64SSD';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7280.3735.48.2878.6') {
        $details->type = 'switch';
        $details->model = 'DCS-7280-SR48C6';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7304') {
        $details->type = 'switch';
        $details->model = 'DCS-7304';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7308') {
        $details->type = 'switch';
        $details->model = 'DCS-7308';
    }
    if ($oid == '1.3.6.1.4.1.30065.1.3011.7504') {
        $details->type = 'switch';
{'fraction_non_alphanumeric': 0.22933015695067266, 'fraction_numerical': 0.18245515695067266, 'mean_word_length': 2.1048509897759407, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 171, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 79, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6983024', 'n_tokens_mistral': 7262, 'n_tokens_neox': 6166, 'n_words': 908}