Merge branch 'master' of github.com:MISP/PyMISP

pull/232/head
Raphaël Vinot 2018-04-05 11:44:44 +02:00
commit 290059bfc4
5 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
import redis
import json

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
import json

View File

@ -710,6 +710,10 @@ class PyMISP(object):
"""Add SNORT rule(s)"""
return self.add_named_attribute(event, 'snort', snort, category, to_ids, comment, distribution, proposal, **kwargs)
def add_asn(self, event, asn, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False, **kwargs):
"""Add network ASN"""
return self.add_named_attribute(event, 'AS', asn, category, to_ids, comment, distribution, proposal, **kwargs)
def add_net_other(self, event, netother, category='Network activity', to_ids=True, comment=None, distribution=None, proposal=False, **kwargs):
"""Add a free text entry"""
return self.add_named_attribute(event, 'other', netother, category, to_ids, comment, distribution, proposal, **kwargs)

View File

@ -78,7 +78,7 @@
"to_ids": 0
},
"url": {
"default_category": "External analysis",
"default_category": "Network activity",
"to_ids": 1
},
"http-method": {