Collecting IP range

yawgmoth7 yawgmoth7 at
Mon Jan 30 20:10:38 EST 2006

Hello, I'm sure that this has been discussed before, but I have a
question. I have written a few port scanners, banner grabbers in the
past and have never found a good way to get a range of IP's.
Obviously, in my opinion the best and simplest way to do somethign
like and simple port scanner is to do something like:

for ips in range(startip,endip):
     <do blah>

Well, since range() won't take a normal IP(Such as and,
you can't take it as 127001(Since socket.connect() won't take that).
What would you suggest as a better way to approach this?

Thanks for all your help.
Gurus'Network - Are you a guru?

More information about the Python-list mailing list