aredn: switch from active to passive wifi scan

Password protection is no longer necessary with
a passive scan.  results are same or very similiar,
both options do not always show all devices.
This commit is contained in:
Joe Ayers 2019-08-24 19:19:34 -07:00 committed by Joe AE6XE
parent 412a1e5f88
commit 3a4d92add2
2 changed files with 2 additions and 3 deletions

View File

@ -4,6 +4,5 @@
/cgi-bin/vpn:root:$p$root /cgi-bin/vpn:root:$p$root
/cgi-bin/vpnc:root:$p$root /cgi-bin/vpnc:root:$p$root
/cgi-bin/supporttool:root:$p$root /cgi-bin/supporttool:root:$p$root
/cgi-bin/scan:root:$p$root
/cgi-bin/advancedconfig:root:$p$root /cgi-bin/advancedconfig:root:$p$root
/cgi-bin/apiprotected:root:$p$root /cgi-bin/apiprotected:root:$p$root

View File

@ -168,7 +168,7 @@ die "bad interface" if not defined $iface;
if($raw) if($raw)
{ {
system("iw dev $iface scan"); system("iw dev $iface scan passive");
system("iw dev $iface station dump"); system("iw dev $iface station dump");
exit; exit;
} }
@ -179,7 +179,7 @@ while(1)
$line =~ /['"](.*-(5|10|20)-v[3456])/; $line =~ /['"](.*-(5|10|20)-v[3456])/;
$myssid = $1; $myssid = $1;
open(FILE, "iw dev $iface scan 2>&1 |") or die "iw scan failed"; open(FILE, "iw dev $iface scan passive 2>&1 |") or die "iw scan failed";
$mac = ""; $mac = "";
$host = "N/A"; $host = "N/A";
$lastseen = 0; $lastseen = 0;