Skip to content

Advanced network scanner using ARP requests for host discovery. Features multi-threading, comprehensive information extraction, port scanning, and professional output formatting for cybersecurity professionals.

Notifications You must be signed in to change notification settings

Sergios9494/network-scanner-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Advanced Network Scanner

A powerful Python network scanner that uses ARP requests to discover active hosts on a network. Features comprehensive information extraction, multi-threading, and professional output formatting.

Features

๐Ÿ” Network Discovery

  • ARP Scanning: Uses ARP requests for fast host discovery
  • MAC Address Detection: Extracts MAC addresses from ARP responses
  • Hostname Resolution: DNS hostname lookup for discovered hosts
  • Vendor Identification: MAC address vendor/manufacturer detection
  • Port Scanning: Quick scan of common ports (21, 22, 23, 25, 53, 80, 110, 135, 139, 143, 443, 993, 995, 3389)
  • Service Detection: Identifies services running on open ports

โšก Performance Features

  • Multi-threading: Configurable thread pool for concurrent scanning
  • ThreadPoolExecutor: Professional thread management
  • Rate Limiting: Prevents network overwhelming
  • Timeout Control: Configurable timeouts for optimal performance
  • Progress Tracking: Real-time scan progress display
  • Memory Efficient: Streams results instead of storing all in memory

๐Ÿ“Š Output Features

  • Formatted Tables: Clean, readable output with proper alignment
  • Multiple Formats: JSON and CSV export options
  • Timestamped Results: Records when each host was discovered
  • Response Times: Measures ARP response times
  • Verbose Mode: Detailed logging and progress information

๐Ÿ›ก๏ธ Security Features

  • Non-intrusive: Uses ARP requests (Layer 2)
  • Rate Limiting: Prevents network flooding
  • Error Handling: Comprehensive error handling and recovery
  • Graceful Interruption: Handles Ctrl+C gracefully

Installation

Prerequisites

  • Python 3.7+
  • Required libraries: scapy, socket, threading, ipaddress

Dependencies

# Install required packages
pip install scapy

# Or on Kali Linux
sudo apt install python3-scapy

Setup

# Download the tool
git clone https://github.com/Sergios9494/network-scanner-tool.git
cd network-scanner-tool

# Make executable
chmod +x Crazy_network_scann.py

Usage

Basic Usage

# Scan a local network
python3 Crazy_network_scann.py 192.168.1.0/24

# Scan with custom thread count
python3 Crazy_network_scann.py 192.168.1.0/24 --threads 100

# Verbose scan with progress tracking
python3 Crazy_network_scann.py 10.0.0.0/24 --verbose

Advanced Usage

# High-performance scan
python3 Crazy_network_scann.py 192.168.1.0/24 --threads 200 --timeout 1

# Save results to file
python3 Crazy_network_scann.py 172.16.0.0/16 --output scan_results --format json

# CSV export with verbose output
python3 Crazy_network_scann.py 10.0.0.0/24 --verbose --output network_scan --format csv

Command Line Options

positional arguments:
  network               Network to scan (CIDR notation, e.g., 192.168.1.0/24)

options:
  -h, --help            show this help message and exit
  --threads, -t THREADS
                        Maximum number of threads (default: 50)
  --timeout TIMEOUT     Timeout for ARP requests in seconds (default: 2)
  --verbose, -v         Enable verbose output
  --output, -o OUTPUT   Output filename (without extension)
  --format {json,csv}   Output format (default: json)

Examples

Example 1: Basic Network Scan

python3 Crazy_network_scann.py 192.168.1.0/24

Output:

========================================================================================================================
NETWORK SCAN RESULTS
========================================================================================================================
IP              MAC               Hostname                 Vendor               Open Ports                    Services
------------------------------------------------------------------------------------------------------------------------
192.168.1.1     00:11:22:33:44:55 router.local            Cisco                80, 443                     80/HTTP, 443/HTTPS
192.168.1.100   08:00:27:12:34:56 desktop-pc              VirtualBox           22, 80, 3389                 22/SSH, 80/HTTP, 3389/RDP
192.168.1.101   B8:27:EB:AB:CD:EF raspberry-pi            Raspberry Pi         22, 80                       22/SSH, 80/HTTP
========================================================================================================================
Total hosts found: 3
Scan duration: 2.45 seconds

