New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ip-trace

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-trace

A npm module that uses traceroute to find routed routes to a destination. A more detailed way to use this library is in './test'.

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

ip-trace

A npm module that uses traceroute to find routed routes to a destination. A more detailed way to use this library is in './test'.

Installation

npm install ip-trace

Start

import {Hop, iptrace} from 'ip-trace'

const tracer = iptrace('naver.com');

const maxHop = 5;

tracer.onHop((hop: Hop) => {
    if(hop.hop >= maxHop){
        tracer.end();
    }
    /** result:
    * 192.168.0.1 14.376 ms
    * 123.100.176.1 9.364 ms
    * 119.77.96.53 11.235 ms
    * 119.77.96.33 7.958 ms
    * 123.111.216.229 7.674 ms
    */
    console.log(hop.ip.address + " " + hop.time);
}).onClose((msg) => {
    /** 
     *  result : null
     */
    console.log(msg);
}).start();

Testing

npm run test

To do

  • support windows

FAQs

Package last updated on 10 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts