From 43f167d9341e1216bab62d98f8964c6f08872e61 Mon Sep 17 00:00:00 2001 From: Paul Stark Date: Fri, 30 Mar 2018 11:33:30 -0400 Subject: [PATCH] Add the ability to add an Autonomous System(AS) via the API --- pymisp/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pymisp/api.py b/pymisp/api.py index 2526361..f2532c6 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -710,6 +710,10 @@ class PyMISP(object): """Add SNORT rule(s)""" 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): """Add a free text entry""" return self.add_named_attribute(event, 'other', netother, category, to_ids, comment, distribution, proposal, **kwargs)