mirror of https://github.com/CIRCL/lookyloo
fix: Avoid bypass with "http://user:pwd@host.tld"
parent
bbd573a69c
commit
4c86b65c56
|
@ -167,12 +167,11 @@ class Lookyloo():
|
||||||
if self.only_global_lookups:
|
if self.only_global_lookups:
|
||||||
splitted_url = urlsplit(url)
|
splitted_url = urlsplit(url)
|
||||||
if splitted_url.netloc:
|
if splitted_url.netloc:
|
||||||
if ':' in splitted_url.netloc:
|
ip = socket.gethostbyname(splitted_url.hostname)
|
||||||
ip = socket.gethostbyname(splitted_url.netloc.split(':')[0])
|
|
||||||
else:
|
|
||||||
ip = socket.gethostbyname(splitted_url.netloc)
|
|
||||||
if not ipaddress.ip_address(ip).is_global:
|
if not ipaddress.ip_address(ip).is_global:
|
||||||
return False
|
return False
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
items = crawl(self.splash_url, url, depth, user_agent=user_agent, log_enabled=True, log_level='INFO')
|
items = crawl(self.splash_url, url, depth, user_agent=user_agent, log_enabled=True, log_level='INFO')
|
||||||
if not items:
|
if not items:
|
||||||
|
|
Loading…
Reference in New Issue