Skip to content

A network scanner project. The idea was from cybercademy.org. [Still not complete, will work on during the summer break]

Notifications You must be signed in to change notification settings

0xShun/Basic_Network_Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Scanner

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.

Features

  • 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.

Requirements

  • 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.

Installation

  1. Clone the Repository:
git clone https://github.com/yourusername/network-scanner.git
cd network-scanner
  1. Install Dependencies:
pip install -r requirements.txt

Usage

Basic usage:

python src/main.py <target> [options]

Examples

  1. Scan a Single Host with All Scan Types:
python src/main.py 192.168.1.1
  1. Perform Only ICMP Scan:
python src/main.py 192.168.1.1 -t icmp
  1. Scan Specific Ports:
python src/main.py 192.168.1.1 -p 80,443,8080
  1. Scan a Port Range:
python src/main.py 192.168.1.1 -p 1-1000
  1. Scan a Network Subnet:
python src/main.py 192.168.1.0/24 -t arp

Command Line Options

  • 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)

Project Structure

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

Security Considerations

  • 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.