This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit fd2a1c1375d07045bd4a057e3128c0e19cb248fe Author: Benjamin POUSSIN <poussin@codelutin.com> Date: Wed Jul 8 13:14:21 2015 +0200 add kernel snmp detection --- .../detection_modules/kernel_snmp_detection.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/app/modules/detection_modules/kernel_snmp_detection.py b/app/modules/detection_modules/kernel_snmp_detection.py new file mode 100644 index 0000000..8c90d73 --- /dev/null +++ b/app/modules/detection_modules/kernel_snmp_detection.py @@ -0,0 +1,36 @@ +# -*- coding: utf8 -*- +""" + This program 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. + + This program 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 this program. If not, see <http://www.gnu.org/licenses/>. +""" +__copyright__ = "Copyright 2015, Code Lutin" +__license__ = "AGPL" + +__author__ = 'poussin@codelutin.com' + +compatible_os = ['linux', 'unix'] +connection = "snmp_walk" + + +def run_detection(conn): + oid_system_description=".1.3.6.1.2.1.1.1.0" + stdout = conn.exec_command(oid_system_description) + + # Output example: + """ + Linux version 3.16.0-0.bpo.4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.16.7-ckt9-3~deb8u1~bpo70+1 (2015-04-27) + """ + + dict_total = {} + dict_total["kernel"] = stdout.split('#')[0] + return dict_total -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.