Then to use that in daemon mode:
You can set anything in the config.xml file via the -config command line option.
So if you want you can specify the directory (and therefore saved config.xml file) but also enable specific passive scan rules.
To work out what values to use see this FAQ: https://github.com/zaproxy/zaproxy/wiki/FAQconfigValues
Does that do what you want?
Cheers,
Simon
Yes give me a close idea of what is going on. But I have a open question.
By default the directory used for ZAP is ~/.ZAP. If I look at the config.xml file there after I set all the passive scans to OFF looks like this:
Shouldn't the ZAP daemon by default use this config.xml file as well and have then the Pscans disabled?
Alternatively can I do -config org.zaproxy.extension.pscan.scanner.ScriptsPassiveScanner.enabled=false ?
/opt/ZAP_2.4.3/zap.sh -daemon -host localhost -port 8500 -config api.key=ZAPROXY-PLUGIN -config scanner.defaultPolicy=InjectionPolicy.policy