diff options
Diffstat (limited to 'snort-read-html.lsp')
-rw-r--r-- | snort-read-html.lsp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/snort-read-html.lsp b/snort-read-html.lsp new file mode 100644 index 0000000..5b10a4f --- /dev/null +++ b/snort-read-html.lsp @@ -0,0 +1,46 @@ +<? local view = ... ?> +<html> +<body> +<h1>SYSTEM INFO</h1> +<dt>Program version</dt> +<dd><?= view.status.version ?></dd> +<dt>Process status</dt> +<dd><?= view.status.status ?></dd> +<dt>Daemon control</dt> +<dd><form action="" method="POST"> +<input type=submit name="srvcmd" value="start" class="submit"> +<input type=submit name="srvcmd" value="stop" class="submit"> +<input type=submit name="srvcmd" value="restart" class="submit"></form> +</dd> +<? if (view.srvcmdresult) then ?> +<dt>Previous action</dt> +<dd><pre><?= view.srvcmdresult ?></pre></dd> +<? end ?> + + +<h1>ALERT(S)</h1> +<dt>Status</dt> +<dd><?= view.alerts ?> alert(s)</dd> + +<? if (alerts ~= "0") then ?> +<? for i = 1, view.alerts do ?> + <h2><?= view.alertresult[i].priority ?></h2> + <h3><?= view.alertresult[i].classification ?></h3> + <P><B><?= view.alertresult[i][1] ?></B><BR> + <? for j = 2, 10 do ?> + <? if not (view.alertresult[i][j]) then break end ?> + <?= view.alertresult[i][j] ?><BR> + <? end ?> + <I>(This alarm is repeated <B><?= view.alertresult[i]["count"] ?></B> times)</I></P> +<? end ?> +<? end ?> + +<? +--[[ DEBUG INFORMATION +require("debugs") +io.write(debugs.variables(view)) +--]] +?> + +</body> +</html> |