From 30d99b9fbbf4f5b8635fb58b776eefb386b45aff Mon Sep 17 00:00:00 2001 From: Dolev Farhi Date: Sat, 25 Nov 2023 22:39:59 -0500 Subject: [PATCH] add download part --- ch12/exercise_solution.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ch12/exercise_solution.sh b/ch12/exercise_solution.sh index 74c739d..49654c8 100644 --- a/ch12/exercise_solution.sh +++ b/ch12/exercise_solution.sh @@ -55,6 +55,10 @@ check_file_or_directory(){ return 1 } +download_eicar_file(){ + wget -q "https://secure.eicar.org/eicar.com.txt" +} + generate_report(){ if [[ ! -f "${REPORT_NAME}" ]]; then echo "tool, check_type, indicator" > "${REPORT_NAME}" @@ -77,4 +81,8 @@ check tripwire directory /etc/tripwire check aide directory /etc/aide check apparmor directory /etc/apparmor.d check fluentbit directory /etc/fluent-bit -check rkhunter file /etc/rkhunter \ No newline at end of file +check rkhunter file /etc/rkhunter + +if [[ -f "${REPORT_NAME}" ]]; then + download_eicar_file +fi \ No newline at end of file