giving input file for ZAP Script

41 views
Skip to first unread message

KHUSHBOO KUMARI

unread,
Mar 23, 2021, 2:46:15 AM3/23/21
to OWASP ZAP Scripts
Hi all,
I explored cmd guideline but could not way to give input file to ZAP script using cmd which contain value for some variables. One possibility seems that keep the file in some directory, provide that directory in -dir using cmd and load that file in script. Is there any better way to do that for deployment if I want to make changes in code's variable dynamically using some file?

thc...@gmail.com

unread,
Mar 23, 2021, 3:09:15 AM3/23/21
to zaproxy...@googlegroups.com
Hi.

You could read the file path from an env var. If you want to use the
command line, the easiest is to use the -config (set the key as
something unique, you can then read it from the main configuration).

Best regards.

On 23/03/2021 06:46, KHUSHBOO KUMARI wrote:
> Hi all,
> I explored cmd guideline but could not way to give input file to ZAP script
> using cmd which contain value for some variables. One possibility seems
> that keep the file in some directory, provide that directory in -dir using
> cmd and load that file in script. *Is there any better way to do that for
> deployment if I want to make changes in code's variable dynamically using
> some file*?
>

KHUSHBOO KUMARI

unread,
Mar 23, 2021, 4:17:14 AM3/23/21
to OWASP ZAP Scripts
Hi @thc202, Would you please give an example like if I have variable "target" in my javascript proxy script and I want to set it as 100 using cmd config? My idea to do this is to create new tag in config.xml (no idea at which level) then I will load config.xml file and access variable from there. Am I correct? 
Reply all
Reply to author
Forward
0 new messages