Skip to content

Releases: doublegate/ProRT-IP

ProRT-IP WarScan v0.5.9

29 Nov 05:11

Choose a tag to compare

ProRT-IP WarScan v0.5.9

Modern network scanner combining Masscan speed with Nmap detection depth.

📊 Project Statistics

  • Tests: 513+
  • Lines of Code: 105570+
  • Crates: 4 (prtip-core, prtip-network, prtip-scanner, prtip-cli)

✨ Key Features

  • 7 scan types: TCP Connect, SYN, UDP, FIN, NULL, Xmas, ACK
  • OS fingerprinting: 16-probe Nmap sequence with weighted scoring
  • Service detection: nmap-service-probes format with 500+ probes
  • Banner grabbing: HTTP, FTP, SSH, SMTP, DNS, SNMP (6 protocols + TLS)
  • Timing templates: T0-T5 (Paranoid to Insane) with RTT estimation
  • Adaptive rate limiting: Masscan-inspired circular buffer with dynamic batching
  • Decoy scanning: Up to 256 decoys for stealth attribution hiding
  • CDN/WAF detection: 8 major providers with O(log n) lookup
  • Batch packet sending: sendmmsg syscall (30-50% performance boost at 1M+ pps)

📦 Installation

Download the appropriate binary for your platform below.

Linux (x86_64)

# GNU libc (most distributions)
wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.9/prtip-0.5.9-x86_64-unknown-linux-gnu.tar.gz
tar xzf prtip-0.5.9-x86_64-unknown-linux-gnu.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

# musl (Alpine, static binary)
wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.9/prtip-0.5.9-x86_64-unknown-linux-musl.tar.gz
tar xzf prtip-0.5.9-x86_64-unknown-linux-musl.tar.gz

Windows (x86_64)

# Download and extract
curl -L -o prtip-0.5.9-x86_64-pc-windows-msvc.zip https://github.com/doublegate/ProRT-IP/releases/download/v0.5.9/prtip-0.5.9-x86_64-pc-windows-msvc.zip
Expand-Archive prtip-0.5.9-x86_64-pc-windows-msvc.zip

# Requires Npcap: https://npcap.com/

macOS (x86_64)

wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.9/prtip-0.5.9-x86_64-apple-darwin.tar.gz
tar xzf prtip-0.5.9-x86_64-apple-darwin.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

Build from Source

git clone https://github.com/doublegate/ProRT-IP.git
cd ProRT-IP
git checkout v0.5.9
cargo build --release
./target/release/prtip --help

🔧 Usage Examples

# Basic SYN scan
prtip -sS -p 1-1000 192.168.1.0/24

# OS detection + service detection
prtip -sS -O -sV -p 1-1000 10.0.0.1

# Stealth scan with decoys
prtip -sF -D RND:10 -p 80,443 target.com

# Fast scan with progress
prtip -T4 -p- --progress 192.168.1.1

📚 Documentation

🔒 Security

This is a security research tool intended for:

  • Penetration testing
  • Network security auditing
  • Educational purposes
  • Red team operations

Always obtain proper authorization before scanning networks.

See SECURITY.md for responsible use guidelines.

📝 Changelog

Executive Summary

TUI Event Flow Fix release resolving critical display issues where prtip --tui failed to show scan progress and results. Identified and fixed 6 root causes across event aggregation, scanner initialization, service detection, and progress tracking. All TUI dashboard tabs now display real-time scan data with proper event publishing and state management.

Fixed

  • TUI Event Display Fix Series (commits cdad62c, 2a051ad, b3776e7, 2cb2840)
    • Root Cause 1: EventAggregator Event Swallowing (commit cdad62c)

      • EventAggregator counted high-frequency events (PortFound, HostDiscovered, ServiceDetected) but never buffered them for handler processing
      • Events were tallied in statistics but never reached handle_scan_event() for TUI consumption
      • Fix: Buffer all high-frequency events in aggregator for proper handler processing
      • Modified: crates/prtip-scanner/src/event/aggregator.rs (+12 lines)
    • Root Cause 2: Scanner Progress Events Missing (commit cdad62c)

      • Scanner didn't publish ProgressUpdate events to EventBus for TUI consumption
      • TUI Metrics dashboard had no scan progress data to display
      • Fix: Added ProgressTracker struct to scheduler with 250ms progress publishing interval
      • Modified: crates/prtip-scanner/src/scheduler/mod.rs (+45 lines)
    • Root Cause 3: TCP Scanner Not Attached to EventBus (commit 2a051ad)

      • TCP scanner was NOT attached to EventBus during initialization
      • PortFound events were never published to the event system
      • Port Table widget remained empty despite successful scans
      • Fix: Attach EventBus to TCP scanner via with_event_bus() in scheduler constructor
      • Modified: crates/prtip-scanner/src/scheduler/mod.rs (+3 lines)
    • Root Cause 4: Service Detection Events Not Published (commit b3776e7)

      • Service detection didn't publish ServiceDetected events to EventBus
      • Service Table widget remained empty despite successful service detection
      • Fix: Publish ServiceDetected events after successful service detection with confidence scores
      • Modified: crates/prtip-scanner/src/detection/service.rs (+8 lines)
    • Root Cause 5: Metrics Dashboard Scan Duration (commit b3776e7)

      • Metrics dashboard didn't track scan start time for duration calculation
      • Duration field showed incorrect or missing values
      • Fix: Track scan_start_time in ScanState, set on ScanStarted event
      • Modified: crates/prtip-tui/src/state.rs (+5 lines)
      • Modified: crates/prtip-tui/src/handlers/scan_events.rs (+3 lines)
    • Root Cause 6: execute_scan_ports() Progress Events Missing (commit 2cb2840)

      • execute_scan_ports() never published ProgressUpdate events during scan
      • Metrics dashboard and Network Graph had no data for TCP Connect scans
      • Progress tracking was only available for SYN/UDP/Stealth scans
      • Fix: Add ProgressTracker to execute_scan_ports() for real-time updates
      • Modified: crates/prtip-scanner/src/scheduler/mod.rs (+28 lines)

Changed

  • TUI Event Flow Improvements:
    • All 4 dashboard tabs now receive real-time events (Port Table, Service Table, Metrics, Network Graph)
    • Event publishing interval: 250ms for balanced responsiveness and performance
    • TCP Connect scan progress tracking added (was only SYN/UDP/Stealth before)
    • Network Graph data calculations improved (packets_received, ports_per_second)
    • Service detection events include confidence scores for Service Table filtering

Technical Details

  • Files Modified: 5 files across prtip-scanner and prtip-tui
    • crates/prtip-scanner/src/event/aggregator.rs (+12 lines)
    • crates/prtip-scanner/src/scheduler/mod.rs (+76 lines total)
    • crates/prtip-scanner/src/detection/service.rs (+8 lines)
    • crates/prtip-tui/src/state.rs (+5 lines)
    • crates/prtip-tui/src/handlers/scan_events.rs (+3 lines)
  • Total Changes: +104 lines of critical event flow fixes
  • Testing: All 2,557 tests passing (100% success rate)
  • Impact: Complete TUI functionality with real-time scan visualization across all dashboard tabs

🤝 Contributing

See CONTRIBUTING.md for guidelines.

📄 License

GPL-3.0 - See LICENSE


🤖 Generated with GitHub Actions

v0.5.8: Coverage Workflow Stabilization

27 Nov 07:46

Choose a tag to compare

Release v0.5.8: Coverage Workflow Stabilization

Executive Summary

Coverage workflow stabilization release resolving CI/CD infrastructure issues including disk space exhaustion, tarpaulin hangs, and duplicate argument conflicts. This release ensures reliable automated code coverage reporting with cargo-tarpaulin ptrace engine and establishes 51.40% coverage baseline.

Key Fixes

CI/CD Coverage Workflow Stabilization

1. Disk Space Management (commit dcd31e5)

  • Resolved GitHub Actions disk space exhaustion during coverage runs
  • Implemented disk space monitoring and cleanup procedures
  • Prevents coverage workflow failures from insufficient storage
  • Impact: Reliable coverage runs without storage failures

2. Tarpaulin Engine Selection (commits f00e2b8, de4fe3e)

  • Reverted to ptrace engine with hang mitigations (most stable)
  • LLVM engine caused test threading conflicts and hangs
  • ptrace provides reliable coverage without test interference
  • Impact: Zero workflow hangs, 100% reliable coverage collection

3. Argument Deduplication (commit 2e360ef)

  • Removed duplicate tarpaulin timeout argument
  • Eliminated "argument cannot be used multiple times" error
  • Cleaned up tarpaulin invocation configuration
  • Impact: Clean workflow execution without argument conflicts

4. Coverage Baseline Established: 51.40%

  • Down from 54.92% due to new untested code from Sprint 6.7-6.8
  • Reliable baseline for future coverage improvements
  • All 2,557 tests contributing to coverage
  • Impact: Clear baseline for tracking progress

Benchmark Artifacts (commit 563d381)

  • Added benchmark output files to .gitignore
  • Prevents accidental commit of large benchmark data files
  • Maintains clean repository state
  • Impact: Cleaner git status, smaller repository

Technical Details

Engine Comparison

ptrace (CHOSEN):

  • Stable, no hangs
  • Slight performance penalty (~5-10% slower)
  • No test threading conflicts
  • Reliable for CI/CD automation

LLVM (NOT CHOSEN):

  • Faster coverage collection
  • Caused test threading conflicts
  • Resulted in workflow hangs
  • Unreliable for automation

Coverage Metrics

  • Total Lines: ~45,000
  • Covered Lines: 23,130 (51.40%)
  • Tests Contributing: 2,557
  • Test Pass Rate: 100%
  • CI/CD Health: All 9 workflows passing consistently

Coverage Breakdown

  • Core Scanner Logic: ~75%
  • Network Layer: ~60%
  • CLI Interface: ~40%
  • TUI Widgets: ~65% (new code)
  • Overall: 51.40%

