2018-01-25 17:56:30 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from pymisp import PyMISP
|
|
|
|
from pymisp.tools import load_warninglists
|
|
|
|
import argparse
|
2018-10-14 19:26:03 +02:00
|
|
|
from keys import misp_url, misp_key, misp_verifycert
|
2018-01-25 17:56:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser(description='Load the warninglists.')
|
|
|
|
parser.add_argument("-p", "--package", action='store_true', help="from the PyMISPWarninglists package.")
|
|
|
|
parser.add_argument("-r", "--remote", action='store_true', help="from the MISP instance.")
|
|
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
if args.package:
|
|
|
|
print(load_warninglists.from_package())
|
|
|
|
elif args.remote:
|
2018-10-14 19:26:03 +02:00
|
|
|
pm = PyMISP(misp_url, misp_key, misp_verifycert)
|
2018-01-25 17:56:30 +01:00
|
|
|
print(load_warninglists.from_instance(pm))
|