mirror of https://github.com/MISP/mail_to_misp
parent
c823e5496c
commit
cbf0c07b67
|
@ -14,7 +14,11 @@ from pyfaup.faup import Faup
|
|||
from pymisp import PyMISP, MISPEvent, MISPObject, MISPSighting
|
||||
from pymisp.tools import EMailObject, make_binary_objects
|
||||
from defang import refang
|
||||
import dns.resolver
|
||||
try:
|
||||
import dns.resolver
|
||||
HAS_DNS = True
|
||||
except ImportError:
|
||||
HAS_DNS = False
|
||||
|
||||
|
||||
def is_ip(address):
|
||||
|
@ -299,6 +303,7 @@ class Mail2MISP():
|
|||
email_object.add_reference(attribute.uuid, 'contains')
|
||||
else:
|
||||
related_ips = []
|
||||
if HAS_DNS and self.config.enable_dns:
|
||||
try:
|
||||
syslog.syslog(hostname)
|
||||
for rdata in dns.resolver.query(hostname, 'A'):
|
||||
|
|
Loading…
Reference in New Issue