Skip to content

Ping all hosts on two networks and identify hosts that replied on one subnet but not on the other

Notifications You must be signed in to change notification settings

mrjoelkamp/NetworkPingComparator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetworkPingComparator

NetworkPingComparator is a Python module for pinging two networks and displaying the difference in host reponses.

Installation

Requires pytest~=6.2.4

Use the package manager pip to install requirements.

pip install -r requirements

Usage

from network_ping_comparator import NetworkPingComparator

# define networks to test
NETWORK_1 = "192.168.1.0/24"
NETWORK_2 = "192.168.2.0/24"

# list of excluded addresses
EXCLUDED_HOST = ["0", "255"]

comparator = NetworkPingComparator(NETWORK_1, NETWORK_2)
comparator.exclude_host(EXCLUDED_HOST)
comparator.run()
result = comparator.output()

Test

Unit tests are in ./tests/

Run using pytest at root project directory

./pytest

License

[None]

About

Ping all hosts on two networks and identify hosts that replied on one subnet but not on the other

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages