Collecting IP range

yawgmoth7 yawgmoth7 at gmail.com
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:

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

Well, since range() won't take a normal IP(Such as 127.0.0.1). 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.
----------------------------
gurusnetwork.org
Gurus'Network - Are you a guru?

http://www.12dailypro.com/?ref=288444



More information about the Python-list mailing list