Skip to content

Commit

Permalink
Add configurable PyMISP timeout (#25)
Browse files Browse the repository at this point in the history
* Add configurable PyMISP timeout
  • Loading branch information
nazywam authored Mar 7, 2024
1 parent 6f9afe0 commit b69070a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions karton/misp_pusher/misp_pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from karton.core import Config, Karton, Task
from mwdb_iocextract import parse # type: ignore
from mwdblib.util import config_dhash # type: ignore
from pymisp import ExpandedPyMISP, MISPEvent
from pymisp import MISPEvent, PyMISP
from pymisp.mispevent import MISPGalaxyCluster


Expand Down Expand Up @@ -64,10 +64,11 @@ def process(self, task: Task) -> None:
# Nothing actionable found - skip the config
return

misp = ExpandedPyMISP(
http_url(self.config.get("misp", "url")),
self.config.get("misp", "key"),
not self.config.getboolean("misp", "insecure", False),
misp = PyMISP(
url=http_url(self.config.get("misp", "url")),
key=self.config.get("misp", "key"),
ssl=not self.config.getboolean("misp", "insecure", False),
timeout=self.config.getint("misp", "timeout", 10),
)

# Upload structured data to MISP
Expand Down

0 comments on commit b69070a

Please sign in to comment.