How projectdiscovery/naabu works
Main Components Identification
The system should be represented with these key components:
a) Core Components:
• Command Line Interface (cmd/naabu)
• Runner System (pkg/runner)
• Scanning Engine (pkg/scan)
• Results Handler (pkg/result)
• Protocol Handler (pkg/protocol)
b) Supporting Components:
• Port Management (pkg/port)
• Privilege Handler (pkg/privileges)
• Routing System (pkg/routing)
┌─ Input Layer ─────────────────────┐
• CLI Interface │
• Configuration Management │
• Input Validation │
• ┬──────────────────┘
• ↓
┌─ Core Processing Layer ───────────┐
• ┌─ Runner Engine ───────────────┐ │
• Target Management │ │
• Port Selection │ │
• Scan Orchestration │ │
• ┬────────────────┘ │
• ↓ │
• ┌─ Scanning Engine ────────────┐ │
• SYN Scanning │ │
• Connect Scanning │ │
• UDP Scanning │ │
• Host Discovery │ │
• ┬────────────────┘ │
• ┬──────────────────┘
• ↓
┌─ Output Layer ──────────────────┐
• Results Processing │
• Output Formatting │
• Nmap Integration │
• ┘
Integration Points
External integration capabilities:
• Nmap integration
• Shodan InternetDB API
• DNS resolution system
• Metrics endpoint
Technical Details
Annotations for:
• Supported protocols (TCP SYN, CONNECT, UDP)
• Port scanning strategies
• Host discovery methods (ARP, ICMP, TCP ping)
• Performance configurations (rate limiting, threading)