A command-line tool for analyzing hosts on a network using various scanning techniques including ICMP echo requests, TCP port scanning, and ARP scanning. This tool is designed for network administrators and security professionals to assess network configurations and identify potential vulnerabilities.
- ICMP Echo Request (Ping) Scanning: Quickly check the availability of hosts.
- TCP Port Scanning: Identify open ports and services running on a host.
- ARP Network Scanning: Discover devices on a local network.
- Configurable Scan Types and Timeouts: Customize scans to suit your needs.
- Support for Port Ranges: Scan specific ports or entire ranges.
- Detailed Scan Results Output: Get comprehensive information about each scan.
- Python 3.6 or higher: Ensure you have the correct version of Python installed.
- Scapy 2.5.0 or higher: Required for packet crafting and network interactions.
- Root/Administrator Privileges: Necessary for raw socket operations.
- Clone the Repository:
git clone https://github.com/yourusername/network-scanner.git
cd network-scanner
- Install Dependencies:
pip install -r requirements.txt
Basic usage:
python src/main.py <target> [options]
- Scan a Single Host with All Scan Types:
python src/main.py 192.168.1.1
- Perform Only ICMP Scan:
python src/main.py 192.168.1.1 -t icmp
- Scan Specific Ports:
python src/main.py 192.168.1.1 -p 80,443,8080
- Scan a Port Range:
python src/main.py 192.168.1.1 -p 1-1000
- Scan a Network Subnet:
python src/main.py 192.168.1.0/24 -t arp
target
: Target IP address or network (required)-t, --type
: Type of scan to perform (choices: all, icmp, tcp, arp; default: all)-p, --ports
: Ports to scan (e.g., 80,443 or 1-1000)-T, --timeout
: Timeout in seconds for each scan (default: 2)
network-scanner/
├── src/
│ ├── main.py # Command-line interface
│ └── scanner.py # Core scanning functionality
├── tests/ # Test files
├── docs/ # Documentation
├── requirements.txt # Project dependencies
└── README.md # Project documentation
- Intrusive Nature: This tool performs network scanning which may be considered intrusive.
- Permission: Use only on networks you have permission to scan.
- Network Restrictions: Some networks may block ICMP or ARP requests.
- Privileges: Running the tool requires elevated privileges.
This project is licensed under the MIT License - see the LICENSE file for details.