How to check the webcam?

I am running Ubuntu 8.04, and recently I received the following error while visiting a website:

Please return to www.site.com with a computer running Windows 98, 2000, Me, NT, or XP.

  • How does a website know which OS I'm running? Is it only through javascript or is there information about the OS in the request headers?

  • Is there a way around this check or “pretend” to use Windows so that I can access the website even if I run an unsupported OS?

+5
source share
7 answers

User Agent Switcher Firefox adds the ability to "spoof" another web browser.

0

/?

. firefox , "User Agent Switcher", .

https://addons.mozilla.org/en-US/firefox/addon/59

, . , :

Mozilla/5.0 (Windows, U, Windows NT 6.0, en-US) AppleWebKit/532.0 (KHTML, , Gecko) Chrome/3.0.195.38 Safari/532.0

?

Javascript

navigator Javascript, . :

alert(navigator.platform);  // alerts Win32
alert(navigator.userAgent); // Mozilla/5.0 (Windows; U; Windows NT 6.0...

PHP

PHP $_SERVER:

print $_SERVER["HTTP_USER_AGENT"]; // Mozilla/5.0 (Windows; U; Windows NT...

PHP , get_browser() * PHP, , platform:

Array
(
    ...
    [parent] => Firefox 0.9
    [platform] => WinXP
    [browser] => Firefox
    [version] => 0.9
    ...
)

* get_browser() .ini - .
http://www.php.net...php # ini.browscap .

+8

- , ? javascript ?

User-Agent HTTP- , .

"" Windows, -, ?

User-Agent spoofing firefox.

+5

navigator.platform JavaScript:

var OS = navigator.platform;
alert(OS);

, .

+3

User-Agent.

+1

script -, , . , PHP get_browser()

Opera Spoof , .

+1

Here is the complete code. It can help someone, it discovers which OS user is using the version, but it is not so deep in versions like Window 7 home / professional / ultimate etc. That one of them is more complicated.

//OS DETECTION... 
function find_os(){ 
var OSVer=""; 
if (navigator.userAgent.indexOf("Mac OS X 10.4")!=-1) OSVer="MacOS Tiger"; 
if (navigator.userAgent.indexOf("Mac OS X 10.5")!=-1) OSVer="MacOS Leopard"; 
if (navigator.userAgent.indexOf("Mac OS X 10.6")!=-1) OSVer="MacOS Snow Leopard"; 
if (navigator.userAgent.indexOf("NT 5.1")!=-1) OSVer="Windows XP"; 
if (navigator.userAgent.indexOf("NT 6.0")!=-1) OSVer="Windows Vista"; 
if (navigator.userAgent.indexOf("NT 6.1")!=-1) OSVer="Windows 7"; 
if (navigator.userAgent.indexOf("Linux")!=-1) OSVer="Linux"; 
if (navigator.userAgent.indexOf("X11")!=-1) OSVer="UNIX"; 

returh OSVer; 
}
0
source

All Articles