I tried exporting into http_proxy and https_proxy but that didn't seem to work.

I am guessing that there is another way to use a proxy when querying whois information from the command line?


The whois command talks in a specific protocol and port, namely whois 43/tcp ; so obviously trying to use an HTTP(S) (HTTP port 80/tcp and HTTPS 443/tcp by default).

So HTTP proxies-aware won't work, as those protocols are not involved with the inner workings of the whois protocol.

If you need to setup an external proxy, you would need a socks aware proxy, as this example https://stackoverflow.com/questions/6718836/how-can-i-implement-a-simple-whois-proxy-in-perl

For a Whois proxy in python, see uwhoisd and for further clarifications on how to use it: python: how to perform whois with uwhoisd proxy

see also About the WHOIS Protocol

The WHOIS protocol is a simple, plaintext-based protocol that listens on TCP port 43. There is an RFC that defines the protocol, RFC 3912.

  • This link explains how to do this in perl, how do you do this in python? – HashWizard May 26 '17 at 12:55
  • @HashWizard added to the answer. – Rui F Ribeiro May 26 '17 at 12:58
  • My main objective is to get past the limitations of the query server, say to query 10 times instead of 5 times (which is the limit) by using public proxies. Would the solution that you provided allow me to do that ? Thanks for taking the time to address my problem – HashWizard May 26 '17 at 13:00
  • Because from the looks of it, the solution doesn't seem to be accepting different proxies (proxies provided by me) , the solution seems to be a 'proxy' /intermediary' for solving domain extension ambiguities (for example getting the correcting results if I whois something.com and something.org) – HashWizard May 26 '17 at 13:04

WHOIS is a TCP/IP protocol, HTTP doesn't play a part in the query and so an HTTP proxy won't work.

If your proxy server also presents a SOCKS interface, you could attempt to use tsocks or proxychains-ng as described here to perform the query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.