LoadSession problem

24 views
Skip to first unread message

Miguel

unread,
Apr 19, 2024, 12:05:33 PMApr 19
to ZAP Developer Group
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?

psiinon

unread,
Apr 19, 2024, 12:08:41 PMApr 19
to ZAP Developer Group
This group is for questions related to developing ZAP.
Please use the User Group for support: https://groups.google.com/group/zaproxy-users
Reply all
Reply to author
Forward
0 new messages