How to start multiple spider scanning requests in mulitple threads concurrently using Java API?

42 views
Skip to first unread message

hux...@gmail.com

unread,
Jan 30, 2015, 8:24:57 PM1/30/15
to zaproxy...@googlegroups.com
Hi, 

Provided ZAP serves as a daemon service, Java code was written to concurrently issue multiple spider crawling in different threads, each of which creates a new session using api.core.newSession(apiKey, <differentPath>, "False"); However, ClientApiException was thrown indicating Scan In Progress (scan_in_progress). Only the first thread finished the spider scanning while others got failed. My question is, is it possible now for ZAP to run several scanning simultaneously within multiple threads? If not, is there any work-around ?  Please advise. Thank you.

Exceptions stack trace as follows:

org.zaproxy.clientapi.core.ClientApiException: Scan In Progress (scan_in_progress)
at org.zaproxy.clientapi.core.ApiResponseFactory.getResponse(Unknown Source)
at org.zaproxy.clientapi.core.ClientApi.callApi(Unknown Source)
at org.zaproxy.clientapi.gen.Spider.scan(Spider.java:164)
at sogou.bizdev.aquarius.service.ZAPThread.scan(ZAPThread.java:154)
at sogou.bizdev.aquarius.service.ZAPThread.run(ZAPThread.java:217)
at java.lang.Thread.run(Unknown Source)

psiinon

unread,
Feb 2, 2015, 6:04:40 AM2/2/15
to zaproxy...@googlegroups.com
Yes, but you need to use the latest weekly release.

Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages