chg: [cof2misp] bailiwick is optional

pull/499/head
Alexandre Dulaunoy 2021-05-11 14:46:16 +02:00
parent 267c167acb
commit 77035a82e0
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,8 @@ def parse_and_insert_cof(data: str) -> dict:
o = MISPObject(name='passive-dns', standalone=False, comment='created by cof2misp')
# o.add_tag('tlp:amber') # FIXME: we'll want to add a tlp: tag to the object
o.add_attribute('bailiwick', value=entry['bailiwick'].rstrip('.'))
if 'bailiwick' in entry:
o.add_attribute('bailiwick', value=entry['bailiwick'].rstrip('.'))
#
# handle the combinations of rrtype (domain, ip) on both left and right side