Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy all ZAP logs in export_session.py scan hook #414

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion other/scan-hooks/export_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from shutil import copy2, copytree
import os.path
import glob

# This assumes that you are running as zap - if you run as root change to use /root/.ZAP(_D)
dev_path = '/home/zap/.ZAP_D'
Expand All @@ -14,4 +15,5 @@ def pre_exit(fail_count, warn_count, pass_count):
if os.path.exists(dev_path + '/session'):
dir = dev_path
copytree(dir + '/session', '/zap/wrk/session')
copy2(dir + '/zap.log', '/zap/wrk')
for zap_file in glob.iglob(dir + '/zap.log*'):
copy2(zap_file, '/zap/wrk')