|
February 28, 2018
|

How to perform WHOIS queries with SOCKS proxies using NodeJS

Introduction

If you’re wanting to scale whois queries you’ll quickly find out that some of the servers hosting these databases impose limits on the amount of times you can query them per day or even per hour.

Countries like Australia & New Zealand impose much heavier limitations on performing queries and using a SOCKS proxy we are able to bypass these limits and continue mining data.

Preresequites

NodeJS installed (we’re using 8.9.3 in this example)

 

How to perform WHOIS query behind a SOCKS proxy

Step 1: Install whois npm

npm install -g whois

/usr/bin/whois -> /usr/lib/node_modules/whois/index.js
+ [email protected]
added 8 packages in 1.165s

Step 2: Create “example.js” script with the following content

Using your favourite text editor such as vim, nano or emacs:

var whois = require('whois')
whois.lookup('proxyrack.com', {"proxy": {"ipaddress": "162.210.198.8", "port": 1200, "type": 5}}, function(err, data) {
 console.log(data)
})

The parts you will want to edit:

‘proxyrack.com’ <— This is the domain you want to lookup

“ipaddress” <— Your proxy IP or hostname

“port” <— Port of your proxy

“type” <— 5 for SOCKS5 protocol or 4 for SOCKS4

If your proxy requires authentication you will need to whitelist it with your provider (this can be done in our panel).

Ready to run?

Simply execute

node example.js

LEAVE A COMMENT

Residential VPN is fully sold out!

Notify me when more slots are available

We expect more slots to be available in the next 2 weeks.
NOTIFY ME PLEASE