Quality Assurance

  • Test Suite: 2,557 tests (100% passing, 0 failures)
  • CI/CD Workflows: 9/9 passing consistently
  • Fuzz Testing: 230M+ executions, 0 crashes
  • Platform Coverage: Linux, Windows, macOS, Alpine
  • Static Analysis: 0 clippy warnings
  • Code Formatting: 100% compliant

Impact

Immediate Benefits

  • Reliable automated coverage reporting in CI/CD pipeline
  • Established 51.40% baseline for tracking coverage improvements
  • Stable ptrace engine prevents workflow hangs
  • Clean repository without benchmark artifacts

Long-Term Benefits

  • Confidence in CI/CD infrastructure stability
  • Clear path for coverage improvement tracking
  • Foundation for coverage enforcement policies
  • Reliable metrics for quality assessment

Commit History

  • de4fe3e - fix(ci): revert to ptrace engine with hang mitigations
  • 2e360ef - fix(ci): remove duplicate tarpaulin timeout argument
  • f00e2b8 - fix(ci): prevent tarpaulin hang with LLVM engine and test threading
  • dcd31e5 - fix(ci): resolve coverage workflow disk space exhaustion
  • 563d381 - chore: add benchmark artifacts to gitignore

Installation

From Source

git clone https://github.com/doublegate/ProRT-IP.git
cd ProRT-IP
git checkout v0.5.8
cargo build --release

Using Cargo

cargo install --git https://github.com/doublegate/ProRT-IP --tag v0.5.8

Platform Support

Platform Status Architecture
Linux (glibc) ✅ Production x86_64
Linux (musl) ✅ Production x86_64 (static binary)
Windows ✅ Production x86_64
macOS Intel ✅ Production x86_64
macOS Apple Silicon ✅ Production ARM64 (M1/M2/M3/M4)
FreeBSD ✅ Production x86_64

Known Issues

None blocking. All 2,557 tests passing with 100% success rate.

Breaking Changes

None - infrastructure improvements only, no API or behavior changes.

Upgrade Notes

No migration required. Drop-in replacement for v0.5.7.


🤖 Generated with Claude Code

v0.5.7: Phase 6 Complete - Interactive TUI Widgets

27 Nov 07:45

Choose a tag to compare

Release v0.5.7: Phase 6 Sprint 6.7-6.8 - Interactive TUI Widgets Complete

Executive Summary

Phase 6 completion (Sprint 6.7-6.8) delivering 3 new interactive TUI widgets, centralized keyboard management, and comprehensive scan configuration UI. Added 311 tests bringing total to 2,557. This release marks 87.5% project completion (7/8 phases) with production-ready terminal interface for comprehensive network scanning.

Key Features

New Interactive Widgets (2,572 lines)

1. File Browser Widget (771 lines, 8 tests)

  • Interactive Directory Navigation with keyboard controls
  • File Filtering: .txt, .csv, .json, or all files
  • Path breadcrumb display and quick navigation
  • Integrated with target list import/export (Ctrl+B)

2. Port Selection Widget (1,224 lines, 35 tests)

  • Port Presets: Top 100, Top 1000, All Ports, Common Services
  • 6 Port Categories (Web, SSH, Database, Mail, File Sharing, Remote Access)
  • Custom port range input with validation
  • PortSpec parser for complex specifications

3. Shortcut Manager (577 lines, 11 tests)

  • Centralized keyboard shortcut registration and dispatch
  • 60+ shortcuts across 6 contexts
  • Conflict detection and resolution
  • Dynamic help text generation

Testing & Quality

  • +311 tests (2,246 → 2,557, 13.8% increase)
  • 54 new TUI tests across new widgets
  • 100% pass rate (all 2,557 tests passing)
  • ~65% coverage on new widget code

Performance

  • Immediate mode rendering: <5ms per widget
  • 60 FPS sustained with all 11 widgets active
  • Minimal memory overhead: ~2-3 MB for widget state
  • Event throughput: 10,000+ events/second

Phase 6 Complete (8/8 Sprints)

Phase 6 Status: ✅ 100% COMPLETE

Project Milestone

  • Overall Progress: 87.5% (7/8 phases complete)
  • Production-Ready TUI: 11 widgets, 60 FPS, 2,557 tests
  • Next Phase: Phase 7 - Polish & Release Preparation

Installation

cargo install --git https://github.com/doublegate/ProRT-IP --tag v0.5.7

🤖 Generated with Claude Code

ProRT-IP WarScan v0.5.6

27 Nov 05:23

Choose a tag to compare

ProRT-IP WarScan v0.5.6

Modern network scanner combining Masscan speed with Nmap detection depth.

📊 Project Statistics

  • Tests: 513+
  • Lines of Code: 102396+
  • Crates: 4 (prtip-core, prtip-network, prtip-scanner, prtip-cli)

✨ Key Features

  • 7 scan types: TCP Connect, SYN, UDP, FIN, NULL, Xmas, ACK
  • OS fingerprinting: 16-probe Nmap sequence with weighted scoring
  • Service detection: nmap-service-probes format with 500+ probes
  • Banner grabbing: HTTP, FTP, SSH, SMTP, DNS, SNMP (6 protocols + TLS)
  • Timing templates: T0-T5 (Paranoid to Insane) with RTT estimation
  • Adaptive rate limiting: Masscan-inspired circular buffer with dynamic batching
  • Decoy scanning: Up to 256 decoys for stealth attribution hiding
  • CDN/WAF detection: 8 major providers with O(log n) lookup
  • Batch packet sending: sendmmsg syscall (30-50% performance boost at 1M+ pps)

📦 Installation

Download the appropriate binary for your platform below.

Linux (x86_64)

# GNU libc (most distributions)
wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.6/prtip-0.5.6-x86_64-unknown-linux-gnu.tar.gz
tar xzf prtip-0.5.6-x86_64-unknown-linux-gnu.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

# musl (Alpine, static binary)
wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.6/prtip-0.5.6-x86_64-unknown-linux-musl.tar.gz
tar xzf prtip-0.5.6-x86_64-unknown-linux-musl.tar.gz

Windows (x86_64)

# Download and extract
curl -L -o prtip-0.5.6-x86_64-pc-windows-msvc.zip https://github.com/doublegate/ProRT-IP/releases/download/v0.5.6/prtip-0.5.6-x86_64-pc-windows-msvc.zip
Expand-Archive prtip-0.5.6-x86_64-pc-windows-msvc.zip

# Requires Npcap: https://npcap.com/

macOS (x86_64)

wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.6/prtip-0.5.6-x86_64-apple-darwin.tar.gz
tar xzf prtip-0.5.6-x86_64-apple-darwin.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

Build from Source

git clone https://github.com/doublegate/ProRT-IP.git
cd ProRT-IP
git checkout v0.5.6
cargo build --release
./target/release/prtip --help

🔧 Usage Examples

# Basic SYN scan
prtip -sS -p 1-1000 192.168.1.0/24

# OS detection + service detection
prtip -sS -O -sV -p 1-1000 10.0.0.1

# Stealth scan with decoys
prtip -sF -D RND:10 -p 80,443 target.com

# Fast scan with progress
prtip -T4 -p- --progress 192.168.1.1

📚 Documentation

🔒 Security

This is a security research tool intended for:

  • Penetration testing
  • Network security auditing
  • Educational purposes
  • Red team operations

Always obtain proper authorization before scanning networks.

See SECURITY.md for responsible use guidelines.

📝 Changelog

See CHANGELOG.md for complete version history.

🤝 Contributing

See CONTRIBUTING.md for guidelines.

📄 License

GPL-3.0 - See LICENSE


🤖 Generated with GitHub Actions

ProRT-IP WarScan v0.5.5

22 Nov 03:41

Choose a tag to compare

ProRT-IP WarScan v0.5.5 Release Notes

Release Date: 2025-11-22
Version: 0.5.5
Phase: Phase 6 (Sprint 6.5 COMPLETE - 5/8 sprints, 63% phase progress)
Overall Project Progress: ~76% (6.625/8 phases)


EXECUTIVE SUMMARY

Post-v0.5.4 release consolidating Sprint 6.5 (Bug Fixes & Interactive Widgets), comprehensive documentation improvements, and memory bank optimization. This release completes Phase 6 Sprint 5/8 with production-ready TUI interactive selection widgets and critical bug fixes addressing TODO/FIXME items.

Key Achievements:

  • 3 critical bugs fixed (Plugin callbacks, Idle Scan IPID, Decoy Scanner batch I/O)
  • 5 production-ready TUI interactive selection widgets
  • 52.5% memory bank reduction (16,033 → 7,817 characters)
  • mdBook documentation system production-ready (110 files, 97.75/100 quality)
  • 2,246 tests passing (100%), 54.92% coverage, 0 clippy warnings
  • Zero breaking changes, fully backward compatible

SPRINT 6.5 PART 1: BUG FIX SPRINT

Duration: ~14 hours (2025-11-21)
Objective: Eliminate critical TODO/FIXME bugs blocking Phase 6.6+ features
Result: 3/3 critical bugs resolved, 27 new tests, 425 decoy scanner tests passing

1. Plugin System Lua Callbacks (6 methods)

Problem: All 6 callback methods (pre_scan, on_target, post_scan, format_result, export, config) were non-functional stubs marked with TODO/FIXME.

Solution:

  • Implemented complete Lua callback infrastructure with mlua 0.11 "send" feature
  • Added error handling, type conversion, and async context preservation
  • Integrated with Scanner trait and EventBus for real-time plugin execution

Technical Details:

  • Files Modified: crates/prtip-core/src/plugin/sandbox.rs, plugin_metadata.rs
  • New Tests: 8 comprehensive callback tests covering all 6 methods
  • Coverage: 74.2% plugin_metadata.rs, 83.9% sandbox.rs
  • Integration: ScannerConfig → Plugin callbacks → EventBus events

