IonicWind Software

IWBasic => The Roundtable => Topic started by: Brian on May 22, 2018, 09:55:57 AM

Title: Enumerating PCs
Post by: Brian on May 22, 2018, 09:55:57 AM
Hi,

I wrote this years ago to enumerate PCs on our 200-plus network. Came in handy at times. I have just realised it didn't include Windows 10 when enumerating. Some of the code is not mine, so whoever - thanks

It will enumerate your local PC, and if it is on a network, scans round the network. It returns the IP address and Windows versions, mainly, although I suppose more could be added

Brian
Title: Re: Enumerating PCs
Post by: LarryMc on May 22, 2018, 11:12:47 AM
got error - missing "udp.inc"

Title: Re: Enumerating PCs
Post by: Brian on May 22, 2018, 11:15:06 AM
Here we go!

The udp.inc comes up with an error about a missing RETURN, but appears to work OK. Can't find where it should be, though

Brian
Title: Re: Enumerating PCs
Post by: billhsln on May 22, 2018, 11:34:48 AM
Found the missing return.  Change:

Sub UDP_ResolveIP(name as string),string
   'get an ip address from a host name
   POINTER he
   he = gethostbyname(name)
   if he<>NULL
      return inet_ntoa(*<HostEnt>he.*<POINTER>*<POINTER>addrlist)
   EndIf
   return "Unknown"
EndSub


Bill
Title: Re: Enumerating PCs
Post by: Brian on May 22, 2018, 11:35:51 AM
Good man!

Updated udp.inc attached