]> code.delx.au - monosys/blobdiff - wifi-scan
passphrasegen: calculate entropy and only print one passphrase for better randomness
[monosys] / wifi-scan
index f3f3f564dd44bce0d25395a9ebfe40990c0e7071..344581ad5809ff0ed65ed91a0dd3d02dfc1b75e3 100755 (executable)
--- a/wifi-scan
+++ b/wifi-scan
@@ -51,6 +51,9 @@ async function scanInterface(iface) {
         if (line.startsWith('DS Parameter set: channel')) {
             partial.channel = line.split(':')[1].trim();
         }
+        if (line.startsWith('freq: ')) {
+            partial.freq = 'freq ' + line.split(':')[1].trim();
+        }
     }
 
     function finishPartial() {
@@ -59,7 +62,7 @@ async function scanInterface(iface) {
         }
 
         partial.ssid = partial.ssid || '';
-        partial.channel = partial.channel || '';
+        partial.channel = partial.channel || partial.freq || '';
 
         const sortKey = [
             parseFloat(partial.signal),