Created
June 25, 2019 15:50
-
-
Save primayudantra/7cc61a04e927c025d3017121cff36d5f to your computer and use it in GitHub Desktop.
test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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