Python Network Operations for Humans
Perform trace to the given host.
>>> import networks
>>> stations = networks.trace("www.google.com", max_hops=20, timeout=5)
>>> stations
['192.168.1.1', '0.0.0.0', None, '172.18.9.214', '172.17.3.118', None, None, '209.85.241.75', '172.217.18.100']
Perform arp spoofing attack on the given target.
>>> import networks
>>> target = "192.168.1.40"
>>> gateway = "192.168.1.1"
>>> networks.arp_spoofing(target, gateway, interval=1, timeout=120)
Perform port scanning on the given target.
>>> import networks
>>> ports = networks.port_scanning("192.168.1.40", min_port=78, max_port=81, timeout=30)
>>> ports
{78: False, 79: False, 80: True, 81: False}
Send ICMP packets to the given host.
>>> import networks
>>> host_up = networks.ping("www.google.com", count=5, ttl=30, timeout=5)
>>> host_up
True
get hosts inside a given segment.
>>> import networks
>>> hosts = networks.get_hosts_in_segment("192.168.1.0")
>>> hosts
['192.168.1.1', '192.168.1.40', '192.168.1.23']