Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on korean hostnames: ssl.CertificateError: hostname #255

Closed
shakaran opened this issue Apr 9, 2020 · 1 comment
Closed

crash on korean hostnames: ssl.CertificateError: hostname #255

shakaran opened this issue Apr 9, 2020 · 1 comment

Comments

@shakaran
Copy link

shakaran commented Apr 9, 2020

Traceback (most recent call last):
  File "/root/src/ipwhois/ipwhois/net.py", line 874, in get_http_raw
    data = self.opener.open(conn, timeout=self.timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib64/python3.6/urllib/request.py", line 1318, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib64/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib64/python3.6/http/client.py", line 1415, in connect
    server_hostname=server_hostname)
  File "/usr/lib64/python3.6/ssl.py", line 365, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib64/python3.6/ssl.py", line 773, in __init__
    self.do_handshake()
  File "/usr/lib64/python3.6/ssl.py", line 1033, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib64/python3.6/ssl.py", line 650, in do_handshake
    match_hostname(self.getpeercert(), self.server_hostname)
  File "/usr/lib64/python3.6/ssl.py", line 287, in match_hostname
    % (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname '후이즈검색.한국' doesn't match either of 'whois.kisa.or.kr', 'xn--c79as89aj0e29b77z.xn--3e0b707e', 'whois.kr', 'xn--c79as89aj0e29b77z.kr', 'whois.nic.or.kr'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/ipwhois_cli.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/root/src/ipwhois/ipwhois/scripts/ipwhois_cli.py", line 1481, in <module>
    get_asn_description=(not script_args.skip_asn_description)
  File "/root/src/ipwhois/ipwhois/scripts/ipwhois_cli.py", line 1028, in lookup_rdap
    ret = self.obj.lookup_rdap(**kwargs)
  File "/root/src/ipwhois/ipwhois/ipwhois.py", line 327, in lookup_rdap
    field_list=nir_field_list, is_offline=False
  File "/root/src/ipwhois/ipwhois/nir.py", line 538, in lookup
    form_data=form_data
  File "/root/src/ipwhois/ipwhois/net.py", line 907, in get_http_raw
    raise HTTPLookupError('HTTP lookup failed for {0}.'.format(url))
ipwhois.exceptions.HTTPLookupError: HTTP lookup failed for https://xn--c79as89aj0e29b77z.xn--3e0b707e/eng/whois.jsc.
@secynic
Copy link
Owner

secynic commented Sep 1, 2020

Please try the dev branch. Duplicate of #207

@secynic secynic closed this as completed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants