mirror of https://github.com/MISP/PyMISP
new: Update warninglists
parent
da0f6ef7d2
commit
b95fdf9218
|
@ -1697,6 +1697,11 @@ class PyMISP(object):
|
||||||
response = self._prepare_request('GET', url)
|
response = self._prepare_request('GET', url)
|
||||||
return self._check_response(response)
|
return self._check_response(response)
|
||||||
|
|
||||||
|
def update_warninglists(self):
|
||||||
|
url = urljoin(self.root_url, '/warninglists/update')
|
||||||
|
response = self._prepare_request('POST', url)
|
||||||
|
return self._check_response(response)
|
||||||
|
|
||||||
# ############## Galaxies/Clusters ##################
|
# ############## Galaxies/Clusters ##################
|
||||||
|
|
||||||
def get_galaxies(self):
|
def get_galaxies(self):
|
||||||
|
|
|
@ -580,8 +580,8 @@ class TestComprehensive(unittest.TestCase):
|
||||||
# self.assertEqual(len(events), 1)
|
# self.assertEqual(len(events), 1)
|
||||||
|
|
||||||
# warninglist
|
# warninglist
|
||||||
|
self.admin_misp_connector.update_warninglists()
|
||||||
response = self.admin_misp_connector.toggle_warninglist(warninglist_name='%dns resolv%', force_enable=True) # enable ipv4 DNS.
|
response = self.admin_misp_connector.toggle_warninglist(warninglist_name='%dns resolv%', force_enable=True) # enable ipv4 DNS.
|
||||||
# response = self.admin_misp_connector.toggle_warninglist(warninglist_id=[17], force_enable=True) # enable ipv4 DNS.
|
|
||||||
self.assertDictEqual(response, {'saved': True, 'success': '3 warninglist(s) enabled'})
|
self.assertDictEqual(response, {'saved': True, 'success': '3 warninglist(s) enabled'})
|
||||||
second.add_attribute('ip-src', '9.9.9.9')
|
second.add_attribute('ip-src', '9.9.9.9')
|
||||||
second = self.user_misp_connector.update_event(second)
|
second = self.user_misp_connector.update_event(second)
|
||||||
|
|
Loading…
Reference in New Issue