NetShark is a comprehensive command-line security scanning tool that combines multiple security analysis capabilities into a single, easy-to-use interface. Whether you're performing penetration testing, security audits, or learning about cybersecurity, NetShark provides the tools you need.
- π Fast & Efficient - Multi-threaded scanning for quick results
- π¨ Beautiful CLI - Colorful output with real-time progress indicators
- π§ Easy to Use - Simple commands, powerful results
- π¦ All-in-One - No need for multiple tools
- π οΈ Extensible - Modular architecture for easy customization
- π Multiple Formats - Export results as JSON, CSV, or TXT
|
|
|
|
- β¨ Beautiful CLI - Colorful terminal output with progress indicators
- π Multiple Export Formats - JSON, CSV, and TXT support
- π Cross-Platform - Works on Windows, Linux, and macOS
- β‘ High Performance - Optimized for speed and efficiency
- π‘οΈ Safe & Legal - Educational and authorized testing only
π§ Linux / macOS
# Clone the repository
git clone https://github.com/kalachbeg/netshark.git
cd netshark
# Install dependencies
pip install -r requirements.txt
# Run NetShark
python netshark.py --helpπͺ Windows
# Clone the repository
git clone https://github.com/kalachbeg/netshark.git
cd netshark
# Install Python 3.7+ if not already installed
# Then install dependencies
pip install -r requirements.txt
# Run NetShark
python netshark.py --help# Scan ports on a target
python netshark.py scan -t 192.168.1.1 -p 80,443,8080
# Analyze web security
python netshark.py web -u https://example.com
# Find subdomains
python netshark.py subdomain -d example.comClick to expand examples
# Scan common ports (1-1000)
python netshark.py scan -t 192.168.1.1
# Scan specific ports
python netshark.py scan -t example.com -p 80,443,8080
# Scan with banner grabbing
python netshark.py scan -t 192.168.1.1 -p 1-1000 --banner
# Scan UDP ports
python netshark.py scan -t 192.168.1.1 -p 53 -s udp
# Export results to JSON
python netshark.py scan -t 192.168.1.1 -o json -f results.jsonClick to expand examples
# Full web security analysis
python netshark.py web -u https://example.com
# SSL/TLS only
python netshark.py web -u https://example.com --ssl-only
# Export to CSV
python netshark.py web -u https://example.com -o csv -f security_report.csvClick to expand examples
# Basic enumeration
python netshark.py subdomain -d example.com
# With custom wordlist
python netshark.py subdomain -d example.com -w wordlist.txt
# With more threads (faster)
python netshark.py subdomain -d example.com -t 100Click to expand examples
# Monitor on default interface (Linux)
python netshark.py monitor -c 50
# Monitor specific interface
python netshark.py monitor -i eth0 -c 100
# With filter
python netshark.py monitor -f "tcp port 80" -c 50Note: Network monitoring on Windows uses basic netstat functionality. For full packet capture, use Linux with scapy installed.
--version- Show version information--help- Show help message
python netshark.py scan [OPTIONS]
Options:
-t, --target TEXT Target IP address or hostname [required]
-p, --ports TEXT Port range (e.g., 1-1000, 80,443,8080) [default: 1-1000]
-T, --timeout FLOAT Connection timeout in seconds [default: 1.0]
-s, --scan-type TEXT Scan type: tcp, udp, or both [default: tcp]
-o, --output TEXT Output format: json, csv, or txt
-f, --file TEXT Output file path
--banner Grab service banners
python netshark.py web [OPTIONS]
Options:
-u, --url TEXT Target URL [required]
-o, --output TEXT Output format: json, csv, or txt
-f, --file TEXT Output file path
--ssl-only Only check SSL/TLS configuration
python netshark.py subdomain [OPTIONS]
Options:
-d, --domain TEXT Target domain [required]
-w, --wordlist TEXT Custom wordlist file path
-t, --threads INTEGER Number of threads [default: 50]
-o, --output TEXT Output format: json, csv, or txt
-f, --file TEXT Output file path
python netshark.py monitor [OPTIONS]
Options:
-i, --interface TEXT Network interface (e.g., eth0, wlan0)
-c, --count INTEGER Number of packets to capture [default: 100]
-f, --filter TEXT BPF filter (e.g., tcp port 80)
-o, --output TEXT Output format: json, csv, or txt
--file TEXT Output file path
# Perform a complete security check
python netshark.py web -u https://example.com -o json -f audit.json# Scan common ports on a network
python netshark.py scan -t 192.168.1.1 -p 1-1000 --banner# Find all subdomains
python netshark.py subdomain -d example.com -t 100 -o txt -f subdomains.txt
# Then scan ports on discovered subdomains
# (Use subdomains.txt to iterate)# 1. Find subdomains
python netshark.py subdomain -d example.com -o json -f subs.json
# 2. Analyze web security for each subdomain
python netshark.py web -u https://www.example.com -o csv -f security.csv
# 3. Scan open ports
python netshark.py scan -t example.com -p 80,443,8080,8443| Component | Version | Description |
|---|---|---|
| Python | 3.7+ | Tested with 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 |
| click | β₯8.0.0 | CLI framework |
| requests | β₯2.28.0 | HTTP library |
| dnspython | β₯2.3.0 | DNS operations |
| scapy | β₯2.5.0 | Network packet manipulation (Linux only, optional) |
netshark/
βββ π netshark.py # Main CLI entry point
βββ π modules/
β βββ __init__.py
β βββ π port_scanner.py # Port scanning module
β βββ π web_security.py # Web security analysis
β βββ π subdomain_enum.py # Subdomain enumeration
β βββ π network_monitor.py # Network monitoring
βββ π utils/
β βββ __init__.py
β βββ π¨ colors.py # Terminal colors
β βββ π€ output.py # Output formatting
βββ π requirements.txt # Python dependencies
βββ π LICENSE # MIT License
βββ π README.md # This file
This tool is for educational and authorized security testing purposes only.
- Only scan systems you own or have explicit permission to test
- Unauthorized scanning is illegal in many jurisdictions
- The authors are not responsible for misuse of this tool
- Always comply with local laws and regulations
We welcome contributions! Here's how you can help:
- β Star the repository - Show your support!
- π΄ Fork the project - Create your own copy
- πΏ Create a branch -
git checkout -b feature/AmazingFeature - πΎ Commit changes -
git commit -m 'Add some AmazingFeature' - π€ Push to branch -
git push origin feature/AmazingFeature - π Open a Pull Request - Let's discuss your changes!
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ UI/UX enhancements
- β‘ Performance optimizations
- π§ͺ Test coverage
This project is licensed under the MIT License - see the LICENSE file for details.
- π― Inspired by tools like Nmap, Masscan, and Subfinder
- π Built with Python and the amazing open-source community
- π‘ Thanks to all contributors and users!