Impact:

  • Plugin system now production-ready for community extensions
  • Enables custom service detection, output formatting, and export handlers
  • Unblocks Phase 7+ advanced plugin features (hot reload, plugin marketplace)

2. Idle Scan IPID Tracking (Layer3 migration)

Problem: IPID tracker used obsolete Layer2 socket causing 3 critical bugs (missing IPID increments, incorrect baseline calculations, zombie host state corruption).

Solution:

  • Migrated from Layer2 to Layer3 socket for proper IP header access
  • Implemented robust IPID extraction from IPv4 headers
  • Added comprehensive test suite validating all 3 bug fixes

Technical Details:

  • Files Modified: crates/prtip-scanner/src/idle_scanner.rs, ipid_tracker.rs
  • New Tests: 19 tests (IPID extraction, increment detection, baseline accuracy)
  • Architecture: Layer3 socket → IPv4 header parsing → IPID field extraction
  • Validation: Tested against real network traffic patterns

Impact:

  • Idle scan now reliable for stealth reconnaissance via zombie hosts
  • IPID tracking accuracy improved from ~60% to ~95%
  • Enables Phase 6.6+ advanced evasion techniques

3. Decoy Scanner Batch I/O Integration

Problem: Decoy scanner lacked BatchSender/BatchReceiver integration, operating with inefficient one-packet-per-syscall pattern.

Solution:

  • Integrated existing BatchSender/BatchReceiver infrastructure
  • Achieved 96.87-99.90% syscall reduction (40,000 → 1,666 → 66 syscalls for 1K ports)
  • Validated across all 425 decoy scanner tests

Technical Details:

  • Files Modified: crates/prtip-scanner/src/decoy_scanner.rs
  • Performance: Batch size 1 → 32 (96.87%), → 256 (99.61%), → 1024 (99.90%)
  • Platform Support: Linux sendmmsg/recvmmsg with graceful fallback
  • Tests: 425 passing (connection tracking, decoy randomization, batch coordination)

Impact:

  • Decoy scanning now competitive with SYN/UDP scanner performance
  • Enables large-scale stealth scans with minimal network footprint
  • Validates Sprint 6.3 batch I/O framework across all scanner types

SPRINT 6.5 PART 2: INTERACTIVE SELECTION WIDGETS

Duration: ~20 hours (2025-11-21)
Objective: Complete Phase 6.5 TUI interactive widgets for scan configuration
Result: 5/5 widgets production-ready, 228 prtip-tui tests passing, ~65% coverage

Widget 1: TargetSelectionWidget

Functionality:

  • CIDR notation calculator (192.168.1.0/24 → 256 IP addresses)
  • Full CIDR range support (/0 to /32)
  • Real-time IP count display
  • Input validation with error messages

Technical Implementation:

  • File: crates/prtip-tui/src/widgets/target_selection.rs
  • Dependencies: ipnetwork crate for CIDR parsing
  • State Management: Selected CIDR, calculated IPs, validation errors
  • Tests: 15 tests (CIDR validation, IP counting, edge cases)

User Experience:

Target Selection
┌──────────────────────────────┐
│ Enter CIDR (e.g., 10.0.0.0/8)│
│ > 192.168.1.0/24_            │
│ → 256 IP addresses           │
└──────────────────────────────┘

Widget 2: File Import/Export Widget

Functionality:

  • Import target lists from disk (newline-separated IPs/CIDRs)
  • Export current targets with metadata (timestamp, counts, exclusions)
  • File browser with validation
  • Format verification and error handling

Technical Implementation:

  • File: crates/prtip-tui/src/widgets/file_import_export.rs
  • Format: Plain text (IPs/CIDRs), TOML (metadata), JSON (structured)
  • Validation: IP address parsing, CIDR validation, duplicate detection
  • Tests: 18 tests (import/export, format validation, error handling)

Impact:

  • Enables scan automation workflows
  • Supports large-scale target management (10K+ IPs)
  • Preserves scan context across sessions

Widget 3: Exclusion List Widget

Functionality:

  • Dynamic IP/CIDR exclusion filtering
  • Automatic target recalculation (e.g., 10.0.0.0/8 - 10.0.1.0/24)
  • Real-time exclusion preview
  • Support for infrastructure protection (DNS, DHCP, gateway IPs)

Technical Implementation:

  • File: crates/prtip-tui/src/widgets/exclusion_list.rs
  • Algorithm: Set difference with CIDR expansion
  • State Management: Exclusion list, recalculated targets, preview
  • Tests: 22 tests (CIDR subtraction, edge cases, large lists)

User Experience:

Exclusions (3 active)
┌──────────────────────────────┐
│ - 10.0.1.0/24    (gateway)   │
│ - 10.0.2.53      (DNS)       │
│ - 10.0.3.0/25    (mgmt)      │
│ [+] Add exclusion            │
│ Target count: 16,777,216     │
│ After exclusions: 16,776,448 │
└──────────────────────────────┘

Widget 4: DNS Resolution Widget

Functionality:

  • Async dual-stack resolution (IPv4 + IPv6 simultaneously)
  • Intelligent caching (1-hour TTL, LRU eviction)
  • Real-time resolution progress
  • Error handling for NXDOMAIN, timeout, network errors

Technical Implementation:

  • File: crates/prtip-tui/src/widgets/dns_resolution.rs
  • Dependencies: tokio::net::lookup_host, trust-dns-resolver (planned)
  • Caching: HashMap<String, (Vec, Instant)>
  • Tests: 28 tests (resolution, caching, dual-stack, error handling)

Performance:

  • Cache hit rate: ~85% for typical scans
  • Avg resolution time: 15ms (cached), 150ms (DNS query)
  • Supports 1000+ concurrent resolutions

Widget 5: TemplateSelectionWidget

Functionality:

  • Browse 10 built-in templates (Fast Scan, Full Scan, Stealth, etc.)
  • Custom template support via ~/.prtip/templates.toml
  • Case-insensitive filtering
  • Template preview with parameter display

Technical Implementation:

  • File: crates/prtip-tui/src/widgets/template_selection.rs (575 lines)
  • Architecture: Moved templates module from prtip-cli → prtip-core (resolved circular dependency)
  • Built-in Templates: Fast (-F), Stealth (-sS -T2), Aggressive (-A -T4), etc.
  • Tests: 25 tests (template loading, filtering, custom templates)

User Experience:

Scan Templates (10 built-in + 3 custom)
┌──────────────────────────────┐
│ Filter: _                    │
│ [1] Fast Scan (-F)           │
│ [2] Full Scan (-p-)          │
│ [3] Stealth (-sS -T2 -f)     │
│ [4] Aggressive (-A -T4)      │
│ [5] Service Detection (-sV)  │
│ ...                          │
│ [C] My Custom Scan           │
└──────────────────────────────┘

Critical Infrastructure: Templates Module Migration

Problem: prtip-cli depended on prtip-tui for templates, but prtip-tui needed prtip-cli for ScanConfig → circular dependency preventing compilation.

Solution:

  • Moved templates.rs from prtip-cli/src/ to prtip-core/src/config/
  • Updated all imports across workspace (prtip-cli, prtip-tui, prtip-scanner)
  • Verified 2,246 tests passing after migration

Impact:

  • Clean dependency hierarchy: prtip-core ← prtip-cli ← prtip-tui
  • Enables template reuse across all workspace crates
  • Foundation for Phase 6.7 config profiles feature

SPRINT 6.4 PROGRESS STATUS

Sprint 6.4: Zero-Copy Buffer Pool Infrastructure (Completed 2025-11-20, released in v0.5.4)

Achievements:

  • Implemented tiered buffer pool (4KB/16KB/64KB)
  • bytes crate integration (BytesMut/Bytes zero-copy slicing)
  • SharedPacket Arc-based packet sharing
  • RAII PooledBuffer automatic buffer return
  • 16 comprehensive tests, 100% success rate

Strategic Value:

  • Eliminated allocations for >10KB packets
  • O(1) buffer acquisition/return
  • Thread-safe with parking_lot::Mutex
  • Foundation for Phase 6.6+ high-throughput scanning

Note: Sprint 6.4 was completed in v0.5.4 and is included here for project continuity context.


MEMORY BANK OPTIMIZATION

Objective: Improve AI context window efficiency via CLAUDE.local.md compression
Achievement: 52.5% reduction (16,033 → 7,817 characters)

Compression Strategies

  1. Recent Decisions Table Format (4-column)
    • Old: Multi-paragraph descriptions per decision
    • New: Date | Decision | Impact | Status columns
    • Savings: ~4,200 cha...
Read more

ProRT-IP WarScan v0.5.4

21 Nov 06:01

Choose a tag to compare

ProRT-IP WarScan v0.5.4

Modern network scanner combining Masscan speed with Nmap detection depth.

📊 Project Statistics

  • Tests: 505+
  • Lines of Code: 95839+
  • Crates: 4 (prtip-core, prtip-network, prtip-scanner, prtip-cli)

✨ Key Features

  • 7 scan types: TCP Connect, SYN, UDP, FIN, NULL, Xmas, ACK
  • OS fingerprinting: 16-probe Nmap sequence with weighted scoring
  • Service detection: nmap-service-probes format with 500+ probes
  • Banner grabbing: HTTP, FTP, SSH, SMTP, DNS, SNMP (6 protocols + TLS)
  • Timing templates: T0-T5 (Paranoid to Insane) with RTT estimation
  • Adaptive rate limiting: Masscan-inspired circular buffer with dynamic batching
  • Decoy scanning: Up to 256 decoys for stealth attribution hiding
  • CDN/WAF detection: 8 major providers with O(log n) lookup
  • Batch packet sending: sendmmsg syscall (30-50% performance boost at 1M+ pps)

📦 Installation

Download the appropriate binary for your platform below.

Linux (x86_64)

# GNU libc (most distributions)
wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.4/prtip-0.5.4-x86_64-unknown-linux-gnu.tar.gz
tar xzf prtip-0.5.4-x86_64-unknown-linux-gnu.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

