Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Help With Detecting OS Programmatically

Does anyone have any ideas on detecting whether a system is a Windows 10S system programmatically (Javascript/PHP/etc)? I have attempted to use javascript (navigator.useragent, and a few others), with no success.  
The problem comes into play that Windows 10S does not allow any application that is not in the MS App Store to be installed, so I cant just have a user run the program and have it report back, because it wont execute due to the MS restriction. Any ideas would be hugely appreciated.
I'll be damned if you manage to get a markup language (HTML) to detect an OS.

OT: See the below answer
PHP Code

<?php 
$user_agent 
= $_SERVER['HTTP_USER_AGENT'];

function 
getOS() { 
    global 
$user_agent;
    
$os_platform  = "Unknown OS Platform";
    
$os_array     = array(
                          
'/windows nt 10/i'      =>  'Windows 10',
                          
'/windows nt 6.3/i'     =>  'Windows 8.1',
                          
'/windows nt 6.2/i'     =>  'Windows 8',
                          
'/windows nt 6.1/i'     =>  'Windows 7',
                          
'/windows nt 6.0/i'     =>  'Windows Vista',
                          
'/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64',
                          
'/windows nt 5.1/i'     =>  'Windows XP',
                          
'/windows xp/i'         =>  'Windows XP',
                          
'/windows nt 5.0/i'     =>  'Windows 2000',
                          
'/windows me/i'         =>  'Windows ME',
                          
'/win98/i'              =>  'Windows 98',
                          
'/win95/i'              =>  'Windows 95',
                          
'/win16/i'              =>  'Windows 3.11',
                          
'/macintosh|mac os x/i' =>  'Mac OS X',
                          
'/mac_powerpc/i'        =>  'Mac OS 9',
                          
'/linux/i'              =>  'Linux',
                          
'/ubuntu/i'             =>  'Ubuntu',
                          
'/iphone/i'             =>  'iPhone',
                          
'/ipod/i'               =>  'iPod',
                          
'/ipad/i'               =>  'iPad',
                          
'/android/i'            =>  'Android',
                          
'/blackberry/i'         =>  'BlackBerry',
                          
'/webos/i'              =>  'Mobile'
                    
);

    foreach (
$os_array as $regex => $value)
        if (
preg_match($regex, $user_agent))
            
$os_platform = $value;
    return 
$os_platform;
} 
https://stackoverflow.com/questions/1807...ystem-info

Je t'aime
[Image: fpZ5a5g.png]

(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
Unfortunately the useragent Windows 10S sends up is identical to Windows 10. I am attempting to find a way to figure out which is which from a web instance.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Help] by hackishSep 10, 2024 07:33 AM 12 480 Sep 10, 2024 07:33 AM
Last Post: Yokobovich
[Help] by CantPackCubaApr 9, 2024 11:11 AM 5 176 Apr 9, 2024 11:11 AM
Last Post: PulseLink
[Help] by SIM-2362662Sep 14, 2020 04:30 AM 10 265 Sep 14, 2020 04:30 AM
Last Post: SIM-2362662