| | |
OS Detection Tool Like Nmap
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
you will have to look into the sockets API, you can either check if a port is open, then if it is assume that the corresponding service is ruinning on it. For instance if port 80 is open you could assume that http is running. The alternative to this is to attempt to figure out what protocal is running by analyzing the packets sent back from the server.
For UDP protocols you can only tell if a port is open if a. the server responds to a packet or b. the server sends a ICMP port unavailable when the UDP port is closed. ( since the TCP handshake does not happen with UDP ).
Anyhow, I don't know if this helps, But I hope it does
For UDP protocols you can only tell if a port is open if a. the server responds to a packet or b. the server sends a ICMP port unavailable when the UDP port is closed. ( since the TCP handshake does not happen with UDP ).
Anyhow, I don't know if this helps, But I hope it does
•
•
Join Date: Aug 2006
Posts: 137
Reputation:
Solved Threads: 11
I agree with Paul; Plus it seems like the easiest way (plus I'm not really sure of any other way to test if a port is open!). But what extra information would you want from the packet? There is certainly no field that specifies the OS. It's still a matter of what services are likely to run on a particular OS. So if you do analyse the packets, it's only to attempt to verify that indeed the service that you think should be running on port x is indeed that service.
You still need a database with port, service and OS records. Of course certain services run on both while others don't. But I do believe that that is the only way.
You still need a database with port, service and OS records. Of course certain services run on both while others don't. But I do believe that that is the only way.
Last edited by PoovenM; Jan 19th, 2008 at 6:23 am.
Some services will send version information when requested. This should allow one to determine the OS running on different machines. For instance RFC 2616 for HTTP describes the server response header
This may be used to find the operating system if it is listed in the header, Although there is no guarantee that it will be listed
•
•
•
•
The Server response-header field contains information about the software used by the origin server to handle the request. The field can contain multiple product tokens (section 3.8) and comments identifying the server and any significant subproducts. The product tokens are listed in order of their significance for identifying the application.
yes, but such information is not specified in any specific format.
It's usually a free format string of some length.
There's also no guarantee that the software sending the information is telling you the truth.
I've made use of that myself to trick firewalls to let information pass by making it look like it was coming from for example Apache or Sendmail, or reverse to get strict servers to accept packages by making them look like they were coming from Internet Explorer or Netscape.
It's usually a free format string of some length.
There's also no guarantee that the software sending the information is telling you the truth.
I've made use of that myself to trick firewalls to let information pass by making it look like it was coming from for example Apache or Sendmail, or reverse to get strict servers to accept packages by making them look like they were coming from Internet Explorer or Netscape.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
The header field does contain information related to the OS it gives user agent and os version but i want some extra information such as running process detail and its port no if it is possible through java or other java related technology. To get Header detail according to my knowledge client must request you. Is that true ? In my network i do have administrator permission and i want to check all my node's process status from a central server.
Last edited by shaikh_mshariq; Jan 20th, 2008 at 11:46 pm. Reason: More specific Detail
Since you obviously have no clue about what you're trying to accomplish using JNI (which you apparently also have no clue about how to use) to call a program written in C or C++ (which you apparently don't know) isn't going to solve anything.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Other Threads in the Java Forum
- Previous Thread: how to take computer name in linux
- Next Thread: please add my code.. about dec-->binary conversion
| Thread Tools | Search this Thread |
2dgraphics android api apple applet application arguments array arrays automation banking binary binarytree bluetooth capture chat chatprogramusingobjects class classes client code color component count database derby design eclipse eclipsedevelopment encryption error exception fractal game givemetehcodez graphics gridlayout gui html ide if_statement image input integer interface j2me java javadesktopapplications javaprojects jlabel jni jpanel julia keyword linux list loop macintosh map method methods midlethttpconnection mobile netbeans newbie nullpointerexception object os print printing problem producer program programming project projectideas read recursion reference replaysolutions ria scanner screen server set size sms sort sourcelabs sql stop string swing threads transforms tree ui unicode validation windows






