4

I'm using Chromium (Version 30.0.1599.114 Ubuntu 12.10) under Linux. I'm trying to access a website that claims that it doesn't work under Linux. Of course, this is most likely crazy since the web is platform-independent (unless they're using some kind of evil plug-in).

I've used a user agent switcher to supply a Windows user agent, but to no avail. Upon viewing the source, it appears that the site is using Javascript to determine the operating system. I'm looking for a way to get my browser to report in Javascript that it is Windows or MacOS.

Do you know how to do it?

7
  • 2
    Check in dev tools -> settings -> overrides (works on my Chrome .. afaik chrome / chromium are almost the same) Nov 27, 2013 at 6:21
  • @Abhishek I checked it out, Chromium has the same set up.
    – Nil
    Nov 27, 2013 at 6:29
  • as you are looking at the source, can you share what, exactly, the code is checking to infer your OS? might be easier to get a spoof working
    – Hashbrown
    Nov 27, 2013 at 7:23
  • 1
    @Abhishek: Thanks for the suggestion. Unfortunately, that only allows the user agent string to be spoofed, which doesn't help in this case. Nov 27, 2013 at 7:58
  • @Hashbrown: Reading through the source, it appears to be using navigator.userAgent and grepping for linux. However, since I'm spoofing the user agent string, my navigator.userAgent is now Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 yet the site still knows somehow that I'm on Linux. Nov 27, 2013 at 8:04

1 Answer 1

1

It seems that the javascript is using navigator.userAgent to infer your OS yet you have tried changing the useragent string.

It may be a bug (not that one, since you're running v30), you should go here to test if it is or not. If so you may have to try an alternative to the inbuilt dev tools that hopefully tries something fancy to get the same effect.

2
  • It does appear to be using navigator.userAgent. However, it's clearly using something else in addition. I've verified multiple ways that my user agent string is in fact being changed, yet the problem persists. So, much as I'd like it to be so, changing the user agent isn't the answer--or at least isn't the complete answer. Nov 27, 2013 at 15:27
  • Flash or Java may be revealing somehow, though I don't know exactly how they would be doing it. It's also possible to infer your OS from your installed fonts.
    – LawrenceC
    Nov 27, 2013 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .