Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.25 KB

File metadata and controls

53 lines (40 loc) · 1.25 KB

Why do I get "permission denied" errors?

ZMap requires raw socket access, which typically needs root/sudo privileges:

sudo python your_script.py

How do I scan the entire internet?

Simply omit the subnets parameter. Warning: Ensure you have proper authorization and bandwidth:

results = zmap.scan(target_port=80, bandwidth="10M")

How can I limit the scan scope?

Use max_targets, max_runtime, or max_results:

results = zmap.scan(
    target_port=443,
    max_targets=1000,      # Scan only 1000 hosts
    max_runtime=60,        # Run for max 60 seconds
)

How do I handle large result sets?

Use the streaming API to avoid memory issues:

for result in zmap.stream_results("large_scan.csv"):
    process_result(result)

Troubleshooting

Common Issues

ZMap not found

ZMapCommandError: zmap command failed with return code -1

Solution: Install ZMap or specify the path: ZMap(zmap_path="/usr/local/bin/zmap")

Rate limiting / bandwidth issues

# Reduce scan rate to avoid network issues
results = zmap.scan(target_port=80, bandwidth="1M")  # 1 Mbps

Output file errors

  • Ensure the output directory exists and is writable
  • Check disk space for large scans