in reply to Scanning for windows shares

Sometimes the answer is an obvious one. Try net view \\<SERVERNAME> in a DOS box, assuming you have some NT permissions already on this box.

Replies are listed 'Best First'.
Re: Re: Scanning for windows shares
by Rex(Wrecks) (Curate) on Jun 23, 2003 at 22:58 UTC
    This is not that good of a solution because you will still need some way to enumerate all the Windows type (meaning including Samba) machines on the network.

    Check out the resource above, and the rest of Dave Roth's site. There should be something there.

    Figuring out how to query a browse master might also get you some good results too.

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
Re: Re: Scanning for windows shares
by aquarium (Curate) on Jun 24, 2003 at 08:50 UTC
    from command prompt (win32) NET VIEW /WORKGROUP:wkgrpname
    where wkgrpname is the workgroup name you want to see computer names on. then do NET VIEW \\computername or NET VIEW \\ip_address to view shares on particular machines. This will come back with an error if a computer doesn't have sharing turned on. If it is sharing, but no shares, it will still come back with IPC share and some other info. Of course, from perl, just put the commands in backticks, assigning return value to variables, like so $return_val = `NET VIEW \\BOBs_PC`; if ($return_val)...etc.
    you can even view domains: NET VIEW \DOMAIN:domainname