# musl (Alpine, static binary)
wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.4/prtip-0.5.4-x86_64-unknown-linux-musl.tar.gz
tar xzf prtip-0.5.4-x86_64-unknown-linux-musl.tar.gz

Windows (x86_64)

# Download and extract
curl -L -o prtip-0.5.4-x86_64-pc-windows-msvc.zip https://github.com/doublegate/ProRT-IP/releases/download/v0.5.4/prtip-0.5.4-x86_64-pc-windows-msvc.zip
Expand-Archive prtip-0.5.4-x86_64-pc-windows-msvc.zip

# Requires Npcap: https://npcap.com/

macOS (x86_64)

wget https://github.com/doublegate/ProRT-IP/releases/download/v0.5.4/prtip-0.5.4-x86_64-apple-darwin.tar.gz
tar xzf prtip-0.5.4-x86_64-apple-darwin.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

Build from Source

git clone https://github.com/doublegate/ProRT-IP.git
cd ProRT-IP
git checkout v0.5.4
cargo build --release
./target/release/prtip --help

🔧 Usage Examples

# Basic SYN scan
prtip -sS -p 1-1000 192.168.1.0/24

# OS detection + service detection
prtip -sS -O -sV -p 1-1000 10.0.0.1

# Stealth scan with decoys
prtip -sF -D RND:10 -p 80,443 target.com

# Fast scan with progress
prtip -T4 -p- --progress 192.168.1.1

📚 Documentation

🔒 Security

This is a security research tool intended for:

  • Penetration testing
  • Network security auditing
  • Educational purposes
  • Red team operations

Always obtain proper authorization before scanning networks.

See SECURITY.md for responsible use guidelines.

📝 Changelog

Added

  • Sprint 6.4: Zero-Copy Buffer Pool Infrastructure (2025-11-20)

    • New Module: large_buffer_pool with tiered buffer management for zero-copy packet handling
    • Buffer Tiers:
      • Tier 1: 4KB (small packets, standard MTU)
      • Tier 2: 16KB (medium packets, jumbo frames, service probes)
      • Tier 3: 64KB (large packets, max IP packet size)
    • Features:
      • LargeBufferPool - Thread-safe tiered buffer pool using parking_lot::Mutex
      • PooledBuffer - RAII wrapper for automatic buffer return to pool
      • SharedPacket - Arc-based zero-copy packet sharing for multi-consumer scenarios
      • BufferTier - Automatic tier selection based on requested size
      • PoolStats - Hit rate tracking, allocation monitoring, pool diagnostics
    • Performance Characteristics:
      • Zero allocations after initial pool warmup
      • O(1) buffer acquisition and return
      • Pre-allocation support via with_preallocation()
      • Automatic buffer recycling on drop
      • Thread-safe concurrent access with minimal lock contention
    • bytes Crate Integration:
      • Added bytes = "1.9" dependency for zero-copy byte handling
      • BytesMut for mutable buffers with zero-copy slicing
      • Bytes for immutable shared data via freeze()
    • New Tests: 16 comprehensive tests covering:
      • Tier classification and size validation
      • Pool acquisition/release cycles
      • Hit rate statistics
      • Concurrent access patterns
      • Buffer overflow handling
      • SharedPacket zero-copy slicing
      • 10KB packet handling validation

    • Files Added:
      • crates/prtip-network/src/large_buffer_pool.rs (~550 lines)
      • docs/to-dos/PHASE-6/SPRINT-6.4-TODO.md (implementation plan)
    • Files Modified:
      • crates/prtip-network/Cargo.toml (added bytes dependency)
      • crates/prtip-network/src/lib.rs (module exports)
    • Impact: Foundation for 30%+ memory allocation reduction on >10KB packets
    • Test Results: 2,167 tests passing (16 new buffer pool tests), 0 clippy warnings
  • Dependency Updates (2025-11-20)

    • bytes: 1.10.1 → 1.11.0 (zero-copy byte handling)
    • clap: 4.5.51 → 4.5.53 (CLI argument parsing)
    • syn: 2.0.108 → 2.0.110 (Rust syntax parsing)
    • cc: 1.2.44 → 1.2.46 (C compiler integration)
    • crypto-common: 0.1.6 → 0.1.7 (cryptography utilities)
    • anstyle-query: 1.1.4 → 1.1.5 (ANSI terminal styling)
    • anstyle-wincon: 3.0.10 → 3.0.11 (Windows console styling)
    • windows-sys: 0.60.2 → 0.61.2 (Windows system bindings)
    • Additional minor dependency updates for improved stability and security

Fixed

  • CI/CD: Security Audit Advisory Ignore (2025-11-21)

    • Added RUSTSEC-2025-0119 to deny.toml ignore list
    • Issue: number_prefix crate marked unmaintained (transitive dep via indicatif)
    • Risk Assessment: Very Low - pure formatting utility, no security-sensitive operations
    • Impact: CI security audit now passes
    • Mitigation: Will migrate when indicatif upstream adopts unit-prefix alternative
  • Sprint 6.3 Benchmark Infrastructure & Test Data (2025-11-19)

    • Complete benchmark suite for network optimization testing (40 benchmark files)
    • Batch I/O performance benchmarks with multiple batch sizes (1, 32, 256, 1024)
    • CDN filtering benchmarks testing detection across providers
    • Localhost benchmarks for isolated network performance testing
    • Internet-scale test data: 176K+ IP addresses for realistic testing
      • 100K IPv4 addresses for large-scale scanning
      • 50K CDN-heavy targets for filtering validation
      • 50K mixed dual-stack targets for IPv4/IPv6 testing
    • Benchmark automation scripts with hyperfine integration
    • Files Added: 50 files (40 benchmarks, 8 test data, 2 temp docs)
    • Data Volume: 194K+ lines of test targets and results
    • Impact: Enables comprehensive performance validation of Sprint 6.3 optimizations
  • Sprint 6.3 Level 3 Implementation (2025-11-17)

    • Internet-scale validation infrastructure with target generation scripts
    • Generated 200,000 test IPs across 3 target lists (100K IPv4, 50K CDN-heavy, 50K dual-stack)
    • Zero-copy optimization analysis with 5 ROI-ranked opportunities (20-50% performance projections)
    • Pre-commit markdown link validation preventing broken documentation
    • Implementation roadmap for Phase 6.4-6.6 optimizations
    • Files Created: scripts/generate-targets.sh (335 lines), zero-copy analysis (944 lines)
    • Impact: 80% of Level 3 tasks completed in 12 hours (67% time efficiency vs 16-18h estimate)

Fixed

  • TUI Lifecycle Management (2025-11-17)

    • Fixed critical bug causing TUI to exit immediately after launch (~0.5-1 second)
    • Root Cause: TUI spawned as detached background task, killed when main process finished scanning
    • Solution: Restructured to use tokio::join! for concurrent execution with proper lifecycle control
    • Impact: TUI now stays open after scan completion until user quits ('q' or Ctrl+C)
    • Files Modified: crates/prtip-cli/src/main.rs (lines 550-600), args.rs (Added Clone derive)
    • Testing: Verified with prtip --tui 192.168.4.4 -p 80,443 - clean terminal restoration on all exit paths
  • History Behavior & TUI Flag (2025-11-16)

    • Changed history.json to opt-in behavior (prevents test isolation issues)
    • Implemented missing --tui flag making Sprint 6.1/6.2 features accessible
    • Fixed mdBook GitHub workflow deployment issues
    • History Changes:
      • Default: No history saving (prevents concurrent test failures)
      • Opt-in: Use --save-history flag to enable history persistence
      • Files Modified: history.rs, args.rs (lines 622-629), main.rs
    • TUI Integration:
      • Added --tui flag with proper validation (incompatible with --quiet)
      • 60 FPS real-time dashboard with 4 tabs
      • EventBus integration for live updates
      • Files Modified: args.rs (lines 1233-1241), main.rs (lines 378-420), Cargo.toml
    • Impact: Resolves 64 test failures, enables production-ready TUI access, fixes CI/CD deployment
  • Documentation Link Fixes (2025-11-17)

    • Fixed 500+ broken markdown links across 60 documentation files
    • Fixed broken external links in multiple guides (IDLE-SCAN, CI-CD-COVERAGE, etc.)
    • Updated benchmark references and repository links
    • Fixed relative link paths in documentation index
    • Files Modified: 60+ documentation files across docs/, to-dos/, benchmarks/
    • Validation: All cross-references verified, zero broken links remaining
    • Impact: Improved documentation discoverability and professional quality

##...

Read more

ProRT-IP WarScan v0.5.3

17 Nov 07:16

Choose a tag to compare

ProRT-IP WarScan v0.5.3 Release Notes

Release Date: 2025-11-17
Repository: https://github.com/doublegate/ProRT-IP
License: GPL-3.0
Previous Version: v0.5.2


Executive Summary

ProRT-IP v0.5.3 completes Sprint 6.3 (Network Optimizations), delivering transformational performance breakthroughs and critical bug fixes. This release represents ~20 hours of intensive optimization work, achieving 50-1000x speedups in connection tracking, establishing optimal batch I/O configurations through empirical benchmarking, and fixing production-blocking CDN filtering bugs.

Key Achievements:

  • O(N × M) → O(N) Optimization: 50-1000x speedup, 401x improvement for 10,000 ports (60-600s → 0.144s)
  • Batch I/O Validation: 8-12% throughput improvement, optimal batch size 1024 confirmed (-3.1%)
  • CDN Deduplication: 80-100% filtering rate, whitelist mode -22.8% faster than baseline
  • Critical Bug Fix: CLI --skip-cdn flag now functional (was non-functional in v0.5.2)
  • Documentation Quality: 500+ broken markdown links fixed across 60 documentation files
  • TUI Lifecycle: Fixed premature exit bug (~0.5-1 second runtime → stays open until user quits)

Quality Metrics:

  • Tests: 2,151/2,151 passing (100%), 73 ignored (platform-specific)
  • Clippy: 0 warnings
  • Formatting: Clean
  • Coverage: 54.92%
  • Documentation: ~200 lines updated across 4 core performance docs

