forked from freifunk-franken/firmware
29 lines
636 B
HTML
Executable File
29 lines
636 B
HTML
Executable File
#!/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>
|
|
</tr>
|
|
|
|
<%
|
|
iwinfo w2mesh scan |\
|
|
awk -v RS='' \
|
|
'{r = gensub(/.*ESSID: "?(unknown|[^"]*)"?.*Mode: ([^ ]*).*Channel: ([0-9]*).*Signal: (-[0-9]*) dBm.*/, \
|
|
"<!-- \\4 --><tr><td>\\1</td><td>\\3</td><td>\\4 dBm</td><td>\\2</td></tr>", "g"); print r;}' | sort -n
|
|
# The HTML comment contains the signal quality to allow sorting
|
|
%>
|
|
</table>
|
|
</fieldset>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<%in /www/ssl/cgi-bin/footer %>
|