NetBIOS Node Report

This commit is contained in:
Eric A. Miller
2014-02-08 20:46:07 -05:00
parent 8e8839dd43
commit 79cc9622b2
6 changed files with 157 additions and 5 deletions

View File

@@ -0,0 +1,48 @@
[% USE date(format = '%Y-%m-%d %H:%M') %]
[% USE Number.Format %]
[% first = results.first %]
[% IF results.first.mac %]
[% row = results.reset %]
<table class="table table-bordered table-condensed table-striped nd_floatinghead">
<thead>
<tr>
<th>Domain</th>
<th>Node</th>
<th>Name</th>
<th>User</th>
<th>First Seen</th>
<th>Last Seen</th>
</tr>
</thead>
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td>[% row.domain | html_entity %]</td>
<td><a href="[% search_node %]&q=[% row.mac | uri %]">[% row.mac.upper | html_entity %]</td>
<td>[% IF row.domain %]\\[% row.domain | html %]\[% END %]<a href="[% search_node %]&q=[% row.nbname | uri %]">[% row.nbname | html_entity %]</a></td>
<td>[% row.nbuser || '[No User]' | html %]@<a href="[% search_node %]&q=[% row.ip | uri %]">[% row.ip | html_entity %]</a></td>
<td>[% date.format(row.time_first) | html_entity %]</td>
<td>[% date.format(row.time_last) | html_entity %]</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
[% row = results.reset %]
<table class="table table-bordered table-condensed table-striped nd_floatinghead">
<thead>
<tr>
<th>Domain</th>
<th>Count</th>
</tr>
</thead>
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td class="nd_linkcell"><a href="[% uri_for('report/netbios') %]?domain=[% row.domain || 'blank' | uri %]">[% row.domain || '(Blank Domain)' | html %]</a></td>
<td>[% row.count | format_number %]</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]

View File

@@ -0,0 +1,19 @@
<p class="nd_sidebar-title"><em>NetBIOS Search Options</em></p>
<div class="clearfix">
<select class="nd_side-select" size="[% domain_list.size > 8 ? 8 : domain_list.size %]"
multiple="on" name="domain"
rel="tooltip" data-placement="left" data-offset="5" data-title="Domain"/>
[% FOREACH opt IN domain_list %]
[% UNLESS opt == '' %]
<option[% ' selected="selected"' IF domain_lkp.exists(opt) %]>[% opt | html_entity %]</option>
[% ELSE %]
<option value="blank"[% ' selected="selected"' IF domain_lkp.exists('blank') %]>[% '(Blank Domain)' | html_entity %]</option>
[% END %]
[% END %]
</select>
</div>
<button id="[% report.tag %]_submit" type="submit" class="btn btn-info">
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Search NetBIOS</button>