Re: [W3af-users] w3af and multiprocessing
Status: Beta
Brought to you by:
andresriancho
From: Sergey <w3...@ko...> - 2015-01-19 12:36:03
|
On 19.01.2015 15:12, Andres Riancho wrote: > Sergey, > > On Mon, Jan 19, 2015 at 8:12 AM, Sergey <w3...@ko...> wrote: >> Hi, everyone. >> >> I'm trying to execute w3af scans of multiple domains in parallel with >> multiprocessing package http://pastebin.com/ha2K4NCP >> >> This script fails with AssertionError: No calls to SQLiteDBMS can be >> made after stop(). >> http://pastebin.com/G7vS63TG > > There are parts of w3af which are run at module import (things such as > the default database singleton), so you might want to move the line > "from w3af.core.controllers.w3afCore import w3afCore" inside the > multiprocessing target function Thank you, Andres. Your solution works just fine. >> If I switch to multiprocessing.dummy (threads), script seems to work. > > Yes, that's because that uses threads, which share the same singleton > >> But I want to execute scans in isolation, that's why I'm trying to use >> processes not threads. >> >> Is there some issue which prevents such usage of w3af library? >> >> And btw why does w3af forbid scanning of multiple domains? "You >> specified more than one target domain: ... And w3af can only scan one >> target domain at a time." > > Yes, this is an architectural decision. If you want to discuss this in > depth, have good reasons and want to spend time with a pull-request, I > might be open to accepting/merging it. I think I don't know w3af code good enough to make such proposals yet. |