Giter Club home page Giter Club logo

tracert's Introduction

Tracert

Tracert is a golang based traceroute tool.

  • Trace to destination using ip / url
  • Show a sorted list of delays between hops from highes delay to lowest
  • only works with IPv4

Technical Spec

This tool uses standard go libraries and developed using go 1.12.5 based on osX.

How to Compie

$ go build -o trace main.go models.go

How to use

$ trace -address www.example.com

Since This application is based on system calls you need to have root privileges to run it.

Usage

There are optional parameters you can pass:

Usage : trace -address=address/ip [-port=portnumber][-maxhops=hopnumber][-timeout=milliseconds][-retry=retriesnumber]
  -address string
    	Enter an URL or an IP e.g. www.google.com or 1.1.1.
  -maxhops int
    	Enter Maximum Hop for tracing (default 30)
  -port int
    	Enter a Port Number (default 33443)
  -retry int
    	Enter Number of Retries (default 3)
  -timeout int
    	Enter Timeout in Milliseconds (1000 = 1s) (default 1000)

Run Test

You need to have root privileges for running tests

$ sudo go test

General Idea

Traceroute sends packets with TTL values that gradually increase from packet to packet, starting with TTL value of one. Routers decrement TTL values of packets by one when routing and discard packets whose TTL value has reached zero(https://en.wikipedia.org/wiki/Traceroute).
Instead of checking ICMP echo type we only rely on destination IP address, if the destination IP address we reached was the one we have requested we've reached the desired destination.

tracert's People

Contributors

vahidhashemi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.