from shutil import copy2, copytree
import os.path
dev_path = '/home/zap/.ZAP_D'
rel_path = '/home/zap/.ZAP'
def zap_started(zap, target):
zap.importurls.importurls('/zap/wrk/hooks/allURLs.txt')
def zap_pre_shutdown(zap):
zap.core.save_session("app")
def pre_exit(fail_count, warn_count, pass_count):
dir = rel_path
if os.path.exists(dev_path + '/session'):
dir = dev_path
copytree(dir + '/session', '/zap/wrk/session')
copy2(dir + '/zap.log', '/zap/wrk')
- untitled1.data
- untitled1.properties
- untitled1.script
- app.session
- app.session.data
- app.session.lck
- app.session.log
- app.session.properties
- app.session.script
The "untitled1." files have the same size like the "app." files.
If I open now the app.session with zap it shows the full site tree, alerts and the requests which caused these alerts.
I also tried using the "-newsession <path>" command instead, which created the following files:
- app.session
- app.session.data
- app.session.log
- app.session.properties
- app.session.script
If I open this session file I still don't see any informations. Neither the site tree nor any alerts are displayed, though the size of the files seem to be fine.
Anyways, it works for me now.
Thanks for your help!
Best regards.