How can I find the names of all shared resources on a local network without knowing any of the machine names using C #?
How can I find all the shares on a local network without knowing any hostnames or domain names using C #? I have found all sorts of solutions if you know the name of the machine, but it won't be available to me. I want to get something similar to the one below:
// joescomp / public
// Beth / applications
// server / pdf
// server / public
This way it will show the name of the machine and the shared access to it.
Thank.
+3
source to share
1 answer
You can do this in a fairly simple way.
- Get current IP address and subnet network
- Scan the entire subnet, check each IP address for the ones it has . If you need you can convert IP to hostname , but you can just work with ip (in order to show, you can do reverse DNS check on these IP addresses)
- What is it: -)
+4
source to share