|
@@ -115,8 +115,7 @@ local function get_ssid_name(iface)
|
|
|
local result = f:read("*a")
|
|
local result = f:read("*a")
|
|
|
f:close()
|
|
f:close()
|
|
|
-- Extract SSIDs from output
|
|
-- Extract SSIDs from output
|
|
|
- for line in result:gmatch("[^
|
|
|
|
|
-]+") do
|
|
|
|
|
|
|
+ for line in result:gmatch("[^\n]+") do
|
|
|
local ssid = line:match("ssid%s+(.+)")
|
|
local ssid = line:match("ssid%s+(.+)")
|
|
|
if ssid and ssid ~= "" then
|
|
if ssid and ssid ~= "" then
|
|
|
return ssid
|
|
return ssid
|
|
@@ -145,8 +144,7 @@ local function get_all_ssids()
|
|
|
local result = f:read("*a")
|
|
local result = f:read("*a")
|
|
|
f:close()
|
|
f:close()
|
|
|
local current_iface = nil
|
|
local current_iface = nil
|
|
|
- for line in result:gmatch("[^
|
|
|
|
|
-]+") do
|
|
|
|
|
|
|
+ for line in result:gmatch("[^\n]+") do
|
|
|
-- Detect interface from "Interface wlanX-1"
|
|
-- Detect interface from "Interface wlanX-1"
|
|
|
local iface = line:match("Interface%s+(wlan%d-%d)")
|
|
local iface = line:match("Interface%s+(wlan%d-%d)")
|
|
|
if iface then
|
|
if iface then
|