Search code examples
google-chromegoogle-chrome-appssid

Find Chrome packaged app ssid


I'm searching for a way to find the currently connected essid (and/or mac address) in a packaged chrome app.

Is it possible to find it using device permissions? I know it's not possible via javascript due to the sandbox.


Solution

  • Short answer is no.

    Longer answer is: you can get the list of devices and their IP addresses out getNetworkList on the socket API.

    chrome.socket.getNetworkList(function(interfaces) {
        for(var i in interfaces) {
          var interface = interfaces[i];
          var opt = document.createElement("option");
          opt.value = interface.address;
          opt.innerText = interface.name + " - " + interface.address;
          hosts.appendChild(opt);
        }
      });