Server/Service Enumeration in C#
-
I have a simple question with no doubt a complex answer. What I am trying to achieve is to check LAN for machines (mostly Workstations but could be windows xxxx Servers among them and find which ones are running a particular Service. Is there a relatively easy way of doing this? What sort of security measures could get in the way? The service I'll be searching for will does export a remoting interface. Any pointers would be greatly appreciated.
Happy programming!!
-
I have a simple question with no doubt a complex answer. What I am trying to achieve is to check LAN for machines (mostly Workstations but could be windows xxxx Servers among them and find which ones are running a particular Service. Is there a relatively easy way of doing this? What sort of security measures could get in the way? The service I'll be searching for will does export a remoting interface. Any pointers would be greatly appreciated.
Happy programming!!
One way could be using
[DllImport("MPR.dll")] public static extern UInt32 WNetEnumResource(IntPtr hEnum, ref Int32 lpcCount, IntPtr lpBuffer, ref UInt32 lpBufferSize);
Some code example[^]SkyWalker