Major Performance Breakthroughs

1. O(N × M) → O(N) Connection State Optimization

Impact: 50-1000x speedup in connection tracking, enabling linear scaling for internet-scale scans

Problem: Previous quadratic O(N × M) scaling (N ports × M hosts) caused severe performance degradation:

  • 10,000 ports: 60-600 seconds (1-10 minutes) per scan
  • Linear scaling failure: Time grew quadratically with port count
  • Memory inefficiency: List-based connection tracking with O(N×M) lookups

Solution: Hash-based O(1) connection lookup using DashMap with 4-tuple key:

// Key: (source_ip, source_port, destination_ip, destination_port)
type ConnectionKey = (IpAddr, u16, IpAddr, u16);
DashMap<ConnectionKey, ConnectionState>

Performance Results:

Port Count Before (O(N×M)) After (O(N)) Improvement Execution Time
1,000 ~6-60s ~0.014s 401x 0.014s
10,000 60-600s 0.144s 401x 0.144s
50,000 1,500-15,000s ~0.72s ~21,000x 0.72s (projected)

Affected Scanners:

  • SYN Scanner: 6 connection state fields (src_ip, src_port, dst_ip, dst_port, sequence, timestamp)
  • UDP Scanner: 1 connection state field (last_sent)
  • Stealth Scanners (FIN/NULL/Xmas): 1 connection state field (last_sent) + 4-tuple key

Files Modified:

  • crates/prtip-scanner/src/scanners/syn_scanner.rs (~300 lines connection tracking refactor)
  • crates/prtip-scanner/src/scanners/udp_scanner.rs (~150 lines connection tracking refactor)
  • crates/prtip-scanner/src/scanners/stealth_scanner.rs (~150 lines connection tracking refactor)

Strategic Value: Enables internet-scale scanning with consistent performance. 10,000-port scans now complete in <0.2 seconds instead of 1-10 minutes.


2. Batch I/O Performance Validation & Optimal Configuration

Impact: 8-12% throughput improvement with optimal batch size, 96.87-99.90% syscall reduction

Previous Claims: 20-60% throughput improvement (theoretical)
Measured Reality: 8-12% throughput improvement (localhost validated)

Benchmark Results (hyperfine 1.19.0, 5 warmup + 5 measurement runs):

Batch Size Mean Time Std Dev vs Baseline Syscall Reduction Recommendation
16 (min) 48.9 ms ±2.6 ms baseline 96.87% Testing only
32 48.9 ms ±2.6 ms 0.0% 98.44% Testing only
256 49.9 ms ±3.8 ms +2.0% 99.61% Not recommended
1024 (max) 47.4 ms ±0.7 ms -3.1% 99.90% Optimal (production)

Key Findings:

  • Optimal Batch Size: 1024 provides best throughput (-3.1%) and lowest variance (±0.7ms)
  • Diminishing Returns: 16→32 shows no improvement (0.0%), indicating kernel batching efficiency plateau
  • Degradation Zone: 256 degrades (+2.0% overhead, ±3.8ms variance) due to increased coordination overhead
  • Syscall Reduction: 96.87-99.90% reduction achieved as claimed (20,000→625 syscalls for 10K packets)

Configuration Updates:

  • Old Defaults: min=1, max=1024 (suboptimal for most use cases)
  • New Defaults: min=16, max=256 (balanced for responsiveness + performance)
  • Production Recommendation: Use --max-batch-size 1024 for maximum throughput

Files Modified:

  • crates/prtip-core/src/config.rs (PerformanceConfig defaults: min 1→16, max remains 1024)

Performance Explanation:

  • Why not 20-60%? Syscall reduction != direct throughput gain. Network latency, packet processing, and batch coordination overhead limit real-world improvement.
  • Localhost vs Network: Localhost scans benefit less from batch I/O (8-12%) than internet scans where network latency dominates.
  • Variance Impact: 1024 has lowest variance (±0.7ms) ensuring consistent performance, critical for production workloads.

Documentation Updated:

  • README.md: Network Optimizations section
  • docs/34-PERFORMANCE-CHARACTERISTICS.md: Batch I/O section (~30 lines)
  • docs/00-ARCHITECTURE.md: Batch I/O architecture details

3. CDN IP Deduplication Performance & Bug Fix

Impact: 80-100% filtering rate, <5% overhead, whitelist mode -22.8% faster than baseline

Critical Bug Fixed: CLI --skip-cdn flag was non-functional in production (v0.5.2 and earlier)

Root Cause:

  • CDN filtering logic existed in Scheduler::scan_ports() (internal method, lines 271-314)
  • CLI called Scheduler::execute_scan_ports() which lacked filtering logic
  • Result: --skip-cdn flag accepted by CLI but ignored during execution

Fix Applied (commit 19ba706):

  • Added 38 lines of CDN filtering logic to execute_scan_ports() (lines 661-699)
  • Matches pattern from scan_ports(): IP expansion → CIDR detection → statistics logging
  • Supports 6 CDN providers: Cloudflare, AWS CloudFront, Azure CDN, Akamai, Fastly, Google Cloud
  • Graceful empty-list handling (skip target if all IPs filtered)

Benchmark Results (hyperfine, 5 warmup + 5 measurement runs):

Scenario Mean Time Std Dev IPs Filtered Reduction Overhead vs Baseline
Baseline (no filter) 49.1 ms ±2.7 ms 0 0% baseline
Default (skip all CDN) 67.5 ms ±2.3 ms 5 100% +37.5%
Whitelist Cloudflare only 37.9 ms ±1.1 ms 5 100% -22.8%
Blacklist (skip except CF) 66.2 ms ±1.4 ms 5 100% +34.8%
IPv6 CDN Detection 106.8 ms ±45.6 ms 3 100% +117.5%
Mixed IPv4/IPv6 192.1 ms ±32.4 ms 8 100% +291.2%

Key Findings:

  • Whitelist Mode Advantage: -22.8% improvement over baseline (faster by eliminating unnecessary network operations)
  • Default Mode Overhead: +37.5% due to CIDR range checks for all 6 CDN providers
  • IPv6 Dual-Stack Cost: +117-291% overhead from dual-stack initialization (known limitation)
  • Filtering Effectiveness: 80-100% reduction rate across all scenarios

Configuration Modes:

  • Default: --skip-cdn (filters all 6 CDN providers, +37.5% overhead)
  • Whitelist: --cdn-whitelist cloudflare,aws (faster than baseline, -22.8%)
  • Blacklist: --cdn-blacklist cloudflare (skip all except listed, +34.8% overhead)

CDN Provider Coverage:

  • Cloudflare: 15 CIDR ranges (104.16.0.0/13, 172.64.0.0/13, etc.)
  • AWS CloudFront: 25 CIDR ranges
  • Azure CDN: 20 CIDR ranges
  • Akamai: 18 CIDR ranges
  • Fastly: 8 CIDR ranges
  • Google Cloud CDN: 4 CIDR ranges
  • Total: 90 CIDR ranges, O(1) hash-based detection

Files Modified:

  • crates/prtip-scanner/src/scheduler.rs (+38 lines at line 658-699)

Strategic Impact:

  • Eliminates production bug affecting all CDN filtering operations
  • Enables 30-70% target reduction for internet-scale scans
  • Whitelist mode provides unexpected performance boost (use for targeted scans)
  • Establishes O(1) hash-based CDN detection (96% overhead reduction from O(N×M) CIDR iteration)

Critical Bug Fixes

4. TUI Lifecycle Management Fix

Issue: TUI exited immediately after launch (~0.5-1 second runtime)

Root Cause:

  • TUI spawned as detached background task (tokio::spawn)
  • Main process finished scanning and terminated
  • Background TUI task killed with parent process

Solution: Restructured to use tokio::join! for concurrent execution

// Before: Detached background task (killed when scan completes)
tokio::spawn(async move { tui_app.run().await });

// After: Concurrent execution with lifecycle control
tokio::join!(
    async { tui_app.run().await },
    async { scanner.run().await }
);

Impact:

  • TUI now stays open after scan completion until user quits ('q' or Ctrl+C)
  • Clean terminal restoration on all exit paths
  • Proper event loop lifecycle management

Files Modified:

  • crates/prtip-cli/src/main.rs (lines 550-600: TUI lifecycle refactor)
  • crates/prtip-cli/src/args.rs (Added Clone derive for Args struct)

Testing: Verified with prtip --tui 192.168.4.4 -p 80,443 - TUI remains interactive after scan completion


5. Documentation Link Fixes (500+ Links)

Issue: 500+ broken markdown links across 60 documentation files

Impact: Documentation discoverability, professional quality, cross-reference ...

Read more

ProRT-IP WarScan 0.5.3

17 Nov 07:17

Choose a tag to compare

ProRT-IP WarScan 0.5.3

Modern network scanner combining Masscan speed with Nmap detection depth.

📊 Project Statistics

  • Tests: 505+
  • Lines of Code: 95152+
  • Crates: 4 (prtip-core, prtip-network, prtip-scanner, prtip-cli)

✨ Key Features

  • 7 scan types: TCP Connect, SYN, UDP, FIN, NULL, Xmas, ACK
  • OS fingerprinting: 16-probe Nmap sequence with weighted scoring
  • Service detection: nmap-service-probes format with 500+ probes
  • Banner grabbing: HTTP, FTP, SSH, SMTP, DNS, SNMP (6 protocols + TLS)
  • Timing templates: T0-T5 (Paranoid to Insane) with RTT estimation
  • Adaptive rate limiting: Masscan-inspired circular buffer with dynamic batching
  • Decoy scanning: Up to 256 decoys for stealth attribution hiding
  • CDN/WAF detection: 8 major providers with O(log n) lookup
  • Batch packet sending: sendmmsg syscall (30-50% performance boost at 1M+ pps)

📦 Installation

Download the appropriate binary for your platform below.

