PaloAltoNetworks / minemeld-misp

MineMeld nodes for MISP
Apache License 2.0
18 stars 16 forks source link

Filter on the category #9

Open H0wSet opened 5 years ago

H0wSet commented 5 years ago

Hi @jtschichold,

It is possible to filter event base on the category like this with the following argument on the config:

filter_category: 'Payload delivery'

And this change of code:

self.filter_category = self.config.get('filter_category', None)

Under "def _process_item(self, event):"

        attributes = event.get('Attribute', [])
...
        for a in attributes:
            if self.filter_category:
                category = a.get('category', None)
                if category != self.filter_category:
                    continue

Thansk for your reply

Cheers,