Skip to content

Instantly share code, notes, and snippets.

@primayudantra
Created June 25, 2019 15:50
Show Gist options
  • Save primayudantra/7cc61a04e927c025d3017121cff36d5f to your computer and use it in GitHub Desktop.
Save primayudantra/7cc61a04e927c025d3017121cff36d5f to your computer and use it in GitHub Desktop.
test.js
var dns = require('dns');
function reverseLookup(ip, cb) {
dns.reverse(ip, function(err,domains){
if(err!=null) callback(err);
cb(domains)
});
}
reverseLookup('213.46.228.196', (data) =>{
var domains = data[0];
console.log(domains);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment