Skip to content

Common networking tools reimplemented including a ground-up rebuild of scapy 📡

License

Notifications You must be signed in to change notification settings

adamalston/Network-Tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Tools

License

Network tools based around scapy.

Example Operations

Segment Hosts

Find hosts inside of 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']

Ping

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

Port Scanning

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}

Traceroute

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']

This repository also contains a work-in-progress reimplementation of scapy (scanner.py). nmap.py and nmap_auto.py delve into the usability of this reimplmentation.


Includes contributions from Ben Gabay.