Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 14th, 2004, 9:02 AM   #1
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Is there any way to find out what OS someone's using (Windows, Linux, FreeBSD, Mac OS etc.), and which version?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 14th, 2004, 11:26 AM   #2
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
You'd probably have to look up OS fingerprinting, but I have no idea how it works, so I can't help you there. Sorry.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Old Nov 14th, 2004, 4:37 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I meant the local OS - the OS the app is being run from. As far as I know, fingerprinting is finding out what OS is running on a remote computer by determining characteristics.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 14th, 2004, 7:11 PM   #4
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
OS fingerprinting attempts to find a user's OS remotely (or even over a local network, or computer) by probing open TCP ports and determining characteristics on the ports available and not available as well as the data the available ports return pertaining to specific operating systems.

What your looking for you would think to be easier, however the problem stands that every operating system really has their own way of recording that information. Where do you plan on attempting to epxtrapolate this information? Trying to detmine an OS from a browser with Javascript is much more different than doing so from a command line.
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Nov 15th, 2004, 12:15 AM   #5
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
This is a one-liner in PHP. Any reason you are using C++?:
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Nov 15th, 2004, 4:02 AM   #6
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 6 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
it could be a desktoip application? make sure whoever is running the program is using the correct operating system to run it with? as i make it so you dont run a win xp appication on a win 98 system as the libraries are different?
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity."

- Albert Einstein
Berto is offline   Reply With Quote
Old Nov 15th, 2004, 11:01 AM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Bingo. I also want to use function pointers or virtual functions (not sure which) to sort out which function should be used for each OS, effectively making it cross-compatible. Isn't there a #define I can test? I think there's one called _WIN32, but I have no idea about Linux. I know I can call system("ver > file") and then read the file - can I do that on Unix too?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 15th, 2004, 4:16 PM   #8
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
As far as linux/windows goes you pretty much know where it is being ran from (unless wine is involed, or something of the sort) by what you compiled it with. As for windows i would say check the registry under HKEY_CURRENT_VER (i am NOT a windows programmer, so please forgive me if i am talking out of my ass) or something like that and look up registry values with the functions defined in #include <windows.h>, as for linux... hmm... good question.
__________________

tempest is offline   Reply With Quote
Old Nov 15th, 2004, 5:31 PM   #9
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I'll probably use ver on Windows - much simpler. I just want to know how to detect whether I'm using Linux so I can sort out which #includes to... include, I suppose.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 15th, 2004, 6:16 PM   #10
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
#includes are done at compile! And compilation isnt cross-platform. That means that you cant decide just which includes you want to execute, because they are simply code thats added to your program when it is "made".
__________________

tempest is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:10 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC