...

View Full Version : Need Sun Solaris platform sniffer



markkanning
11-09-2006, 09:43 PM
Hey ya'll,
I'm looking for a web sniffer that detects someone coming in from a Sun Solaris platform. There are billyonz of sniffers for Mac/Windows/Linux, but we've got a client on Sun with specific needs. Does anyone have a solution?

Thanks,
Mark

VortexCortex
11-10-2006, 09:03 PM
Try:


if(navigator.userAgent.test(/solaris/i))alert('Solaris Detected');


you could also use the navigator.platform property, but I'm not sure what string solaris would return. My guess would be "Solaris" or "Sun Solaris" (which are the platform strings usually found in the userAgent string...)

felgall
11-11-2006, 04:09 AM
Javascript has no reliable way of identifying any operating system whatsoever as it has to rely on what the browser tells it and the browser may not recognise the operating system or may have been configured to lie (it is after all a user configurable field so if I want my browser to report my operating system as "pink polkadot" then that is what the browser identifies my operating system as.

JScript can at least identify that the browser is some version of Internet Explorer and that the platform is some version of Windows because that is the only client side environment that runs JScript in place of Javascript.

ArcticFox
11-11-2006, 07:20 AM
Well show us an example, there, Spanky...

liorean
11-11-2006, 10:58 AM
navigator.platform may contain one of the values "Sun", "SunOS", "Solaris", or unfortunately, "Unix" or "X11" or "Java" in any capitalisation as a sign of a Solaris system. Same goes for navigator.userAgent.

Not all browsers, nor all setttings, nor all proxies, will allow any of this to actually reach the web server, so JavaScript is about as reliable as server side methods at detecting this. Which doesn't mean much...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum