using the command line option automation framework windows

227 views
Skip to first unread message

Edvin Eriksson

unread,
Feb 16, 2022, 11:53:30 AM2/16/22
to OWASP ZAP User Group
Hi,

Thanks for all the help earlier fixing my ajax spider. 

Now we want to use the command line option for running our yaml-file that we created. But in the example on the web page it seems that this is adapted for linux or max since it is a .sh file:

./zap.sh -cmd -autorun config.yaml

How should we run it from windows?

We have tried installing the windows subsystem linux but when running the zap.sh file we get this error:

Exiting: ZAP requires a minimum of Java 8 to run, found
zap.sh: line 54: [: -ge: unary operator expected

And I know that we have Java 8 installed on the machine. So my question is if there is another way to run it on windows rather than running the bash script. 

Cheers,
Edvin

Simon Bennetts

unread,
Feb 16, 2022, 11:58:29 AM2/16/22
to OWASP ZAP User Group
Hiya Edvin,

We have a FAQ for that :)

Cheers,

Simon

Edvin Eriksson

unread,
Feb 17, 2022, 3:26:44 AM2/17/22
to OWASP ZAP User Group
Ah of course.. Thanks :)

However, now I get the errror with loading the yaml file that I was describing before. Here is the error from the log:

022-02-17 09:20:12,703 [main ] ERROR CommandLine - Unexpected error accessing file C:\Program Files\OWASP\Zed Attack Proxy\active_scan_spider_ajax.yaml : java.nio.charset.MalformedInputException: Input length = 1 - see log for details
2022-02-17 09:20:12,703 [main ] ERROR CommandLineBootstrap - null
java.lang.NullPointerException: null
        at org.zaproxy.addon.automation.ExtensionAutomation.execute(ExtensionAutomation.java:518) ~[?:?]
        at org.parosproxy.paros.extension.ExtensionLoader.runCommandLine(ExtensionLoader.java:557) ~[zap-2.11.1.jar:2.11.1]
        at org.parosproxy.paros.control.Control.runCommandLine(Control.java:425) ~[zap-2.11.1.jar:2.11.1]
        at org.zaproxy.zap.CommandLineBootstrap.start(CommandLineBootstrap.java:85) [zap-2.11.1.jar:2.11.1]
        at org.zaproxy.zap.ZAP.main(ZAP.java:131) [zap-2.11.1.jar:2.11.1]

Any suggestion on what the issue is here?

Cheers,
Edvin

Edvin Eriksson

unread,
Feb 17, 2022, 4:04:18 AM2/17/22
to OWASP ZAP User Group
Ok, think I found the issue. Encoding as always, pesky Swedish characters.

Well its resolved now. Thanks for the help. 

Cheers,
Edvin

Simon Bennetts

unread,
Feb 17, 2022, 5:21:47 AM2/17/22
to OWASP ZAP User Group
Thanks for letting us know!
Reply all
Reply to author
Forward
0 new messages