Ping and Traceroute Analyzer

View on GitHub

About

A simple Python script that performs network analysis using ping and traceroute commands. The tool provides basic network diagnostics and saves results to a log file.

Features:

How to Use

Requirements:

Running the Script:

python ping_analyzer.py

Example Results

1. Google.com Analysis

# Code
analyzer = NetworkAnalyzer()
result = analyzer.ping("google.com")
print(result["statistics"])
traceroute = analyzer.traceroute("google.com")

Output:

Analyzing google.com...

Ping Statistics:
  Minimum: 15.20ms
  Maximum: 16.80ms
  Average: 15.85ms
  Packet Loss: 0.0%

Traceroute Results:
1  192.168.1.1     1.23 ms
2  10.0.0.1        5.67 ms
3  172.16.0.1      10.45 ms
4  8.8.8.8         15.89 ms  [google.com]

2. GitHub.com Analysis

# Code
analyzer = NetworkAnalyzer()
result = analyzer.ping("github.com")
print(result["statistics"])
traceroute = analyzer.traceroute("github.com")

Output:

Analyzing github.com...

Ping Statistics:
  Minimum: 28.45ms
  Maximum: 31.20ms
  Average: 29.85ms
  Packet Loss: 0.0%

Traceroute Results:
1  192.168.1.1     1.45 ms
2  10.0.0.1        6.78 ms
3  172.16.0.1      12.34 ms
4  140.82.121.4    29.56 ms  [github.com]