mirror of https://github.com/MISP/PyMISP
Merge pull request #219 from cipherlock/new-add-asn-function
new:Add the ability to add an Autonomous System(AS) via the APIpull/232/head
commit
92ac581dee
|
@ -710,6 +710,10 @@ class PyMISP(object):
|
||||||
"""Add SNORT rule(s)"""
|
"""Add SNORT rule(s)"""
|
||||||
return self.add_named_attribute(event, 'snort', snort, category, to_ids, comment, distribution, proposal, **kwargs)
|
return self.add_named_attribute(event, 'snort', snort, category, to_ids, comment, distribution, proposal, **kwargs)
|
||||||
|
|
||||||
|
def add_asn(self, event, asn, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False, **kwargs):
|
||||||
|
"""Add network ASN"""
|
||||||
|
return self.add_named_attribute(event, 'AS', asn, category, to_ids, comment, distribution, proposal, **kwargs)
|
||||||
|
|
||||||
def add_net_other(self, event, netother, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False, **kwargs):
|
def add_net_other(self, event, netother, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False, **kwargs):
|
||||||
"""Add a free text entry"""
|
"""Add a free text entry"""
|
||||||
return self.add_named_attribute(event, 'other', netother, category, to_ids, comment, distribution, proposal, **kwargs)
|
return self.add_named_attribute(event, 'other', netother, category, to_ids, comment, distribution, proposal, **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue