From 32c2028951217061a91a4049ce918f559dfa3e7b Mon Sep 17 00:00:00 2001 From: Victoria Jeffrey Date: Thu, 3 Aug 2023 04:58:28 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20add=20user=20agent=20headers=20t?= =?UTF-8?q?o=20bash=20download=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- download.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/download.sh b/download.sh index cce53420..7e6ed501 100755 --- a/download.sh +++ b/download.sh @@ -99,9 +99,11 @@ pkg_base_url="${base_url}/${product}/${os}/${arch}/tar.gz/${version}" download_url="${pkg_base_url}/download" sha_url="${pkg_base_url}/sha256" +UserAgent="MondooDownloadScript/1.0 (+https://mondoo.com/) ShellScript/$BASH_VERSION ($OS $DISTRIBUTION)" + # download binary purple_bold "Downloading ${download_url}" -binarySha=$(curl -fsSL "${download_url}" | tee "${filename}" | ${sha256bin} | cut -b 1-64) +binarySha=$(curl -A "${UserAgent}" -fsSL "${download_url}" | tee "${filename}" | ${sha256bin} | cut -b 1-64) echo -e "Downloaded binary hash: ${binarySha}" # download the checksum