Skip to content

Commit 31d86ee

Browse files
committed
enhance report generation: add HTML export option and update documentation
1 parent adf811c commit 31d86ee

1 file changed

Lines changed: 28 additions & 6 deletions

File tree

pages/index.html

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ <h2>Features</h2>
8787
network noise and load on the target.
8888
</li>
8989
<li>
90-
<strong>Clean output + JSON</strong> — a neatly aligned
91-
table for humans, plus structured JSON export for
92-
scripts and pipelines.
90+
<strong>Clean output, JSON &amp; HTML</strong> — a
91+
neatly aligned table for humans, structured JSON export
92+
for scripts and pipelines, plus a self-contained, styled
93+
HTML report you can open in any browser.
9394
</li>
9495
<li>
9596
<strong>Featherweight</strong> — built on Node's
@@ -118,8 +119,9 @@ <h3>🐳 Run with Docker (recommended)</h3>
118119
</p>
119120
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">docker</span> run <span class="tok-flag">--rm</span> <span class="tok-flag">--network</span> host ghcr.io/zuedev/nodescan <span class="tok-flag">--host</span> 127.0.0.1 <span class="tok-flag">--ports</span> 1-1024</code></pre>
120121
<p>
121-
Save a JSON report by mounting a writable directory and
122-
writing into it:
122+
Save a JSON or HTML report by mounting a writable directory
123+
and writing into it — a <code>.html</code> extension
124+
produces an HTML report, any other writes JSON:
123125
</p>
124126
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">docker</span> run <span class="tok-flag">--rm</span> <span class="tok-flag">-v</span> <span class="tok-string">"${PWD}:/data"</span> ghcr.io/zuedev/nodescan <span class="tok-flag">-h</span> example.com <span class="tok-flag">-p</span> 1-1024 <span class="tok-flag">-o</span> /data/results.json
125127
<span class="tok-comment"># On Linux, add --user "$(id -u):$(id -g)" so the file is owned by you.</span></code></pre>
@@ -257,6 +259,16 @@ <h3>Export results to JSON</h3>
257259
<p>Great for diffing scans or feeding other tools.</p>
258260
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">node</span> scanner.js <span class="tok-flag">--host</span> 192.168.1.1 <span class="tok-flag">--ports</span> 1-1024 <span class="tok-flag">--output</span> results.json</code></pre>
259261

262+
<h3>Export an HTML report</h3>
263+
<p>
264+
A <code>.html</code> (or <code>.htm</code>) extension writes
265+
a self-contained, styled report you can open in any browser;
266+
any other extension writes JSON. Banner text is
267+
HTML-escaped, so reports are safe to open even after
268+
scanning untrusted hosts.
269+
</p>
270+
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">node</span> scanner.js <span class="tok-flag">--host</span> 192.168.1.1 <span class="tok-flag">--ports</span> 1-1024 <span class="tok-flag">--output</span> report.html</code></pre>
271+
260272
<h3>Options</h3>
261273
<table>
262274
<thead>
@@ -310,7 +322,10 @@ <h3>Options</h3>
310322
<tr>
311323
<td><code>--output</code></td>
312324
<td><code>-o</code></td>
313-
<td>Export results to a JSON file</td>
325+
<td>
326+
Export results to a file (<code>.html</code>
327+
HTML report, otherwise JSON)
328+
</td>
314329
<td>none</td>
315330
</tr>
316331
<tr>
@@ -420,6 +435,13 @@ <h3>Fingerprint a banner</h3>
420435
<code>--output</code>.
421436
</td>
422437
</tr>
438+
<tr>
439+
<td><code>buildHtmlReport(params)</code></td>
440+
<td>
441+
Render a self-contained HTML report from a
442+
scan's results.
443+
</td>
444+
</tr>
423445
<tr>
424446
<td><code>formatTable(results)</code></td>
425447
<td>

0 commit comments

Comments
 (0)