From 1830f4b792a6841a2e7c3395cfd248482c397626 Mon Sep 17 00:00:00 2001 From: midwestKC-coder <97243819+midwestKC-coder@users.noreply.github.com> Date: Sat, 18 Nov 2023 21:21:22 -0600 Subject: [PATCH 1/3] Update export_session.py Zap rotates log files which results in multiple log files. Updated code to copy all of the log files. Signed-off-by: midwestKC-coder <97243819+midwestKC-coder@users.noreply.github.com> --- other/scan-hooks/export_session.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/other/scan-hooks/export_session.py b/other/scan-hooks/export_session.py index fa62d826..42c6422b 100644 --- a/other/scan-hooks/export_session.py +++ b/other/scan-hooks/export_session.py @@ -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' @@ -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') From bbf9cdc8a91ae62c3ccaff64685d858d7fdab8fc Mon Sep 17 00:00:00 2001 From: midwestKC-coder <97243819+midwestKC-coder@users.noreply.github.com> Date: Sat, 18 Nov 2023 21:24:26 -0600 Subject: [PATCH 2/3] Update CHANGELOG.md Signed-off-by: midwestKC-coder <97243819+midwestKC-coder@users.noreply.github.com> --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f18680a..dbb087ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Rename AWS signing script. - Update descriptions/comments in scripts. - standalone/Open Fortune 500 websites in a browser.zst - Fix typo in `http://www,pbfenergy.com` +- Update export_session script to copy multiple zap files created during log file rotation ## [17] - 2023-06-28 ### Added From 6e247dd59d6d4430e47bc18fabce30321f1bb307 Mon Sep 17 00:00:00 2001 From: midwestKC-coder <97243819+midwestKC-coder@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:33:06 -0600 Subject: [PATCH 3/3] Update CHANGELOG.md Removed un-needed line from change log Signed-off-by: midwestKC-coder <97243819+midwestKC-coder@users.noreply.github.com> --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbb087ed..0f18680a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Rename AWS signing script. - Update descriptions/comments in scripts. - standalone/Open Fortune 500 websites in a browser.zst - Fix typo in `http://www,pbfenergy.com` -- Update export_session script to copy multiple zap files created during log file rotation ## [17] - 2023-06-28 ### Added