firmware/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/wifiscan.html

27 lines
669 B
HTML
Executable File

#!/usr/bin/haserl
<%in /www/include/header %>
<table style="width: 100%">
<tr><td>
<fieldset>
<legend>Wifi Scan</legend>
<table class="wifitable">
<tr>
<th>Name</th>
<th>Frequenz</th>
<th>Signal</th>
<th>MAC</th>
</tr>
<%
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#&#\&amp;#'
# The HTML comment contains the signal quality to allow sorting
%>
</table>
</fieldset>
</td></tr>
</table>
<%in /www/include/footer %>