Gathering Hostnames

Hi all,

I am messing around with the python socket package at the moment. I wrote this very simple script to display the hostnames of all computers in a certain subnet.

count = 12
while count < 255:
print getfqdn("10.20.195." + str(count)) + " is active"
count = count + 1

The problem is it slows down once it hits unallocated IP addresses. How can I check that a static ip is allocated first?

Cheers in advance for your help.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!