Skip to main content

Overview

scan4all supports multiple output formats, allowing you to save results for further analysis, reporting, or integration with other tools.

Standard Output

By default, results are displayed in the terminal:
Terminal
$ scan4all -host 192.168.1.100

192.168.1.100:22
192.168.1.100:80
192.168.1.100:443
192.168.1.100:3306
[INF] Found 4 ports on host 192.168.1.100 (192.168.1.100)

File Output

Plain Text Format

Save results to a plain text file:
scan4all -host 192.168.1.1 -o results.txt
results.txt:
192.168.1.1:22
192.168.1.1:80
192.168.1.1:443
192.168.1.1:3306
192.168.1.1:8080
Port scan results are automatically saved to a separate file with the prefix port. (e.g., port.results.txt)

JSON Format

Export results as JSON Lines (JSONL) for programmatic processing:
scan4all -host 192.168.1.1 -json -o results.json

JSON Output Structure

results.json:
{"host":"192.168.1.1","ip":"192.168.1.1","port":22,"timestamp":"2026-03-05T10:30:45Z"}
{"host":"192.168.1.1","ip":"192.168.1.1","port":80,"timestamp":"2026-03-05T10:30:45Z"}
{"host":"192.168.1.1","ip":"192.168.1.1","port":443,"timestamp":"2026-03-05T10:30:46Z"}
port.results.json (port scan results):
{"host":"192.168.1.1","ip":"192.168.1.1","port":22,"timestamp":"2026-03-05T10:30:40Z"}
{"host":"192.168.1.1","ip":"192.168.1.1","port":80,"timestamp":"2026-03-05T10:30:41Z"}

Parsing JSON Output

import json

with open('results.json', 'r') as f:
    for line in f:
        result = json.loads(line)
        print(f"{result['host']}:{result['port']}")

CSV Format

Export results as CSV for spreadsheet analysis:
scan4all -host 192.168.1.1 -csv -o results.csv

CSV Output Structure

results.csv:
host,ip,port,timestamp
192.168.1.1,192.168.1.1,22,2026-03-05T10:30:45Z
192.168.1.1,192.168.1.1,80,2026-03-05T10:30:45Z
192.168.1.1,192.168.1.1,443,2026-03-05T10:30:46Z
192.168.1.1,192.168.1.1,3306,2026-03-05T10:30:46Z
port.results.csv (port scan results):
host,ip,port,timestamp
192.168.1.1,192.168.1.1,22,2026-03-05T10:30:40Z
192.168.1.1,192.168.1.1,80,2026-03-05T10:30:41Z
CSV format is ideal for:
  • Importing into Excel or Google Sheets
  • Database imports
  • Generating reports
  • Data visualization

Output File Naming

When you specify an output file, scan4all creates two files:
FileContains
results.txtMain scan results (vulnerabilities, services)
port.results.txtPort scan results
This applies to all formats:
scan4all -host target -o results.txt
# Creates: results.txt, port.results.txt

Silent Mode

Combine output files with silent mode to only write results without terminal output:
scan4all -host 192.168.1.1 -silent -o results.txt
Useful for:
  • Background scans
  • Cron jobs
  • Automated workflows
  • Reducing log noise

Verbose Output

Increase output detail with verbose mode:
scan4all -host 192.168.1.1 -v -o results.txt
This includes:
  • Detailed scan progress
  • HTTP responses
  • Fingerprinting details
  • POC execution results

Practical Examples

1

Basic Scan with Output

scan4all -host 192.168.1.0/24 -o scan-results.txt
2

JSON Output for Automation

scan4all -host targets.txt -json -o results.json
Process results:
cat results.json | jq -r 'select(.port == 80 or .port == 443) | .host'
3

CSV Export for Reporting

scan4all -host 192.168.1.0/24 -csv -o network-audit.csv
Import into Excel or analyze with pandas:
import pandas as pd
df = pd.read_csv('network-audit.csv')
print(df['port'].value_counts())
4

Silent Background Scan

nohup scan4all -host 10.0.0.0/16 -silent -json -o large-scan.json &

Output Best Practices

Use JSON for Automation

JSON format is easiest to parse programmatically

CSV for Analysis

CSV works best for spreadsheet analysis and reporting

Organize by Date

Include timestamps in filenames: results-2026-03-05.json

Separate Large Scans

Use directories to organize results from multiple scans

Integration Examples

Parse and Filter Results

# Extract hosts with port 22 open
cat results.json | jq -r 'select(.port == 22) | .host' | sort -u

# Find all web servers
cat results.json | jq -r 'select(.port == 80 or .port == 443) | .host' | sort -u

# Count ports per host
cat results.json | jq -r '.host' | sort | uniq -c

Convert Formats

# JSON to CSV using jq
cat results.json | jq -r '[.host, .ip, .port, .timestamp] | @csv' > converted.csv

# CSV to JSON using python
python3 -c "import pandas as pd; pd.read_csv('results.csv').to_json('converted.json', orient='records', lines=True)"

Database Import

import json
import sqlite3

conn = sqlite3.connect('scan_results.db')
cursor = conn.cursor()

cursor.execute('''CREATE TABLE IF NOT EXISTS results
                  (host TEXT, ip TEXT, port INTEGER, timestamp TEXT)''')

with open('results.json', 'r') as f:
    for line in f:
        data = json.loads(line)
        cursor.execute('INSERT INTO results VALUES (?, ?, ?, ?)',
                      (data['host'], data['ip'], data['port'], data['timestamp']))

conn.commit()
conn.close()

Comparison of Output Formats

FormatBest ForFile SizeParsability
TextQuick review, grepSmallestLow
JSONAutomation, APIsMediumHigh
CSVReports, spreadsheetsMediumMedium

Next Steps

Advanced Options

Explore advanced scanning features

Proxy Configuration

Learn to route scans through proxies

Build docs developers (and LLMs) love