Python

Moderators: None (Apply to moderate this forum)
Number of threads: 473
Number of posts: 1172

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Gathering Hostnames Posted by SOLion on 19 Dec 2002 at 5:58 AM
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)) + "\t\t 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.
--------------------------------------------
SOL



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.