-- "Какая сеть" → `netsh wlan show interfaces` → grep SSID local res = jarvis.system.exec('netsh wlan show interfaces') if not res.success then return jarvis.cmd.error("Не получилось получить данные о Wi-Fi.") end local out = res.stdout or "" local ssid = out:match("SSID%s+:%s+(.-)\r?\n") -- Russian Windows: "SSID : MyNetwork" -- The non-localised case: same format if not ssid then ssid = out:match("Имя сети%s+:%s+(.-)\r?\n") end ssid = ssid and ssid:gsub("^%s+", ""):gsub("%s+$", "") or "" if ssid == "" or ssid == "(нет)" or ssid == "(none)" then return jarvis.cmd.not_found("Wi-Fi не подключен или адаптер выключен.") end return jarvis.cmd.ok("Сеть: " .. ssid .. ".")