Git Product home page Git Product logo

traceroute's Introduction

Traceroute

This is a simple Python script that performs a traceroute to a given host using the scapy and the ipwhois libraries (IPv6 supported)

Requirements

  • Python 3.x
  • scapy library
  • ipwhois library

Installation

  1. Clone the repository:
git clone https://github.com/AIM1rage/Traceroute.git
  1. Install the required dependencies:
pip install scapy
pip install ipwhois

Usage

python traceroute.py [-h] [-src SRC] [-seq SEQ] [-ttl TTL] [-c C] [-d D] [-t T] [-s S] host

Perform a traceroute to a specified host.

Positional Arguments:

  • host - The IP address or domain name to trace the route to.

Optional Arguments:

  • -h, --help - Show the help message and exit.
  • -src - Source address (default: [your local address])
  • -seq SEQ - Additional sequence number (default: 42).
  • -ttl TTL - Maximum time-to-live value (default: 30).
  • -c C - Requests count (default: 3).
  • -d D - Delay between requests in seconds (default: 0).
  • -t T - Request timeout in seconds (default: 0.5).
  • -s S - Packet size (default: 40)

Example

To trace the route to public Google DNS 8.8.8.8 with optional arguments: ttl = 10 and t = 2 (seconds):

python traceroute.py 8.8.8.8 -ttl 10 -t 0.3

Testing

In order to test my code, you can run the script using the following command (Windows only!)

python -m unittest -v traceroute_should.TracerouteTest

traceroute's People

Contributors

aim1rage 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.