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:
$ 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)
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' ] } " )
Extract specific fields: cat results.json | jq -r '.host + ":" + (.port|tostring)'
Filter by port: cat results.json | jq 'select(.port == 80)'
Count total results: cat results.json | jq -s 'length'
const fs = require ( 'fs' );
const readline = require ( 'readline' );
const rl = readline . createInterface ({
input: fs . createReadStream ( 'results.json' )
});
rl . on ( 'line' , ( line ) => {
const result = JSON . parse ( line );
console . log ( ` ${ result . host } : ${ result . port } ` );
});
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:
File Contains 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
Basic Scan with Output
scan4all -host 192.168.1.0/24 -o scan-results.txt
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'
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())
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
# 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()
Format Best For File Size Parsability Text Quick review, grep Smallest Low JSON Automation, APIs Medium High CSV Reports, spreadsheets Medium Medium
Next Steps
Advanced Options Explore advanced scanning features
Proxy Configuration Learn to route scans through proxies