Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

MISP modules issues #7

Closed
adulau opened this issue Aug 18, 2020 · 1 comment
Closed

MISP modules issues #7

adulau opened this issue Aug 18, 2020 · 1 comment

Comments

@adulau
Copy link

adulau commented Aug 18, 2020

It seems that the MISP modules is still using the old function calls from PyMISP.

Such as:

adulau@dobbertin:~/.viper/modules$ git diff
diff --git a/misp.py b/misp.py
index 02b26cd..b841cdb 100644
--- a/misp.py
+++ b/misp.py
@@ -504,7 +504,7 @@ class MISP(Module):
             return
         open_session = len(self.args.event) == 1
         for e in self.args.event:
-            event = self.misp.get(e)
+            event = self.misp.get_events(e)
             if not self._has_error_message(event):
                 self._search_local_hashes(event, open_session)
                 self._dump()
diff --git a/misp_methods/check_hashes.py b/misp_methods/check_hashes.py
index 98ad179..16cd27a 100644
--- a/misp_methods/check_hashes.py
+++ b/misp_methods/check_hashes.py
@@ -34,7 +34,7 @@ def _populate(self, event):
         event_id = self._get_eventid()
         if event_id is None:
             return
-        event = self.misp.get(event_id)
+        event = self.misp.get_event(event_id)
         if self._has_error_message(event):
             return
         __sessions__.new(misp_event=MispEvent(event, self.offline_mode))
@@ -83,7 +83,7 @@ def check_hashes(self):
     event_id = self._get_eventid()
     if event_id is None:
         return
-    misp_event = self.misp.get(event_id)
+    misp_event = self.misp.get_event(event_id)
     if self._has_error_message(misp_event):
         return

There are also other issues related to the object

viper > misp check_hashes -p 73155
[!] The command misp raised an exception:
Traceback (most recent call last):
  File "/home/adulau/.local/lib/python3.6/site-packages/viper/core/ui/console.py", line 322, in start
    module.run()
  File "/home/adulau/.viper/modules/misp.py", line 642, in run
    self.check_hashes()
  File "/home/adulau/.viper/modules/misp_methods/check_hashes.py", line 94, in check_hashes
    for o in misp_event.Object:
AttributeError: 'dict' object has no attribute 'Object'
viper > quit

@Rafiot could you have a look? Thanks a lot.

@Rafiot
Copy link
Contributor

Rafiot commented Aug 18, 2020

(I cannot assign it to myself, but consider it assigned to me)

Rafiot added a commit to Rafiot/viper-modules that referenced this issue Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants