MISP

A wrapper around MISP's HTTP API to provide native interaction.

Installation

If available in Hex, the package can be installed by adding mispex to your list of dependencies in mix.exs:

def deps do
[
{:mispex, "~> 0.1.3"}
]
end

Configuration

In your application config, add config of the format

config :mispex,
url: "https://misp.local",
apikey: "myapikey"

Documentation

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mispex.

Usage

Create an event

%MISP.EventInfo{info: "my event"}
|> MISP.Event.create()

Retrive an event

MISP.Event.get(15)

Update an event

MISP.Event.get(17)
|> put_in([:Event, :info], "my new info field")
|> MISP.Event.update()

Add an attribute

MISP.Event.get(17)
|> MISP.Event.add_attribute(%MISP.Attribute{value: "8.8.8.8", type: "ip-dst"})

Tag an event

MISP.Event.get(17)
|> MISP.Event.add_tag(%MISP.Tag{name: "my tag"})