Skip to content

PyScanNet is a powerful and versatile network scanner implemented in Python, designed to facilitate comprehensive network reconnaissance and analysis. Leveraging the robust capabilities of Python, PyScanNet provides an intuitive and efficient platform for discovering devices, services, and vulnerabilities within a network environment.

License

Notifications You must be signed in to change notification settings

aenoshrajora/PyScanNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

network-scanner

Simple network scanner built with Scapy for Python

Usage

Perform either an ARP scan or TCP scan.

  • An ARP scan will send ARP requests to all devices on the local network, and collect the ARP replies to discover IP address to MAC address mappings.
  • A TCP scan will send TCP SYN packets to all specified ports, and collect the SYN+ACK replies to discover which ports are open.

If you are on a UNIX-based system, please run the script as root (use sudo).

usage: scanner.py [-h] {ARP,TCP} ...

positional arguments:
  {ARP,TCP}   Command to perform.
    ARP       Perform a network scan using ARP requests.
    TCP       Perform a TCP scan using SYN packets.

optional arguments:
  -h, --help  show this help message and exit

ARP Scan

Either an IP address or IP address range can be used. For example, python3 scanner.py ARP 192.168.2.1/24 scans all IP addresses in the 192.168.2.0/24 subnet.

usage: scanner.py ARP [-h] IP

positional arguments:
  IP          An IP address (e.g. 192.168.1.1) or address range (e.g.
              192.168.1.1/24) to scan.

optional arguments:
  -h, --help  show this help message and exit

TCP Scan

Either specific ports or a range of ports can be used. For example, python3 scanner.py TCP 192.168.2.1 --range 0 1000 scans all ports from 0 to 1000.

usage: scanner.py TCP [-h] [--range] IP ports [ports ...]

positional arguments:
  IP          An IP address or hostname to target.
  ports       Ports to scan, delimited by spaces. When --range is specified,
              scan a range of ports. Otherwise, scan individual ports.

optional arguments:
  -h, --help  show this help message and exit
  --range     Specify a range of ports. When this option is specified, <ports>
              should be given as <low_port> <high_port>.

Common Errors

If you receive AttributeError: 'L2bpfSocket' object has no attribute 'ins', you likely need to run the script as root (use sudo). See https://stackoverflow.com/questions/55881295/l3packetsocket-object-has-no-attribute-ins-when-using-send-command

About

PyScanNet is a powerful and versatile network scanner implemented in Python, designed to facilitate comprehensive network reconnaissance and analysis. Leveraging the robust capabilities of Python, PyScanNet provides an intuitive and efficient platform for discovering devices, services, and vulnerabilities within a network environment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages