2016-03-13 13:32:12 +01:00
|
|
|
#!/usr/bin/haserl
|
|
|
|
|
|
|
|
<%in /www/ssl/cgi-bin/header %>
|
|
|
|
<table style="width: 100%">
|
|
|
|
<tr><td>
|
|
|
|
<fieldset>
|
|
|
|
<legend>Wifi Scan</legend>
|
|
|
|
<table class="wifitable">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Kanal</th>
|
|
|
|
<th>Signal</th>
|
|
|
|
<th>Typ</th>
|
2016-07-19 00:39:54 +02:00
|
|
|
<th>MAC</th>
|
|
|
|
<th>Encryption</th>
|
2016-03-13 13:32:12 +01:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<%
|
|
|
|
iwinfo w2mesh scan |\
|
|
|
|
awk -v RS='' \
|
2018-01-21 15:54:29 +01:00
|
|
|
'{r = gensub(/.*Address: ([0-9A-F:]*)?.*ESSID: "?([^"\n]*)"?.*Mode: ([^ ]*).*Channel: ([0-9]*).*Signal: (-[0-9]*) dBm.*Encryption: ([^"]*).*/, \
|
|
|
|
"<!-- \\5 --><tr><td>\\2</td><td>\\4</td><td>\\5 dBm</td><td>\\3</td><td>\\1</td><td>\\6</td></tr>", "g"); print r;}' | sort -n | sed 's#&#\&#'
|
2016-03-13 13:32:12 +01:00
|
|
|
# The HTML comment contains the signal quality to allow sorting
|
|
|
|
%>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<%in /www/ssl/cgi-bin/footer %>
|