From 38c0d2343d55a0161e9da56266bd6d040fc45cd6 Mon Sep 17 00:00:00 2001 From: Koen Van Impe Date: Tue, 24 Jan 2017 08:46:14 +0100 Subject: [PATCH] Wrong use of API for dateuntil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PyMISP uses “dateto” whereas the API expects “dateuntil”. https://github.com/MISP/misp-book/tree/master/automation --- pymisp/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pymisp/api.py b/pymisp/api.py index 572af35..1866d5b 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -756,7 +756,7 @@ class PyMISP(object): return self._check_response(response) def search_index(self, published=None, eventid=None, tag=None, datefrom=None, - dateto=None, eventinfo=None, threatlevel=None, distribution=None, + dateuntil=None, eventinfo=None, threatlevel=None, distribution=None, analysis=None, attribute=None, org=None, to_ids=False, deleted=False): """Search only at the index level. Use ! infront of value as NOT, default OR @@ -764,7 +764,7 @@ class PyMISP(object): :param eventid: Evend ID(s) | str or list :param tag: Tag(s) | str or list :param datefrom: First date, in format YYYY-MM-DD - :param dateto: Last date, in format YYYY-MM-DD + :param dateuntil: Last date, in format YYYY-MM-DD :param eventinfo: Event info(s) to match | str or list :param threatlevel: Threat level(s) (1,2,3,4) | str or list :param distribution: Distribution level(s) (0,1,2,3) | str or list @@ -779,7 +779,7 @@ class PyMISP(object): - true: include deleted attributes - "only": ONLY include deleted attributes """ - allowed = {'published': published, 'eventid': eventid, 'tag': tag, 'Dateto': dateto, + allowed = {'published': published, 'eventid': eventid, 'tag': tag, 'Dateuntil': dateuntil, 'Datefrom': datefrom, 'eventinfo': eventinfo, 'threatlevel': threatlevel, 'distribution': distribution, 'analysis': analysis, 'attribute': attribute, 'org': org, 'to_ids': to_ids, 'deleted': deleted}