zaproxy / community-scripts

A collection of ZAP scripts and tips provided by the community - pull requests very welcome!
Apache License 2.0
761 stars 235 forks source link

export_site-tree_URLs.js #450

Open a6k8s4 opened 1 month ago

a6k8s4 commented 1 month ago

This script can export all the Spidered/Scanned URLs from the site tree for a web-application/site while automation job is on the go. The script can work on both GUI & CLI with integration with ZAP automation framework addon.

psiinon commented 1 month ago

I'm confused - why use the API when you can access everything directly? See https://github.com/zaproxy/community-scripts/blob/main/standalone/Traverse%20sites%20tree.js

a6k8s4 commented 1 month ago

I'm confused - why use the API when you can access everything directly? See https://github.com/zaproxy/community-scripts/blob/main/standalone/Traverse%20sites%20tree.js

Hi Simon, the purpose of using ZAP API is , the format of output data are the better than the traverse sites tree script. The format is better one for logging as per the necessity. This is pretty helpful while the automation job is running from CLI. For example. image

thc202 commented 1 month ago

You can output any way you want while traversing the tree directly.

thc202 commented 1 month ago

Could you update the script to use the tree directly?

a6k8s4 commented 1 month ago

Could you update the script to use the tree directly?

Sure.. I will update. Right now I am using the API for getting the desired result..