2016-03-13 13:32:12 +01:00
|
|
|
#!/usr/bin/haserl
|
|
|
|
|
2020-12-12 17:12:30 +01:00
|
|
|
<%in /www/include/header %>
|
2016-03-13 13:32:12 +01:00
|
|
|
<table style="width: 100%">
|
|
|
|
<tr><td>
|
|
|
|
<fieldset>
|
|
|
|
<legend>Wifi Scan</legend>
|
|
|
|
<table class="wifitable">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
2020-03-11 01:47:29 +01:00
|
|
|
<th>Frequenz</th>
|
2016-03-13 13:32:12 +01:00
|
|
|
<th>Signal</th>
|
2016-07-19 00:39:54 +02:00
|
|
|
<th>MAC</th>
|
2016-03-13 13:32:12 +01:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<%
|
2020-03-11 01:47:29 +01:00
|
|
|
iw dev w2mesh scan | sed 's/^BSS/\nBSS/g' |\
|
|
|
|
awk -v RS='' '{r = gensub(/.*BSS ([0-9a-f:]*)?.*freq: ([0-9]*).*signal: (-[0-9]*\.[0-9]*) dBm.*SSID: ([^\n]*).*/, "<!-- \\3 --><tr><td>\\4</td><td>\\2 MHz</td><td>\\3 dBm</td><td>\\1</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>
|
|
|
|
|
2020-12-12 17:12:30 +01:00
|
|
|
<%in /www/include/footer %>
|