mirror of https://github.com/CIRCL/lookyloo
fix: Incorrect call to new PSL lib
parent
71c26aeae2
commit
88997e7c99
|
@ -106,7 +106,7 @@ class Indexing():
|
||||||
pipeline = self.redis.pipeline()
|
pipeline = self.redis.pipeline()
|
||||||
for cn, cn_freq in self.cookies_names:
|
for cn, cn_freq in self.cookies_names:
|
||||||
for domain, d_freq in self.get_cookie_domains(cn):
|
for domain, d_freq in self.get_cookie_domains(cn):
|
||||||
tld = psl.get_tld(domain)
|
tld = psl.publicsuffix(domain)
|
||||||
main_domain_part = re.sub(f'.{tld}$', '', domain).split('.')[-1]
|
main_domain_part = re.sub(f'.{tld}$', '', domain).split('.')[-1]
|
||||||
pipeline.zincrby('aggregate_domains_cn', cn_freq, f'{main_domain_part}|{cn}')
|
pipeline.zincrby('aggregate_domains_cn', cn_freq, f'{main_domain_part}|{cn}')
|
||||||
pipeline.zincrby('aggregate_cn_domains', d_freq, f'{cn}|{main_domain_part}')
|
pipeline.zincrby('aggregate_cn_domains', d_freq, f'{cn}|{main_domain_part}')
|
||||||
|
|
|
@ -132,7 +132,7 @@ class MISP():
|
||||||
|
|
||||||
def lookup(self, node: URLNode, hostnode: HostNode) -> Union[Dict[str, Set[str]], Dict[str, Any]]:
|
def lookup(self, node: URLNode, hostnode: HostNode) -> Union[Dict[str, Set[str]], Dict[str, Any]]:
|
||||||
if self.available and self.enable_lookup:
|
if self.available and self.enable_lookup:
|
||||||
tld = self.psl.get_tld(hostnode.name)
|
tld = self.psl.publicsuffix(hostnode.name)
|
||||||
domain = re.sub(f'.{tld}$', '', hostnode.name).split('.')[-1]
|
domain = re.sub(f'.{tld}$', '', hostnode.name).split('.')[-1]
|
||||||
to_lookup = [node.name, hostnode.name, f'{domain}.{tld}'] + hostnode.resolved_ips
|
to_lookup = [node.name, hostnode.name, f'{domain}.{tld}'] + hostnode.resolved_ips
|
||||||
if hasattr(hostnode, 'cnames'):
|
if hasattr(hostnode, 'cnames'):
|
||||||
|
|
Loading…
Reference in New Issue