joepie91 / python-whois

A python module for retrieving and parsing WHOIS data
Do What The F*ck You Want To Public License
398 stars 188 forks source link

Connection timed out #76

Open PidgeyL opened 9 years ago

PidgeyL commented 9 years ago

Hi Joe, got this little issue going on here. (traceback below). I'm testing this behind a proxy (at work), so I don't know if that'd be the issue or not, as it requires authentication. However, my python scripts make their way through. Happens both with python 2.7 and 3.4. Does your script not work behind a proxy? Either way, there should be some error handeling. Want me to take care of it?

Pidgey@NorthernSec:~/Git/cve-search$ pwhois cryto.net Traceback (most recent call last): File "/usr/local/bin/pwhois", line 23, in data, server_list = pythonwhois.net.get_whois_raw(args.domain[0], with_server_list=True) File "/usr/local/lib/python2.7/dist-packages/pythonwhois/net.py", line 33, in get_whois_raw target_server = get_root_server(domain) File "/usr/local/lib/python2.7/dist-packages/pythonwhois/net.py", line 76, in get_root_server data = whois_request(domain, "whois.iana.org") File "/usr/local/lib/python2.7/dist-packages/pythonwhois/net.py", line 86, in whois_request sock.connect((server, port)) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 110] Connection timed out

joepie91 commented 9 years ago

Yeah, I have no idea what could be causing this, to be honest. Could you have a look into why it's happening in your environment (if it is still happening), and whether it'd require changes to python-whois to make it work?