How to detect remote OS-VBForums
Results 1 to 4 of 4

Thread: How to detect remote OS

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002

    Red face How to detect remote OS

    hi all,

    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.

    Pradip Adhikari

  2. #2
    Join Date
    Oct 2002
    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
    End Type

    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!!!

  3. #3
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    the Netherlands
    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.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2002

    Red face remote os detection

    hi Frans

    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 me.

    Pradip Adhikari

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width