npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

domainprobe

v1.1.0

Published

A Node.js package for retrieving detailed information about a domain including its IP address and location.

Downloads

5

Readme

domainprobe

The Domain Info Extractor is a Node.js package that allows users to provide a domain name and retrieve detailed information such as IP address and location.

Installation:

  • You can install the package using npm:
    npm install domainprobe

Features:

  • you can get ip address of domain name (e.g- 'https://github.com/)
  • you can get information regarding domain name (e.g- location , hostname, longitude,latitude etc)
  • you can get hostname using ip address.
  • you can get infomation directly using ip address. (e.g- location,hostname,etc)
  • you can get exact location using latitude and longitude
  • get text records,mx records,cname records.

Usage:

  • *Importing the Package
    const info = require('domainprobe');

Functions available (1):

  • get_ip('domain_name',callback)
  • This function retrieves the IP address of a domain.
  • Example-

    info.get_ip('https://github.com/', (err, address) => {
        if(err) {
            console.error(err);
        } else {
            console.log(address);
        }
    });

  • Output-
    [ { address: '20.207.73.82', family: 4 } ]

Function available (2):

  • data_extract(domain_name, callback)
  • This function provides detailed information about a domain, including its IP address, city, region, country, organization, postal code, timezone, longitude, and latitude.
  • Example-

    info.data_extract('https://github.com/', (err, data) => {
        if(err) {
               console.error(err);
        } else {
            console.log(data);
        }
    });

  • Output-
    {
      ip: '20.207.73.82',
      city: 'Pune',
      region: 'Maharashtra',
      country: 'IN',
      org: 'AS8075 Microsoft Corporation',
      postal: '411001',
      timezone: 'Asia/Kolkata',
      longitude: 18.5196,
      latitude: 73.8554
    }      

Function available (3):

  • get_hostname(ip_address,callback)

  • this function is used to get hostname by using the ip address.

  • Example-


    info.get_hostname('157.240.198.174', (err, data) => {
        if(err) {
               console.error(err);
        } else {

            console.log(data);
        }
    });

  • Output
    Hostnames for 157.240.198.174:
    [ 'instagram-p42-shv-01-del1.fbcdn.net' ]

Function available (4):

  • data_extract_ip(ip_address,callback)
  • this function is used to get information (detailed) of an ip address.
  • Example-

    info.data_extract_ip('157.240.198.174', (err, data) => {
        if(err) {
               console.error(err);
        } else {

            console.log(data);
        }
    });

  • *Output-
    {
      ip: '157.240.198.174',
      hostname: 'instagram-p42-shv-01-del1.fbcdn.net',
      city: 'Noida',
      region: 'Uttar Pradesh',
      country: 'IN',
      org: 'AS32934 Facebook, Inc.',
      postal: '201005',
      timezone: 'Asia/Kolkata',
      longitude: 28.58,
      latitude: 77.33
    }

Function available (5):

  • exact_location(longitude,latitude,callback)
  • this function is used for getting exact location from the latitude and longitude. you can get lat and long from above functions 'data_extract' and 'data_extract_ip'.
  • Example-
    info.exact_location(28.58,77.33, (err, result) => {
    if (err) {
      console.error('Error:', err);
    } else {
      console.log('Result:', result);
    }
  });
  • Output-
    Result: {
    suburb: 'Sector 10',
    city: 'Noida',
    town: 'Dadri',
    state_district: 'Gautam Buddha Nagar District',
    state: 'Uttar Pradesh',
    'ISO3166-2-lvl4': 'IN-UP',
    postcode: '201301',
    country: 'India',
    country_code: 'in'
    }

Function available (6);

  • Example
    info.get_text("https://github.com", (err, result) => {
    if (err) {
      console.error('Error:', err);
    } else {
      console.log('Result:', result);
    }
  });



  //similar functions 'get_mx','get_cname'

Example 1:

  • Code-
    const info = require('domainprobe');
    info.get_ip('https://www.instagram.com/', (err, address) => {
        if(err) {
            console.error(err);
        } else {
            console.table(address);
        }
    });

  • Output- Screenshot

Example 2:

  • Code-
    const info = require('domainprobe');
    info.data_extract('https://www.instagram.com/', (err, address) => {
        if(err) {
            console.error(err);
        } else {
            console.table(address);
        }
    });
  • Output- Screenshot

Example 3:

  • Code-
    const info = require('domainprobe');


    info.get_ip('https://www.instagram.com/', (err, address) => {
        if(err) {
            console.error(err);
        } else {
            console.table(address);
        }
    });

    info.data_extract('https://github.com/', (err, address) => {
        if(err) {
            console.error(err);
        } else {
            console.table(address);
        }
    });


  • Output- Screenshot