Skip to main content

Overview

Input options define which hosts to scan and which to exclude. You can specify targets individually, from files, or via standard input.

Target Specification

-host
string[]
Hosts to scan ports for. Accepts comma-separated values.Examples:
# Single host
scan4all -host example.com

# Multiple hosts
scan4all -host example.com,192.168.1.1,10.0.0.1

# IP ranges
scan4all -host 192.168.1.1-192.168.1.255

# CIDR notation
scan4all -host 192.168.1.0/24
-l, -list
string
File containing list of hosts to scan (one per line).File format:
example.com
192.168.1.1
10.0.0.0/24
scanme.nmap.org
Example:
scan4all -l targets.txt
scan4all -list hosts.txt -p 80,443

Standard Input

You can also pipe targets via stdin:
cat targets.txt | scan4all
echo "example.com" | scan4all -p 80,443

Exclusions

-eh, -exclude-hosts
string
Hosts to exclude from the scan (comma-separated).Useful for skipping specific IPs or ranges within a larger target set.Examples:
# Exclude specific IPs
scan4all -host 192.168.1.0/24 -eh 192.168.1.1,192.168.1.254

# Exclude a range
scan4all -host 10.0.0.0/16 -exclude-hosts 10.0.1.0/24
-ef, -exclude-file
string
File containing list of hosts to exclude from scan (one per line).File format:
192.168.1.1
10.0.0.1
excluded-host.com
Example:
scan4all -l all_hosts.txt -ef exclude_list.txt

Combining Options

You can combine multiple input methods:
# Scan from file, add extra hosts, exclude specific IPs
scan4all -l targets.txt -host extra.com -eh 192.168.1.1

# Multiple sources with exclusions
scan4all -host 10.0.0.0/24 -l additional.txt -ef exclude.txt

Input Validation

  • Invalid hostnames or IP addresses are automatically filtered
  • DNS resolution is performed for domain names
  • Private IP ranges are supported
  • IPv4 addresses are fully supported

Best Practices

  1. Use files for large target lists - More manageable than command-line arguments
  2. Maintain exclusion lists - Keep a file of hosts that should never be scanned
  3. Verify targets first - Use ping or basic checks before full scans
  4. Use CIDR notation - More efficient than listing individual IPs
  5. Comment your target files - Document why hosts are included (though comments aren’t parsed)

Build docs developers (and LLMs) love