Skip to main content

Overview

Debug options help you monitor scan progress, troubleshoot issues, and control the amount of information displayed during execution.

Verbosity Control

-v, -verbose
boolean
default:"false"
Display verbose output with detailed information about scan operations.Shows additional details including:
  • Scan phase transitions
  • Port discovery events
  • Service detection attempts
  • HTTP analysis progress
  • Error messages and warnings
Example:
# Verbose output
scan4all -host example.com -v

# Verbose with output file
scan4all -host example.com -verbose -o results.txt
Use verbose mode for:
  • Understanding scan behavior
  • Troubleshooting issues
  • Learning what the tool is doing
  • Debugging connectivity problems
-debug
boolean
default:"false"
Display debugging information for development and troubleshooting.Provides the most detailed output including:
  • Internal state information
  • Network packet details
  • Library debug messages
  • Configuration parameters
  • Detailed error traces
Example:
# Debug mode
scan4all -host example.com -debug

# Debug with specific configuration
scan4all -host example.com -debug -rate 500 -timeout 2000
Debug mode produces extensive output. Only use when actively troubleshooting issues.
-silent
boolean
default:"false"
Display only results in output, suppressing all other messages.Silent mode removes:
  • Banner and version info
  • Progress indicators
  • Status messages
  • Warnings
  • Summary statistics
Only scan results (found ports/services) are displayed.Example:
# Silent output - only results
scan4all -host example.com -silent

# Silent with output file
scan4all -host example.com -silent -o results.txt

# Silent for scripting
scan4all -host example.com -silent -json | jq '.port'
Perfect for:
  • Shell scripting
  • Parsing output
  • CI/CD pipelines
  • Automated workflows

Output Formatting

-nc, -no-color
boolean
default:"false"
Disable colored output in CLI.Removes ANSI color codes from output. Automatically enabled on Windows systems.Example:
# Plain text output
scan4all -host example.com -nc

# For log files
scan4all -host example.com -no-color | tee scan.log
Automatically enabled on Windows. Use this flag on Unix systems when redirecting output to files or when color codes cause display issues.

Progress Monitoring

-stats
boolean
default:"false"
Display real-time statistics during scan execution.Shows periodic updates including:
  • Number of hosts scanned
  • Ports checked
  • Open ports found
  • Elapsed time
  • Estimated time remaining
  • Current scan rate
Example:
# Enable statistics
scan4all -l targets.txt -stats

# Stats with custom interval
scan4all -l targets.txt -stats -si 10
Essential for:
  • Long-running scans
  • Large target lists
  • Performance monitoring
  • Capacity planning
-si, -stats-interval
integer
default:"5"
Number of seconds between statistics updates.Controls how frequently progress statistics are displayed when -stats is enabled.Range: 1-300 seconds (practical range: 5-60)Examples:
# Update every 10 seconds
scan4all -l targets.txt -stats -si 10

# Frequent updates (every 2 seconds)
scan4all -host example.com -stats -stats-interval 2

# Infrequent updates (every minute)
scan4all -l large_targets.txt -stats -si 60
Lower intervals provide more frequent updates but can clutter output. Higher intervals are better for very long scans.

Version Information

-version
boolean
Display the version of scan4all and exit.Shows the current version number without performing any scanning.Example:
scan4all -version
Output:
Current Version: v1.x.x

Verbosity Levels Comparison

Silent Mode (-silent)

scan4all -host example.com -silent
Output:
example.com:80
example.com:443
example.com:8080

Normal Mode (Default)

scan4all -host example.com
Output:
[INFO] Running SYN scan with CAP_NET_RAW privileges
[INFO] Port scan starting....
example.com:80
example.com:443
example.com:8080
[INFO] Port scan over, web scan starting
[INFO] Found 3 open ports

Verbose Mode (-v)

scan4all -host example.com -v
Output:
[INFO] Running SYN scan with CAP_NET_RAW privileges
[INFO] Resolving example.com
[INFO] Resolved to 93.184.216.34
[INFO] Port scan starting....
[INFO] Scanning 1000 ports
[INFO] Port 80 open on example.com
[INFO] Port 443 open on example.com
[INFO] Port 8080 open on example.com
[INFO] Port scan over, web scan starting
[INFO] Checking HTTP on example.com:80
[INFO] Checking HTTPS on example.com:443
[INFO] Found 3 open ports

Debug Mode (-debug)

scan4all -host example.com -debug
Output: (Extremely detailed - includes all verbose output plus internal details)

Common Debug Scenarios

Troubleshooting Connection Issues

# See detailed connection attempts
scan4all -host example.com -debug -timeout 3000

Monitoring Large Scans

# Watch progress with stats
scan4all -l targets.txt -stats -si 10 -v

Scripting and Automation

# Silent output for parsing
scan4all -host example.com -silent -json > results.json

Performance Analysis

# Stats with verbose output
scan4all -l targets.txt -v -stats -si 5

File Logging

# Verbose output to file without colors
scan4all -host example.com -v -nc | tee scan.log

Output Redirection Examples

Save All Output

scan4all -host example.com -v > full_output.txt 2>&1

Save Only Results

scan4all -host example.com -silent > results.txt

Separate Results and Logs

scan4all -host example.com -o results.txt -v > scan.log

Real-time Monitoring and Saving

scan4all -host example.com -v | tee scan_output.log

Combining Debug Options

Production Scan (Minimal Output)

scan4all -l targets.txt -silent -o results.json -json

Development Testing

scan4all -host test.com -debug -stats -si 2

Monitored Long Scan

scan4all -l large_list.txt -v -stats -si 30 -o results.txt

Quiet Background Scan

scan4all -l targets.txt -silent -o results.json -json &

Performance Monitoring

When using -stats, you’ll see updates like:
[STATS] Hosts: 45/100 | Ports: 45000/100000 | Open: 342 | Time: 5m23s | ETA: 6m12s | Rate: 987 p/s
Metrics explained:
  • Hosts: Scanned / Total hosts
  • Ports: Checked / Total ports
  • Open: Number of open ports found
  • Time: Elapsed time
  • ETA: Estimated time remaining
  • Rate: Current packets per second

Best Practices

  1. Use appropriate verbosity:
    • Silent for automation
    • Normal for interactive use
    • Verbose for troubleshooting
    • Debug only when necessary
  2. Enable stats for long scans: Monitor progress and estimate completion
  3. Disable colors for logs: Use -nc when saving to files
  4. Combine with output files: Use -o even with -silent or -v
  5. Adjust stats interval: Match to scan duration
    • Short scans: 2-5 seconds
    • Medium scans: 5-15 seconds
    • Long scans: 30-60 seconds
  6. Redirect appropriately: Separate stdout and stderr when needed
  7. Use silent mode for pipelines: When chaining with other tools

Troubleshooting with Debug Options

No Results Returned

# Check with verbose mode
scan4all -host example.com -v

# If still unclear, use debug
scan4all -host example.com -debug

Slow Performance

# Monitor with stats to identify bottleneck
scan4all -host example.com -stats -si 5 -v

Unexpected Behavior

# Full debug output
scan4all -host example.com -debug > debug.log 2>&1

Parsing Errors in Scripts

# Ensure clean output
scan4all -host example.com -silent -json

Build docs developers (and LLMs) love