PyMISP/examples/sharing_groups.py

26 lines
598 B
Python
Raw Normal View History

2016-09-12 11:32:04 +02:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pymisp import PyMISP
from keys import misp_url, misp_key, misp_verifycert
2016-09-12 11:32:04 +02:00
import argparse
# For python2 & 3 compat, a bit dirty, but it seems to be the least bad one
try:
input = raw_input
except NameError:
pass
def init(url, key):
return PyMISP(url, key, misp_verifycert, 'json')
2016-09-12 11:32:04 +02:00
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Get a list of the sharing groups from the MISP instance.')
misp = init(misp_url, misp_key)
sharing_groups = misp.get_sharing_groups()
2018-08-30 12:09:55 +02:00
print (sharing_groups)
2016-09-12 11:32:04 +02:00