Hi, i am new working with ZAP.
I have done a Python script to initiate ZAP automatically in deamon mode, load my stored session and execute the attacks.
I am having some problems loading the session.
I have my session stored in the session folder under zap home directory with the name Project.session. My port is 8082.
In my script i am trying to load my session like this:
ZapHost = "
http://localhost:8082"
parameters = {"apikey": ZapAPIKey, "name": "Project.session"}
response = requests.get(str(ZapHost)+"/JSON/core/action/loadsession/", params=parameters).
When running the script i am getting the error:
Error: (<class 'requests.exceptions.ConnectionError'>, ConnectionError(MaxRetryError("HTTPConnectionPool(host='localhost', port=8082): Max retries exceeded with url: /JSON/core/action/loadsession/?apikey=XXXXXX&name=Project.session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa767401750>: Failed to establish a new connection: [Errno 111] Connection refused'))")), <traceback object at 0x7fa767400d80>).
Can you help me with this?