I'm running Ubuntu 8.04 and I recently received the following error when visiting a website:
Please return to www.site.com with a computer running Windows 98, 2000, Me, NT, or XP.
How does the website know which OS I'm running? Is it only via javascript or is there OS information in the request headers as well?
Is there a way for me to bypass this check or "pretend" to be using Windows so that I can access the website even though I'm running an unsupported OS?
Can I Imitate Another Browser/Platform?
There are many ways to spoof user agent strings. In firefox, there happens to be an extension called "User Agent Switcher," which allows you to imitate other browsers.
https://addons.mozilla.org/en-US/firefox/addon/59
User Agents
Checking the user-agent often times can tell you this. For instance, my user-agent is:
Which platform am I on?
Javascript Option
You can also use the
navigator
object in Javascript to get some information too. For instance:PHP Options
You can get the user-agent in PHP from the $_SERVER array:
PHP also has further goodies, such as the
get_browser()
* function in PHP which returns an array of information, including theplatform
:*
get_browser()
relies upon browscap.ini - Seehttp://www.php.net...php#ini.browscap for more information.
The server-side script will present information to the web browser which indicates the user's browser type and version as well as operating system. For example, in PHP you have get_browser()
Opera browser has a facility to Spoof and can present itself as another browser type to avoid browser blocking.
Here is the full code. Might help someone, it detects which OS user is using and version, but it doesnt go that deep in versions such as Window 7 home/professional/ultimate etc, that one is way more complex.
It may be guessing from the User-Agent string.
That info goes in the
User-Agent
HTTP header each time you make a request to any server.Check this link for more info in
User-Agent
spoofing using firefox.The User Agent Switcher firefox add-on enables "spoofing" of a different web browser.