mirror of https://github.com/MISP/PyMISP
Auth parameters normalized
parent
cc8400a9df
commit
db1221dd52
|
@ -2,8 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from pymisp import PyMISP
|
from pymisp import PyMISP
|
||||||
from keys import url_priv, key_priv
|
from keys import misp_url, misp_key
|
||||||
# from keys import url_cert, key_cert
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
# For python2 & 3 compat, a bit dirty, but it seems to be the least bad one
|
# For python2 & 3 compat, a bit dirty, but it seems to be the least bad one
|
||||||
|
@ -24,8 +23,7 @@ if __name__ == '__main__':
|
||||||
parser.add_argument("-t", "--threat", type=int, help="The threat level ID of the newly created event, if applicatble. [0-3]")
|
parser.add_argument("-t", "--threat", type=int, help="The threat level ID of the newly created event, if applicatble. [0-3]")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
misp = init(url_priv, key_priv)
|
misp = init(misp_url, misp_key)
|
||||||
# misp = init(url_cert, key_cert)
|
|
||||||
|
|
||||||
event = misp.new_event(args.distrib, args.threat, args.analysis, args.info)
|
event = misp.new_event(args.distrib, args.threat, args.analysis, args.info)
|
||||||
print event
|
print event
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from pymisp import PyMISP
|
from pymisp import PyMISP
|
||||||
from keys import url_priv, key_priv
|
from keys import misp_url, misp_key
|
||||||
# from keys import url_cert, key_cert
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
@ -38,7 +37,6 @@ if __name__ == '__main__':
|
||||||
print('Output file already exists, abord.')
|
print('Output file already exists, abord.')
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
misp = init(url_priv, key_priv)
|
misp = init(misp_url, misp_key)
|
||||||
# misp = init(url_cert, key_cert)
|
|
||||||
|
|
||||||
download_last(misp, args.last, args.output)
|
download_last(misp, args.last, args.output)
|
||||||
|
|
Loading…
Reference in New Issue