How to exclude all the urls other than the one mentioned as target url?

92 views
Skip to first unread message

Pooja K

unread,
Apr 9, 2021, 4:27:38 AM4/9/21
to OWASP ZAP User Group
Hello,
I am a newbie to use ZAP for selenium UI test integration.

Could someone please help on excluding urls other than the one being tested?
I tried using the method exclude 
api.ascan.excludeFromScan(regex)
But somehow it does not seem to work..
I tried the regex on the online builders no luck

Is there a way to exclude all except the one as target?
api.spider.scan(targetUrl,"5", "True", null, null);
api.ascan.scan(targetUrl, "True", "True", null, null, null)

Pardon if the questions seems too naive.

Thank you.

Simon Bennetts

unread,
Apr 9, 2021, 4:38:09 AM4/9/21
to OWASP ZAP User Group
Hiya,

Can you explain why you dont think excluding URLs from the active scan works?
Ideally giving (safe) examples of URLs and how you are driving ZAP via the API.
ZAP should only attack the URLs that you tell it to attack, so the most likely problem is that you are configuring ZAP incorrectly, but we cant tell that without more information.

Cheers,

Simon

Pooja K

unread,
Apr 9, 2021, 6:30:59 AM4/9/21
to OWASP ZAP User Group
Hello 
Thanks for the reply, please find the below snippet

target url :  https://www.catch.point.com/trans-data/event#change


So i am expecting only target url will be scanned and nothing else

I always get no seed error while spidering

Is there a possibility to get all the urls that are being excluded? The list of urls may be?

Pooja K

unread,
Apr 9, 2021, 6:38:23 AM4/9/21
to OWASP ZAP User Group
Reply all
Reply to author
Forward
0 new messages