Collecting IP range

David Murmann david.murmann at
Tue Jan 31 05:33:06 CET 2006

yawgmoth7 schrieb:
> 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:
> <code>
> for ips in range(startip,endip):
>      <do blah>

you might want to take a look at IPy:

iterating over ip-address ranges is very easy there:

      >>> ip = IP('')
      >>> for x in ip:
      ...  print x


More information about the Python-list mailing list