Apr 16th, 2003, 07:17 AM
How to detect remote OS
can anybody tell me how to detect the sperating system (OS) of a remote pc? i have the ip address, mac address & name of the remote pc. and they r not in my domain i can only ping them.
Apr 16th, 2003, 07:51 AM
You can call the netserverenum api and pass it the constant
Private Declare Function NetServerEnum Lib "netapi32" _
(ByVal servername As Long, _
ByVal level As Long, _
buf As Any, _
ByVal prefmaxlen As Long, _
entriesRead As Long, _
totalentries As Long, _
ByVal servertype As Long, _
ByVal domain As Long, _
resume_handle As Long) As Long
Private Const SV_TYPE_ALL As Long = &HFFFFFFFF
doing so will show all hosts maintained by the master browser and fill the following type
Private Type SERVER_INFO_101
sv101_platform_id As Long
sv101_name As Long
sv101_version_major As Long
sv101_version_minor As Long
sv101_type As Long
sv101_comment As Long
the platform id will give you the os name and the version major and minor will give you the specific version.
You will need to have a trust relationship with the domain you are querying though(only a theory).
I haven't tried using this for external addresses but it may work
Give it a try anyway
The problem with making something idiot proof is that sooner or later somebody just invents a better idiot!!!
Apr 16th, 2003, 08:07 AM
netserverenum can only be used in your domain (maybe it works with a trusted domain as well), but not with just an IP address.
I don't think it is possible without running some kind of app on the remote pc. There might be some security holes in software running on the remote pc that can be exploited, but I can not help you with this.
Apr 16th, 2003, 11:41 PM
remote os detection
yes u r right i thing we can detect remote os by detecting tcp/ip fingerprint, but i don't know how to do that. if u have any idea pls.help me.
Click Here to Expand Forum to Full Width