Skip to content

UnicodeError: label empty or too long #1

@codebyzen

Description

@codebyzen

If subdomains file list have empty line script fall to error

_jabber

mta

Error

Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/encodings/idna.py", line 165, in encode
    raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./sdf.py", line 403, in <module>
    fuzzer.start()
  File "./sdf.py", line 189, in start
    if self._check_host(url_parsed.host, url_parsed.scheme) is None: 
  File "./sdf.py", line 199, in _check_host
    responce = session.head(scheme+'://'+url, verify=False, allow_redirects=False, timeout=config.http.TIMEOUT)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 565, in head
    return self.request('HEAD', url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 520, in request
    settings = self.merge_environment_settings(
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 699, in merge_environment_settings
    env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
  File "/usr/local/lib/python3.8/site-packages/requests/utils.py", line 766, in get_environ_proxies
    if should_bypass_proxies(url, no_proxy=no_proxy):
  File "/usr/local/lib/python3.8/site-packages/requests/utils.py", line 750, in should_bypass_proxies
    bypass = proxy_bypass(parsed.hostname)
  File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 2646, in proxy_bypass
    return proxy_bypass_macosx_sysconf(host)
  File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 2623, in proxy_bypass_macosx_sysconf
    return _proxy_bypass_macosx_sysconf(host, proxy_settings)
  File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 2596, in _proxy_bypass_macosx_sysconf
    hostIP = socket.gethostbyname(hostonly)
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions