1

Any idea how to get the OS version of a terminal in my local network with java. i heard that UPNP can do that but i have no idea how to use it and if there is a good implementation in java.

PS: i can not use SNMP because im not sure that is activated in the target terminal.

imanis_tn
  • 1,150
  • 1
  • 12
  • 33

2 Answers2

1

http://nmap4j.sourceforge.net - is a Java API that wraps Nmap.

Jon
  • 277
  • 2
  • 12
  • Not exactly but thanks for the answer. I'm searching for re-inventing NMap's fingerprint OS detection as pure Java, or any other solution that make me to have an approximate detection of the OS version. – imanis_tn Apr 20 '12 at 19:21
  • You're welcome. I think it will be challenging to find a pure Java implementation for OS fingerprinting. As I understand it, to do this you have to send certain types of raw packets. To do this you need OS specific APIs and root access to the machine. Nmap's support of OS fingerprinting is pretty good and has many supporters. Plus Nmap is maintained very well, they make a number of releases every year and do a lot of bug fixing. I've always found their community of users and developers to be very helpful. – Jon Apr 23 '12 at 14:10
0

You can use nmap with -O option, it does not require any client running on the terminal and the accuracy is almost perfect.

raz3r
  • 3,071
  • 8
  • 44
  • 66
  • so i have to use the ugly way **exec()** function. which need a nmap installed in my terminal, and its not safe to use when it have a problem with the anti virus and its not legal. – imanis_tn Mar 29 '12 at 11:28
  • Actually there is nothing illegal with Nmap if you use it in your own network. Anyway you will need to install Nmap only on the machine that runs your script. Perhaps you can find some Java API that avoids the use of exec. – raz3r Mar 29 '12 at 12:03
  • OK i will search for the API if exist. – imanis_tn Mar 29 '12 at 12:32