mirror of https://github.com/CIRCL/AIL-framework
Add hotfixes
parent
8803c8447a
commit
9ee61db2cf
|
@ -104,10 +104,14 @@ class Paste(object):
|
||||||
|
|
||||||
paste = self.cache.get(self.p_path)
|
paste = self.cache.get(self.p_path)
|
||||||
if paste is None:
|
if paste is None:
|
||||||
with gzip.open(self.p_path, 'rb') as f:
|
try:
|
||||||
paste = f.read()
|
with gzip.open(self.p_path, 'rb') as f:
|
||||||
self.cache.set(self.p_path, paste)
|
paste = f.read()
|
||||||
self.cache.expire(self.p_path, 300)
|
self.cache.set(self.p_path, paste)
|
||||||
|
self.cache.expire(self.p_path, 300)
|
||||||
|
except:
|
||||||
|
return ''
|
||||||
|
pass
|
||||||
return paste
|
return paste
|
||||||
|
|
||||||
def get_p_content_as_file(self):
|
def get_p_content_as_file(self):
|
||||||
|
|
|
@ -34,6 +34,7 @@ def checking_MX_record(r_serv, adress_set):
|
||||||
# Transforming the set into a string
|
# Transforming the set into a string
|
||||||
MXdomains = re.findall("@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,20}", str(adress_set).lower())
|
MXdomains = re.findall("@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,20}", str(adress_set).lower())
|
||||||
resolver = dns.resolver.Resolver()
|
resolver = dns.resolver.Resolver()
|
||||||
|
resolver.nameservers = ['149.13.33.69']
|
||||||
resolver.timeout = 5
|
resolver.timeout = 5
|
||||||
resolver.lifetime = 2
|
resolver.lifetime = 2
|
||||||
if MXdomains != []:
|
if MXdomains != []:
|
||||||
|
@ -86,6 +87,7 @@ def checking_A_record(r_serv, domains_set):
|
||||||
num = len(domains_set)
|
num = len(domains_set)
|
||||||
WalidA = set([])
|
WalidA = set([])
|
||||||
resolver = dns.resolver.Resolver()
|
resolver = dns.resolver.Resolver()
|
||||||
|
resolver.nameservers = ['149.13.33.69']
|
||||||
resolver.timeout = 5
|
resolver.timeout = 5
|
||||||
resolver.lifetime = 2
|
resolver.lifetime = 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue