2

Google Accounts seem to be able to access that information just by having access to my browser (Chrome): Google Accounts shows computer hostname

I assume this can be done through WebRTC. There wasn't any prompt to access my network, but probably hostname can be read without it.

What API that uses?

Ilia Sidorenko
  • 2,157
  • 3
  • 26
  • 30
  • navigator.userAgent – Jonas Wilms Jun 24 '17 at 12:11
  • 1
    With WebRTC (PeerConnection API) you can only get local(LAN) IP, not the host name. – Ajay Jun 25 '17 at 05:49
  • Interesting. There must be some way how google does it, how else apart from browser api would it get that information out of session. I haven't got any desktop google software running. – Ilia Sidorenko Jun 26 '17 at 00:54
  • Possible duplicate of [How can I read the client's machine/computer name from the browser?](https://stackoverflow.com/questions/922476/how-can-i-read-the-clients-machine-computer-name-from-the-browser) – mumair Jun 26 '17 at 10:38
  • That question and not any of it answers address chrome though... Thinking about it now, it must be coming from chrome extensions or the chrome sync. Wonder whether they provide an api to use for web devs. – Ilia Sidorenko Jun 26 '17 at 10:52
  • The google software that was installed on my mac was Google Chrome all along... – Ilia Sidorenko Jun 26 '17 at 10:54
  • 2
    Thanks. Sorry I couldn't give a more helpful answer. Chrome is always going to be more powerful than Chrome extensions, because it's a native app. It's probably calling the OS-level APIs (e.g., https://msdn.microsoft.com/en-us/library/windows/desktop/ms724295(v=vs.85).aspx… on Windows). But that kind of information wouldn't be provided via the extensions API for the reasons. Hopefully that make sense – mumair Jun 26 '17 at 12:14

0 Answers0