Questions tagged [os-detection]

Detecting the operating system that a program is running or being compiled on.

26 questions
2
votes
2 answers

Show or Hide Div based on OS

I operate a website in which I would like to be able to advertise an downloadable program for windows only. The advert for this will lie inside a div called 'adforwindows'. I would like to use a detection method similar to the one listed here:…
JBithell
  • 627
  • 2
  • 11
  • 27
1
vote
2 answers

Where does the OS take the value for $OSTYPE

I have a legacy script that depends on the value of $OSTYPE variable. What this script expects is that on Solaris the value is "SunOS" while on AIX it is "AIX". For Linux it checks the variable against the regex where the uppercased value starts…
Dmitry Kuzminov
  • 6,180
  • 6
  • 18
  • 40
1
vote
0 answers

snort rules for OS detection

i need to write snort rules for OS detection (Nmap) following packets: ICMP echo (IE) The IE test involves sending two ICMP echo request packets to the target. The first one has the IP DF bit set, a type-of-service (TOS) byte value of zero, a code…
crtrn
  • 31
  • 3
1
vote
1 answer

How to detect Mac OS X version using C preprocessor?

I want my C code to be compiled successfully on different versions of Mac OS X. One problem I have is before OS X Yosemite I need to #include to make lapack work. However, vecLib can't be founded on later versions. How can I…
1
vote
1 answer

OS detection to display different links on WordPress page

I would like for my WordPress post link to refer people to different pages depending on the OS that they are using. For example to download Mac version of software if they are browsing from MacOS. I saw a tutorial on how to add user OS in…
1
vote
2 answers

remote OS detection in python

I want to implement an OS detection using python (like nmap), I find python-nmap-0.3.4.tar.gz library, but it didn't provide Operating system in response! How can I change it to achieve my goal. EDIT: in the site sample: >>> import nmap >>> nm =…
user3813088
  • 85
  • 1
  • 2
  • 7
0
votes
0 answers

How can I detect IOS version with server code at cshtml?

My question is about detecting ios version from server-side. Based on ios version , I will change content at cshtml. I want to check if the version is greater or equal to ios13. Pseudo code is like this var isIphone = .... var iosversion =…
Ozmen
  • 129
  • 3
  • 10
0
votes
0 answers

How to detect Windows 10 Anniversary Update on website?

I'd like to detect if a website visitor has the Windows 10 Anniversary Update installed. If so I want to offer a link to the app store, if not I'd like to offer a link to my legacy app install package. How can I do that?
kcode
  • 1,220
  • 1
  • 18
  • 34
0
votes
2 answers

JavaScript to detect OS in Chrome Version 37.0.2062.94

I'm developing one-page apps. The shortcut should vary from different OSs, especially Mac OS X. Others usually combine keystroke with Ctrl, but Mac combins with Cmd. Until now, I tried to detect whether the OS is mac or not by this code: var bMac =…
ntalbs
  • 28,700
  • 8
  • 66
  • 83
-1
votes
1 answer

how to detect MacOS Sierra version in plain javascript

I need to detect MacOS Sierra and its version number using plain javascript. Please help me out with a code snippet.
lpradhap
  • 623
  • 6
  • 17
-1
votes
1 answer

How to guess the most likely OS and interpret it when using nmap

I am using nmap -O and have the result…
user2804038
  • 1,093
  • 3
  • 15
  • 17
1
2