Linux (x86_64)

# GNU libc (most distributions)
wget https://github.com/doublegate/ProRT-IP/releases/download/0.5.3/prtip-0.5.3-x86_64-unknown-linux-gnu.tar.gz
tar xzf prtip-0.5.3-x86_64-unknown-linux-gnu.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

# musl (Alpine, static binary)
wget https://github.com/doublegate/ProRT-IP/releases/download/0.5.3/prtip-0.5.3-x86_64-unknown-linux-musl.tar.gz
tar xzf prtip-0.5.3-x86_64-unknown-linux-musl.tar.gz

Windows (x86_64)

# Download and extract
curl -L -o prtip-0.5.3-x86_64-pc-windows-msvc.zip https://github.com/doublegate/ProRT-IP/releases/download/0.5.3/prtip-0.5.3-x86_64-pc-windows-msvc.zip
Expand-Archive prtip-0.5.3-x86_64-pc-windows-msvc.zip

# Requires Npcap: https://npcap.com/

macOS (x86_64)

wget https://github.com/doublegate/ProRT-IP/releases/download/0.5.3/prtip-0.5.3-x86_64-apple-darwin.tar.gz
tar xzf prtip-0.5.3-x86_64-apple-darwin.tar.gz
sudo mv prtip /usr/local/bin/
chmod +x /usr/local/bin/prtip

Build from Source

git clone https://github.com/doublegate/ProRT-IP.git
cd ProRT-IP
git checkout 0.5.3
cargo build --release
./target/release/prtip --help

🔧 Usage Examples

# Basic SYN scan
prtip -sS -p 1-1000 192.168.1.0/24

# OS detection + service detection
prtip -sS -O -sV -p 1-1000 10.0.0.1

# Stealth scan with decoys
prtip -sF -D RND:10 -p 80,443 target.com

# Fast scan with progress
prtip -T4 -p- --progress 192.168.1.1

📚 Documentation

🔒 Security

This is a security research tool intended for:

  • Penetration testing
  • Network security auditing
  • Educational purposes
  • Red team operations

Always obtain proper authorization before scanning networks.

See SECURITY.md for responsible use guidelines.

📝 Changelog

Major Performance Breakthroughs 🚀

Sprint 6.3 COMPLETE: Network Optimizations & Scaling Improvements

This release delivers two transformational optimizations plus completion of Sprint 6.3's network optimization goals.

Added

1. O(N × M) → O(N) Connection State Optimization

Impact: 50-1000x speedup in connection tracking, linear scaling achieved

  • Problem: Previous quadratic O(N × M) scaling (N ports × M hosts) caused severe performance degradation at scale
  • Solution: Hash-based O(1) connection lookup using DashMap with 4-tuple key (src_ip, src_port, dst_ip, dst_port)
  • Results:
    • 10,000 ports: 0.144s (was 60-600s) = 401x improvement
    • Linear scaling: Scan time grows linearly with port count, not quadratically
    • Memory efficient: Concurrent hash map with minimal overhead
  • Affected Scanners: SYN, UDP, Stealth (FIN/NULL/Xmas)
  • Files Modified:
    • crates/prtip-scanner/src/scanners/syn_scanner.rs (connection tracking refactor)
    • crates/prtip-scanner/src/scanners/udp_scanner.rs (connection tracking refactor)
    • crates/prtip-scanner/src/scanners/stealth_scanner.rs (connection tracking refactor)
  • Strategic Value: Enables internet-scale scanning with consistent performance

2. Batch Size Defaults Optimization

Impact: Optimal performance out-of-the-box based on benchmark data

  • Old Defaults: min=1, max=1024 (suboptimal for most use cases)
  • New Defaults: min=16, max=256 (data-driven optimization)
  • Rationale:
    • Batch size 1024: -3.1% improvement, ±0.7ms variance (optimal)
    • Batch size 256: +2.0% degradation
    • Batch size 16-256: Balance performance + responsiveness
  • Benchmark Data:
    • Tested across 14 scenarios (CDN + Batch I/O)
    • Validated on localhost + network scans
    • Measured syscall reduction, throughput, variance
  • Files Modified: crates/prtip-core/src/config.rs (PerformanceConfig defaults)
  • Impact: Users get optimal batch I/O performance without manual tuning

Changed

3. Batch I/O Performance Reality Check

Impact: Corrected performance claims based on measured data

  • Previous Claim: 20-60% throughput improvement (theoretical)
  • Measured Reality: 8-12% throughput improvement (localhost validated)
  • Explanation:
    • Syscall reduction: 96.87-99.90% reduction achieved (as claimed)
    • Throughput impact: Syscall reduction != direct throughput gain
    • Overhead mitigation: Batch processing has inherent coordination overhead
    • Localhost vs network: Network latency dominates in real-world scans
  • Optimal Configuration:
    • Batch size 1024: -3.1% improvement (fastest)
    • Variance: ±0.7ms (lowest, most consistent)
    • Default 16-256: Good balance for responsiveness
  • Documentation Updated:
    • README.md: Network Optimizations section
    • docs/34-PERFORMANCE-CHARACTERISTICS.md: Batch I/O section
  • Strategic Value: Accurate, measured performance claims build trust

4. Sprint 6.3 Network Optimizations - COMPLETE ✅

Duration: ~20 hours total (Task Areas 1-5)
Status: Production-ready, performance validated
Tests: 2,151/2,151 passing (100%), 0 clippy warnings

Completed Task Areas (5/6):

  1. Batch I/O Integration Tests ✅ (4h)

    • 11/11 tests passing on Linux
    • Platform capability detection (Linux/macOS/Windows)
    • Full send/receive workflow validation
    • Error handling and fallback behavior
  2. CDN IP Deduplication ✅ (5h)

    • 14/14 tests passing (100%)
    • 6 CDN providers: Cloudflare, AWS, Azure, Akamai, Fastly, Google Cloud
    • Reduction: 80-100% for CDN-heavy targets (83.3% measured)
    • Performance: <5% overhead, whitelist mode -22.8% faster
  3. Adaptive Batch Sizing ✅ (3h)

    • 22/22 tests passing (100%)
    • CLI configuration: --adaptive-batch, --min-batch-size, --max-batch-size
    • Default range: 16-256 (optimal)
  4. Benchmark Infrastructure ✅ (3h)

    • 14 scenarios documented (6 CDN + 8 Batch I/O)
    • JSON specifications created
    • Target IP lists generated (2,500 test IPs)
  5. Scanner/Scheduler Integration ✅ (Discovered Complete, 0h)

    • All 3 scanners (SYN/UDP/Stealth) integrated with batch I/O
    • 3-point scheduler CDN integration
    • O(1) hash-based CDN detection

Quality Metrics:

  • Tests: 2,151 passing (100%)
  • Coverage: 54.92%
  • Clippy: 0 warnings
  • Formatting: Clean
  • Documentation: Comprehensive

Performance Validated:

  • O(N) linear scaling: 10,000 ports in 0.144s
  • Batch I/O: 8-12% improvement, optimal batch size 1024
  • CDN filtering: 83.3% reduction, <5% overhead
  • Syscall reduction: 96.87-99.90% (sendmmsg/recvmmsg)

Fixed

  • CDN IP Filtering Not Working in CLI (2025-11-16)
    • Fixed CDN detection/filtering not being applied when using --skip-cdn flag
    • Root Cause: CDN filtering logic existed in Scheduler::scan_ports() method but CLI called Scheduler::execute_scan_ports() which had no filtering
    • Fix: Added CDN filtering logic to execute_scan_ports() method (scheduler.rs lines 661-699)
    • Behavior: When --skip-cdn is enabled, IPs from Cloudflare, AWS, Azure, Akamai, Fastly, and Google Cloud ranges are now correctly filtered before scanning
    • Verification: Tested with Cloudflare IPs (104.16.0.0/13 range) - all correctly detected and skipped
    • Impact: CDN deduplication feature now functional, enables 30-70% target reduction for internet-scale scans
    • Files Modified: crates/prtip-scanner/src/scheduler.rs (+38 lines)

Changed

  • Documentation: Phase 1 Naming Standards Implementation (2025-11-15)
    • Renamed 5 documentation files to fix critical naming inconsistencies per DOCUMENTATION-NAMING-STANDARDS.md
    • Add -GUIDE Suffix: docs/24-SERVICE-DETECTION.mddocs/24-SERVICE-DETECTION-GUIDE.md
      • Missing suffix on feature guide (consistency with 23-IPv6-GUIDE.md, 25-IDLE-SCAN-GUIDE.md, etc.)
      • Updated 14 cross-references across documentation
    • Fix Underscores → Hyphens:
      • docs/18-EFFICIENCY_REPORT.mddocs/18-EFFICIENCY-REPORT.md (3 references updated)
      • docs/14-NMAP_COMPATIBILITY.mddocs/14-NMAP-COMPATIBILITY.md (14 references updated)
    • Archive Historical Content:
      • docs/22.1-CLAUDE-POST-PHASE4_1of2.mddocs/archive/PHASE-4-CLAUDE-NOTES-PART-1.md
      • docs/22.2-CLAUDE-POST-PHASE4_2of2.mddocs/archive/PHASE-4-CLAUDE-NOTES-PART-2.md
      • Non-standard numbering format (22.1/22.2), historical Phase 4 notes belong in archive
      • Updated 4 cross-references
    • Files Modified: 26 total (5 renames + 21 cross-reference updates)
    • Scope: README.md, CHANGELOG.md, 7 docs/ files, 14 feature guides, 3 to-dos/ fil...
Read more

v0.5.2 - Sprint 6.2 Complete: Live Dashboard & Real-Time Metrics

15 Nov 02:18

Choose a tag to compare

ProRT-IP WarScan v0.5.2 - Live Dashboard & Real-Time Metrics

Release Date: 2025-11-14
Type: Feature Release (Sprint 6.2 Complete)
Phase: 6 - TUI Interface (Sprint 6.2/8 COMPLETE)
Repository: https://github.com/doublegate/ProRT-IP
License: GPL-3.0

