Skip to content

Commit

Permalink
fix: line length snip, remove unused libs
Browse files Browse the repository at this point in the history
  • Loading branch information
FloatingGhost committed Jun 29, 2017
1 parent 2469960 commit e3ed978
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion misp_stix_converter/converters/buildMISPAttribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def buildEmailMessageAttribute(obj, mispEvent, pkg, importRelated=False):
if obj.header:
# We have a header, can check for to/from etc etc
if obj.header.from_:
mispEvent.add_attribute('email-src', ast_eval(str(obj.header.from_.address_value)), comment=pkg.title or None)
mispEvent.add_attribute('email-src',
ast_eval(str(obj.header.from_.address_value)),
comment=pkg.title or None)
if obj.header.to:
for mail in obj.header.to:
mispEvent.add_attribute('email-dst', ast_eval(mail.address_value), comment=pkg.title or None)
Expand Down
3 changes: 1 addition & 2 deletions misp_stix_converter/converters/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import base64
import random
import sys
import re
from pymisp import mispevent
from lxml import etree

Expand Down Expand Up @@ -47,7 +46,7 @@ def MISPtoSTIX(mispJSON):
stix = STIXPackage()
try:
stix.MISPID = mispJSON["Event"]["id"]
except:
except Exception:
# We don't have an ID?
# Generate a random number and use that
stix.MISPID = random.randint(1, 9000)
Expand Down

0 comments on commit e3ed978

Please sign in to comment.