threading a thread

tubby tubby at bandaheart.com
Tue Feb 27 16:40:46 EST 2007


Bjoern Schliessmann wrote:
> tubby wrote:
>> Right now I'm just prototyping and the threaded hosts portion
>> works very well for my needs. I'd just like to add a threaded
>> ports check and wanted to know if anyone had done something
>> similar in Python.
> 
> Taken the vast amount of threads you'll need, there will be a big
> overhead. Using a different means of concurrency is advisable.
> 
> BTW, why not use nmap?

Have you tried it? Nmap is sequential. It takes about 5 hours to do web 
server checks (port 80 only) on a class B network... I think it does 
ports in parallel, but not hosts. Even when you use the insane time 
setting the wait is untimely.

I can do the same thing in roughly 15 minutes with Python or Ruby using 
threads. Granted, Nmap is much more configurable and flexible, but it 
simply does not scale to address large networks...nessus is the same way.

Also remember that we're dealing with IPv4 networks now. How will we 
deal with larger IPv6 address spaces. Besides clustering and distributed 
processing (mapreduce), it seems that threads may help deal with some of 
the scaling issues I face right now.



More information about the Python-list mailing list