EXECUTIVE SUMMARY

v0.5.2 delivers Sprint 6.2 (Live Dashboard & Real-Time Metrics), completing the
production-ready TUI dashboard system with 4 comprehensive widgets for real-time
scan visualization. This release transforms ProRT-IP's terminal interface from
basic status display into a full-featured live monitoring system with tabbed
dashboards, sortable/filterable tables, and time-series network graphs.

Additionally, this release includes critical CI/CD infrastructure improvements
that resolve Security Audit failures and optimize disk space usage in GitHub
Actions workflows.

STRATEGIC ACHIEVEMENT

Sprint 6.2 establishes ProRT-IP's TUI as a production-grade real-time monitoring
interface capable of handling 10K+ events/sec while maintaining 60 FPS rendering.
The 4-tab dashboard system provides comprehensive visibility into port discoveries,
service detections, performance metrics, and network activity - all with <5ms
render times and zero UI lag.

Combined with Sprint 6.1's event-driven architecture, the TUI now offers:

  • Immediate scan feedback (10K+ events/sec throughput)
  • Multiple visualization modes (tables, metrics, graphs)
  • Interactive data exploration (sorting, filtering, navigation)
  • Performance monitoring (throughput, ETAs, statistics)

PHASE 6 PROGRESS: 2/8 Sprints Complete (25%)

  • ✅ Sprint 6.1: TUI Framework (COMPLETE) - Event system, 60 FPS rendering
  • ✅ Sprint 6.2: Live Dashboard (COMPLETE) - 4 widgets, tabbed interface
  • 📋 Sprint 6.3: Network Optimizations (Planned)
  • 📋 Sprint 6.4-6.8: Additional TUI features (Planned)

SPRINT 6.2 DELIVERABLES (100% Complete)

6/6 Tasks Complete | Duration: ~21.5 hours | Quality: A+ Grade

Task 2.1: PortTableWidget (~700 lines, 14 tests)

Real-time port discovery visualization with comprehensive table interface:

Features:

  • 6-column sortable table: Timestamp, IP, Port, State, Protocol, Scan Type
  • Multi-column sorting (12 modes: 6 columns × ascending/descending)
  • Triple filtering system:
    • State filter (Open/Closed/Filtered/All)
    • Protocol filter (TCP/UDP/All)
    • Search filter (IP address or port number)
  • Keyboard navigation: Sort (t/i/p/s/r/c), Filter (a/f/d), Scroll (↑/↓)
  • Auto-scroll toggle for live update following
  • Ringbuffer integration (MAX_PORT_DISCOVERIES = 1,000 entries)
  • Color-coded state indicators (Green=Open, Red=Closed, Yellow=Filtered)

Implementation: 744 lines production code + 14 unit tests (100% passing)

Task 2.2: Event Handling Integration (~135 lines)

Integrated PortTableWidget into main TUI event loop:

Features:

  • Event routing from keyboard to widget handlers
  • Rendering pipeline integration with ratatui
  • Lock management pattern (explicit drop() prevents deadlocks)
  • 3 integration tests validating live data updates

Implementation: Modified events/loop.rs, ui/renderer.rs

Task 2.3: ServiceTableWidget + Tabbed Interface (~1,143 lines, 21 tests)

Real-time service detection visualization with confidence-based display:

Features:

  • 6-column table: Timestamp, IP, Port, Service Name, Version, Confidence
  • Confidence-based color coding:
    • Green ≥90% (High confidence)
    • Yellow 50-89% (Medium confidence)
    • Red <50% (Low confidence)
  • Multi-column sorting + confidence filtering (All/Low≥50%/Medium≥75%/High≥90%)
  • Tabbed Interface: DashboardTab enum (PortTable, ServiceTable)
  • Tab key switching between dashboards
  • Visual tab indicator with cyan highlighting
  • Event routing to active tab only
  • Ringbuffer integration (MAX_SERVICE_DETECTIONS = 500 entries)

Implementation: 832 lines production code + 21 tests (14 unit + 7 integration)

Task 2.4: MetricsDashboardWidget (~740 lines, 24 tests)

Real-time performance metrics with 3-column dashboard layout:

Features:

  • Progress Column: Scan percentage, completed/total, ETA calculation
  • Throughput Column: Current/average/peak ports/sec, packets/sec
  • Statistics Column: Open ports, services detected, errors, duration, status
  • Human-readable formatting:
    • Durations: "1h 12m 45s" format
    • Numbers: "12,345" with comma separators
    • Throughput: "1.23K pps" with SI units
  • 5-second rolling averages for throughput smoothing
  • Color-coded status indicators: Green (active), Yellow (paused), Red (error)
  • Tab/Shift+Tab navigation through all 3 dashboard tabs
  • <5ms render time (3× under 60 FPS budget)

Implementation: 740 lines production code + 24 unit tests (100% passing)

Task 2.5: NetworkGraphWidget (~450 lines, 10 tests)

Real-time network activity visualization with time-series chart:

Features:

  • Chart Layout: 60-second sliding window graph (X-axis: time, Y-axis: throughput)
  • Data Series: Three lines: packets sent, packets received, ports discovered
  • Metrics Collection: 1 sample/second with ringbuffer (VecDeque, capacity 60)
  • Derivative Calculations: Computes "ports/sec" from cumulative counts
  • Auto-scaling: Y-axis bounds with 10% headroom (max_value × 1.1)
  • Integration: 4th dashboard tab (Tab → NetworkGraph), EventBus ThroughputEvent subscription
  • Sample interval enforcement (≥1s between samples) for data consistency
  • Bug fixes: 3 critical issues resolved (lifetime errors, test timing, floating-point precision)

Implementation: 450 lines production code + 10 unit tests (100% passing)

Task 2.6: Final Integration Testing (Quality Verification)

Comprehensive quality assurance and integration validation:

Results:

  • ✅ 175 tests passing (150 unit + 25 integration + 8 doc tests)
  • ✅ Zero clippy warnings (strict linting enforced)
  • ✅ Clean formatting (cargo fmt)
  • ✅ Release build success
  • ✅ All 4 dashboard tabs working correctly
  • ✅ <5ms render time maintained across all widgets
  • ✅ Thread-safe Arc<RwLock> verified
  • ✅ EventBus integration validated (all subscriptions working)
  • ✅ Zero regressions (all existing functionality preserved)

CI/CD INFRASTRUCTURE IMPROVEMENTS

Security Audit Workflow Fix

Problem: cargo-deny blocking CI with RUSTSEC-2024-0436 (paste crate unmaintained)
Impact: Security Audit workflow failing on every PR/push

Root Cause:

  • Transitive dependency: ratatui 0.28.1/0.29.0 → paste 1.0.15
  • Advisory type: Unmaintained status (no known CVEs, no active exploits)
  • paste is compile-time proc-macro (zero runtime risk)

Solution:

  • Added RUSTSEC-2024-0436 to deny.toml ignore list with comprehensive risk assessment
  • Justification documented: proc-macro safety, trusted ratatui dependency, monitoring for pastey migration
  • Removed obsolete RUSTSEC-2024-0382 (hwloc) entry

Result: Security Audit workflow now passes (100% green CI)

Disk Space Optimization

Problem: Test job failing with "No space left on device" during release build
Impact: CI failures blocking PRs, unreliable test pipeline

Root Cause:

  • Redundant release build in ci.yml test job consuming ~50% runner disk space
  • release.yml workflow already handles release artifact building
  • CI test job purpose is validation (debug builds sufficient)

Solution:

  • Removed redundant "Build release" step from ci.yml test job
  • Added explanatory comment documenting CI/CD responsibility separation
  • Retained release builds in dedicated release.yml workflow only

Result: Disk space headroom improved ~50%, test job now reliable

Files Modified: deny.toml (+11/-9), ci.yml (+3/-2)

TECHNICAL ARCHITECTURE

Tabbed Dashboard Interface (4 Views)

  • Port Table: Real-time port discoveries with sorting/filtering
  • Service Table: Service detections with confidence indicators
  • Metrics Dashboard: Performance metrics (progress/throughput/statistics)
  • Network Graph: Time-series activity visualization

Navigation: Tab key cycles Port → Service → Metrics → Network → Port
Visual feedback: Cyan highlighting on active tab
Efficiency: Only active tab processes events/renders

State Management Architecture

  • Thread-Safe Coordination: Arc<RwLock> for scanner ↔ TUI communication
  • Ringbuffers:
    • port_discoveries: 1,000 entries (PortDiscovery events)
    • service_detections: 500 entries (ServiceDetection events)
    • network_metrics: 60 entries (1-minute sliding window)
  • Throughput History: 5-second window for rolling average calculations
  • Lock Management: Explicit drop() pattern prevents deadlocks
  • Sample Enforcement: ≥1s interval for consistent time-series data

Event System Integration

  • PortDiscovery Events: Timestamp, IP, Port, State, Protocol, ScanType
  • ServiceDetection Events: Timestamp, IP, Port, ServiceName, Version, Confidence
  • ThroughputEvent: Packets sent/received, ports discovered (for graph)
  • Event Routing: Direct to active dashboard widget
  • Throughput: 10K+ events/sec sustained (validated in Sprint 6.1)

QUALITY METRICS

Testing:

  • Total Tests: 175 passing (150 unit + 25 integration + 8 doc tests)
  • Up from 71 tests in Sprint 6.1 (+104 new tests, 146% increase)
  • Test Coverage: All widgets have comprehensive unit tests (10-24 tests each)
  • Integration Tests: Tab switching, filtering, sorting, live updates

Code Quality:

  • Productio...
Read more

v0.5.1 - Sprint 6.1 TUI Framework + Test Infrastructure

14 Nov 14:05

Choose a tag to compare

ProRT-IP v0.5.1 Release Notes

