Add add_ipsrc

pull/3/head v2.1.1
Raphaël Vinot 2015-11-05 09:35:43 +01:00
parent 588a1abc00
commit d1db9a74ee
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,3 @@
__version__ = '2.1'
__version__ = '2.1.1'
from .api import PyMISP, PyMISPError, NewEventError, NewAttributeError, MissingDependency, NoURL, NoKey

View File

@ -392,6 +392,11 @@ class PyMISP(object):
attributes.append(self._prepare_full_attribute(category, 'ip-dst', ipdst, to_ids, comment, distribution))
return self._send_attributes(event, attributes, proposal)
def add_ipsrc(self, event, ipsrc, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False):
attributes = []
attributes.append(self._prepare_full_attribute(category, 'ip-src', ipsrc, to_ids, comment, distribution))
return self._send_attributes(event, attributes, proposal)
def add_hostname(self, event, hostname, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False):
attributes = []
attributes.append(self._prepare_full_attribute(category, 'hostname', hostname, to_ids, comment, distribution))