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

mxtoolkit

v1.0.12

Published

Node Api Wrapper for MXToolkit

Downloads

115

Readme

mxtoolkit

Node JS Wrapper for the MXTools API. https://mxtoolbox.com/User/Api/Usage.aspx

With this module you can easily lookup information on MX record's, DNS, blacklist and SMTP with a response in JSON.

Available Tools
blacklist:      Check IP or host for reputation
smtp:           Test mail server SMTP (port 25)
mx:             DNS MX records for domain
a:              DNS A record IP address for host name
spf:            Check SPF records on a domain
txt:            Check TXT records on a domain
ptr:            DNS PTR record for host name
soa:            Get Start of Authority record for a domain
tcp:            Verify an IP Address allows tcp connections
http:           Verify a URL allows http connections  
https:          Verify a URL allows secure http connections  
ping:           Perform a standard ICMP ping
trace:          Perform a standard ICMP trace route
dns:            Check your DNS Servers for possible problems  New!

This module requires an api key from https://mxtoolbox.com otherwise you are severely rate limited.

Installation

npm install mxtoolkit

Usage Example

var mxToolkit = require("mxtoolkit");
var apiKey = '#########################'
var urlToQuery = 'google.com'
    mxToolkit.dns(urlToQuery,apiKey,function(resp){
        console.log(resp);
    });

Each Tool is called by its name as it appears in the list above For example to lookup txt record information the above function would look like this

var mxToolkit = require("mxtoolkit");
var apiKey = '#########################'
var urlToQuery = 'google.com'
mxToolkit.txt(urlToQuery,apiKey,function(resp){
    console.log(resp);
});

The only thing thats different from the first function is this bit 'mxToolkit.txt'.

All of the tools are called in this manner with the same parameters.

The response you get from these tools is always returned in JSON for valid requests and an error message will be returned in case of a failed call due to bad parameters.

Response will look something like this(this is truncated as the actual responses are much more verbose)

{
  "UID": null,
  "Command": "dns",
  "IsTransitioned": false,
  "CommandArgument": "example.com",
  "TimeRecorded": "2016-01-14T06:36:51.9295768-06:00",
  "ReportingNameServer": null,
  "TimeToComplete": "0",
  "RelatedIP": "93.184.216.34",
  "IsEndpoint": false,
  "HasSubscriptions": false,
  "Failed": [],
  "Warnings": [],
  "Passed": [],
  "Timeouts": [],
  "Errors": []
 }