Release Date: 2025-11-14
Version: v0.5.1
Phase: 6 IN PROGRESS (Sprint 6.1 COMPLETE)
Previous Version: v0.5.0-fix (Phase 5 + 5.5 COMPLETE)
Status: Production Ready with TUI Framework


Executive Summary

ProRT-IP v0.5.1 delivers a production-ready Terminal User Interface (TUI) with Sprint 6.1 TUI Framework implementation, marking the beginning of Phase 6 development. This release combines the comprehensive Phase 5 + 5.5 foundation (advanced features, event system, performance framework) with a modern TUI built on ratatui 0.29 and crossterm 0.28.

Major Highlights:

  • Sprint 6.1: TUI Framework - Complete terminal UI with 60 FPS rendering, EventBus integration, and 4 production widgets
  • Test Infrastructure Fix - Resolved 64 test failures with 1-line change, achieving 100% test pass rate (2,175/2,175)
  • Comprehensive Documentation - TUI-ARCHITECTURE.md (891 lines) + updated CHANGELOG/README
  • Production Quality - 71 new tests (56 unit + 15 integration), 0 clippy warnings, cargo fmt clean
  • TUI-Ready Architecture - Event-driven design with thread-safe state management and real-time scan visualization

Key Achievements:

  • Tests: 2,175 passing (100% pass rate, +71 from v0.5.0-fix)
  • Coverage: 54.92% (maintained from Phase 5)
  • Fuzz Testing: 230M+ executions, 0 crashes (production validation)
  • TUI Performance: 60 FPS rendering, <5ms frame time, 10K+ events/sec throughput
  • Code Quality: 0 clippy warnings, cargo fmt clean, production-ready

This release establishes the foundation for all Phase 6 TUI features, enabling real-time scan visualization with professional terminal interface while maintaining 100% backward compatibility with CLI mode.


🎨 Sprint 6.1: TUI Framework & Event Integration

Status: COMPLETE (100%) | Duration: ~40 hours | Tests: +71 (56 unit + 15 integration)

Sprint 6.1 delivers a complete TUI framework using ratatui 0.29 and crossterm 0.28, integrated with EventBus from Sprint 5.5.3 for real-time scan visualization. The implementation follows event-driven architecture principles with immediate mode rendering and robust state management.

Technology Stack

TUI Framework:

  • ratatui 0.29 - Modern terminal UI framework with immediate mode rendering
  • crossterm 0.28 - Cross-platform terminal manipulation (raw mode, alternate screen)
  • tokio - Async runtime for concurrent event handling (keyboard, EventBus, timer)

Architecture:

  • Event-Driven: tokio::select! pattern coordinates keyboard input, EventBus events, and render timer
  • Immediate Mode: ratatui diffing algorithm for efficient terminal updates
  • Thread-Safe State: Arc<RwLock> shared between scanner and TUI
  • 60 FPS Target: 16ms render budget with <5ms actual frame time (300% headroom)

Core TUI Components

1. App Lifecycle Management

Terminal Initialization:

  • Raw mode activation (disable line buffering, echo)
  • Alternate screen buffer (preserve user's terminal state)
  • Cursor hiding (clean UI presentation)
  • Panic hook installation (guaranteed terminal restoration on crash)

Graceful Shutdown:

  • Normal exit (q key): Restore terminal → Exit cleanly
  • Ctrl+C handler: Restore terminal → Exit cleanly
  • Panic scenario: Panic hook ensures terminal restoration even on crash
  • All exit paths validated with integration tests

Code Example:

pub struct App {
    scan_state: Arc<RwLock<ScanState>>,  // Shared with scanner
    ui_state: UIState,                    // Local TUI state
    event_bus: Arc<EventBus>,             // Event subscription
    should_quit: bool,
}

2. State Management Pattern

Shared ScanState (Arc<RwLock>):

  • Purpose: Thread-safe communication between scanner and TUI
  • Fields: stage, progress, open_ports, discovered_hosts, errors, warnings
  • Access Pattern: Read locks for TUI rendering, write locks for scanner updates
  • Performance: parking_lot::RwLock for 2-3× better performance vs std::sync

Local UIState (single-threaded):

  • Purpose: Ephemeral TUI-only state (navigation, UI state)
  • Fields: selected_pane, cursor_position, scroll_offset, show_help, fps
  • No Locking: Single-threaded TUI rendering eliminates synchronization overhead

Design Rationale:

  • Event-carried state transfer (events contain full state delta)
  • Minimizes lock contention (read-heavy pattern for rendering)
  • Clean separation of concerns (scanner state vs UI state)

3. Event System Integration

EventBus Subscription:

  • Events Handled: ScanStarted, ScanCompleted, PortFound, ServiceDetected, ProgressUpdate, ErrorOccurred
  • Rate Limiting: Event aggregator batches high-frequency events every 16ms (60 FPS)
  • Aggregation Strategy: Batch PortFound events (100 → 1 update), sample progress updates
  • Buffer Management: 1,000 event max, drop beyond threshold (prevents memory growth)
  • Throughput: Handles 10,000+ events/sec without UI lag

Event Loop (tokio::select!):

loop {
    tokio::select! {
        Some(Ok(event)) = crossterm_rx.next() => {
            // Handle keyboard input (Tab, hjkl, q, ?)
        },
        Some(scan_event) = event_bus.subscribe() => {
            // Handle EventBus updates (ScanStarted, PortFound, etc.)
        },
        _ = tick_interval.tick() => {
            // Render at 60 FPS (16ms interval)
        },
    }
}

Event Handling:

  • Keyboard events: Immediate response (Tab, hjkl navigation, q quit)
  • EventBus events: State updates trigger re-render
  • Tick events: Consistent 60 FPS rendering regardless of event activity

4. Widget System

4 Production Widgets Implemented:

StatusBar Widget:

  • Purpose: Top-level scan status display
  • Content: Scan target, start time, scan type, status indicator
  • Updates: Real-time via ScanStarted event
  • Styling: Colored status (Green=running, Yellow=paused, Blue=complete)

MainWidget:

  • Purpose: Central display area (scan results placeholder for Sprint 6.2)
  • Content: Currently shows "TUI Framework Ready" message
  • Future: Will display port table, service details (Sprint 6.2+)

LogWidget:

  • Purpose: Event log display with scrollback
  • Content: Recent events (ScanStarted, PortFound, Errors)
  • Features: Auto-scroll, colored events, timestamp
  • Capacity: 1,000 events max (circular buffer)

HelpWidget:

  • Purpose: Keyboard shortcut reference
  • Content: Tab (next pane), hjkl (navigation), q (quit), ? (detailed help)
  • Visibility: Always visible footer, detailed help on ? key
  • Updates: Context-sensitive (shows relevant keys for active pane)

5. Rendering Pipeline

60 FPS Immediate Mode Rendering:

  • Frame Budget: 16ms per frame (1000ms / 60 FPS)
  • Actual Performance: <5ms frame time (300% headroom)
  • Diffing Algorithm: ratatui compares previous/current frame, sends only deltas
  • Skip Strategy: If rendering exceeds budget, skip frame (don't block event handling)

Layout Structure:

  • Header: StatusBar (3 lines)
  • Main Area: MainWidget (flexible height, grows with terminal)
  • Log Area: LogWidget (20% of height, scrollable)
  • Footer: HelpWidget (2 lines, always visible)

Performance Validation:

  • Frame time measured with Instant::now()
  • FPS counter displayed in StatusBar
  • 60 FPS maintained under 10K events/sec load (stress tested)

6. Keyboard Navigation

Implemented Keybindings:

  • Tab / Shift+Tab: Cycle through panes (StatusBar → Main → Log → Help → ...)
  • hjkl: Vim-style navigation (h=left, j=down, k=up, l=right)
  • q: Quit TUI (with confirmation if scan running)
  • ?: Toggle detailed help screen
  • Ctrl+C: Emergency exit (same as q, terminal restoration guaranteed)

Navigation State:

  • selected_pane: Enum tracking which pane has focus
  • Visual Feedback: Selected pane highlighted with border color
  • Wrap-Around: Tab at last pane wraps to first pane

Quality Metrics

Testing:

  • 71 new tests (56 unit + 15 integration, 100% passing)
  • Unit tests: App state transitions, pane selection, event handling, quit logic
  • Integration tests: TUI launch, EventBus subscription, keyboard input, terminal restoration, panic scenarios
  • Manual testing: 4 terminals (GNOME, Alacritty, iTerm2, Windows Terminal)

Code Quality:

  • 0 clippy warnings (strict mode: -D warnings)
  • cargo fmt clean (100% formatted)
  • 3,638 lines production code (prtip-tui crate)
  • 891 lines documentation (TUI-ARCHITECTURE.md comprehensive guide)

Performance:

  • 60 FPS rendering (measured <5ms frame time)
  • 10K+ events/sec throughput (no dropped frames under stress test)
  • <100ms latency (keyboard input to screen update)

Usage Examples

Launch TUI Mode:

# TUI mode with live scan visualization
prtip --tui -sS -p 1-1000 192.168.1.0/24

# TUI mode with service detection
prtip --tui -sV -p 80,443 example.com

# CLI mode (original behavior, backward compatible)
prtip -sS -p 1-1000 192.168.1.0/24

Keyboard Shortcuts:

Tab         - Cycle through panes
Shift+Tab   - Cycle backward through panes
hjkl        - Vim-style navigation
q           - Quit TUI
?           - Toggle help screen
Ctrl+C      - Emergency exit

EventBus Integration:

// Scanner publishes events
event_bus.publish(Event::PortFound {
    target: target_ip,
    port: 80,
    state: PortState::Open,
    timestamp: Utc::now(),
});

// TUI receives and displays
// Real-time port table update in MainWidget (Sprint 6.2)

Documentation

TUI-ARCHITECTURE.md (891 lines):

  • Section 1: Overview (TUI goals, design principles, technology stack)
  • Section 2: Component Diagram (App, Widgets, EventBus relationships)
  • Section 3: Data Flow (Scanner → EventBus → TUI → Display pi...
Read more