Statistics test script added

pull/21/head
Alexandre Dulaunoy 2016-04-28 14:44:01 +02:00
parent 1e622cf584
commit f490898a5c
1 changed files with 18 additions and 0 deletions

18
examples/stats.py Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pymisp import PyMISP
from keys import misp_url, misp_key, misp_verifycert
import argparse
def init(url, key):
return PyMISP(url, key, misp_verifycert, 'json')
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Output attributes statistics from a MISP instance.')
args = parser.parse_args()
misp = init(misp_url, misp_key)
print misp.get_attributes_statistics(misp, percentage=True)