Example 2: High-Performance Scan

python3 Crazy_network_scann.py 10.0.0.0/24 --threads 100 --timeout 1 --verbose

Example 3: Export Results

python3 Crazy_network_scann.py 172.16.0.0/16 --output enterprise_scan --format csv

Information Extracted

For each discovered host, the scanner extracts:

  • IP Address: Host IP address
  • MAC Address: Physical MAC address
  • Hostname: DNS hostname (if available)
  • Vendor: MAC address vendor/manufacturer
  • Open Ports: Common ports that are open
  • Services: Services running on open ports
  • Response Time: ARP response time
  • Timestamp: When the host was discovered

Performance Tips

Thread Count Optimization

  • Small Networks (< 100 hosts): 20-50 threads
  • Medium Networks (100-500 hosts): 50-100 threads
  • Large Networks (> 500 hosts): 100-200 threads
  • Default: 50 threads (good balance)

Timeout Settings

  • Fast Networks: 1 second timeout
  • Slow Networks: 2-3 second timeout
  • Default: 2 seconds (balanced)

Network Considerations

  • Local Networks: Use higher thread counts
  • Remote Networks: Use lower thread counts
  • Corporate Networks: Be mindful of network policies

Security Considerations

โš ๏ธ Important: This tool is designed for:

  • Authorized network testing
  • Network administration
  • Security research on your own networks
  • Educational purposes

Legal Notice

  • Always obtain proper authorization before scanning
  • Only scan networks you own or have explicit permission to test
  • Respect network policies and rate limits
  • The author is not responsible for misuse

Ethical Guidelines

  • Use responsibly and ethically
  • Respect others' privacy and network resources
  • Follow applicable laws and regulations
  • Report vulnerabilities responsibly

Troubleshooting

Common Issues

Permission Denied

# Run with sudo for raw socket access
sudo python3 Crazy_network_scann.py 192.168.1.0/24

Module Not Found

pip install scapy
# or
sudo apt install python3-scapy

No Results Found

  • Check network range and connectivity
  • Verify you're on the correct network
  • Try increasing timeout: --timeout 5
  • Enable verbose mode: --verbose

Slow Performance

  • Increase thread count: --threads 100
  • Decrease timeout: --timeout 1
  • Check network congestion

Memory Issues

  • Reduce thread count: --threads 20
  • Use smaller network ranges
  • Monitor system resources

Performance Optimization

For Fast Scans:

# High thread count with short timeout
python3 Crazy_network_scann.py 192.168.1.0/24 --threads 200 --timeout 1

For Thorough Scans:

# More threads with longer timeout
python3 Crazy_network_scann.py 10.0.0.0/24 --threads 100 --timeout 3 --verbose

Technical Details

Dependencies

  • scapy: Packet manipulation and network scanning
  • socket: Network communication and hostname resolution
  • threading: Concurrent processing
  • ipaddress: Network range handling
  • concurrent.futures: Thread pool management

Architecture

  • Class-based Design: Organized and maintainable code
  • ThreadPoolExecutor: Professional thread management
  • ARP Protocol: Layer 2 network discovery
  • Stream Processing: Memory-efficient result handling

Supported Networks

  • IPv4 Networks: All IPv4 network ranges
  • CIDR Notation: Standard CIDR format (e.g., 192.168.1.0/24)
  • Local Networks: LAN and WAN scanning
  • VLAN Support: Works with VLAN configurations

Contributing

Contributions are welcome! Please feel free to submit:

  • Bug reports
  • Feature requests
  • Performance improvements
  • Documentation updates

License

This project is licensed under the MIT License.

Author

Sergios9494 - Cybersecurity Professional

Acknowledgments

  • Built for cybersecurity professionals
  • Designed for network administration and security testing
  • Inspired by network reconnaissance needs

Scan Responsibly! ๐ŸŒ

About

Advanced network scanner using ARP requests for host discovery. Features multi-threading, comprehensive information extraction, port scanning, and professional output formatting for cybersecurity professionals.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages