zaproxy / zaproxy

The ZAP by Checkmarx Core project
https://www.zaproxy.org
Apache License 2.0
12.72k stars 2.27k forks source link

ScanningProxy IO Exception #1983

Closed HSDen closed 9 years ago

HSDen commented 9 years ago

Hi,

I am currently facing two issues.

Unable to start a new session by using zapScanner.clear() provided in the example. Code is working only when ZAP is launched on desktop and a new session is manually initiated. Also, API key value needs to be passed from Zap-Preferences--> API as input to the zapScanner = new ZAProxyScanner(ZAP_PROXYHOST,ZAP_PROXYPORT,ZAP_APIKEY);

Else, scanWithZap(); kind of functions are throwing IO exception.

Can some help be provided on how to get the new session initiated and is there a way to retrieve the API key once the session has been initialized, pls.

thc202 commented 9 years ago

FAQ contains instructions on how to set (or even disable) the API key through the command line: https://github.com/zaproxy/zaproxy/wiki/FAQapikey

The IO exceptions are most likely related to missing/wrong API key. I guess the clear() method is failing because of the same issue.

Which version of ZAP are you using? And zap-java-api?

HSDen commented 9 years ago

Yes, i got the issue resolved. Thanks

thc202 commented 9 years ago

Thanks for letting us know.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.