Mercurial > farol > farolluz
comparison parse_cvrf @ 0:e18b61a73a68
Initial Release
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Tue, 23 Sep 2014 15:19:14 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e18b61a73a68 |
---|---|
1 #! /usr/bin/env python | |
2 # -*- coding: utf-8 -*- | |
3 # | |
4 # Authors: | |
5 # BenoƮt Allard <benoit.allard@greenbone.net> | |
6 # | |
7 # Copyright: | |
8 # Copyright (C) 2014 Greenbone Networks GmbH | |
9 # | |
10 # This program is free software; you can redistribute it and/or | |
11 # modify it under the terms of the GNU General Public License | |
12 # as published by the Free Software Foundation; either version 2 | |
13 # of the License, or (at your option) any later version. | |
14 # | |
15 # This program is distributed in the hope that it will be useful, | |
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 # GNU General Public License for more details. | |
19 # | |
20 # You should have received a copy of the GNU General Public License | |
21 # along with this program; if not, write to the Free Software | |
22 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
23 | |
24 import sys | |
25 | |
26 from farolluz.parsers.cvrf import parse | |
27 | |
28 if __name__ == "__main__": | |
29 with open(sys.argv[1], 'rt') as f: | |
30 cvrf = parse(f) | |
31 cvrf.validate() | |
32 print(cvrf) | |
33 print(cvrf.getHighestCVSS()._vector) | |
34 print(cvrf.getProductList()) | |
35 print(cvrf._producttree._branches) | |
36 # print(cvrf._producttree._branches[0]._childs) |