From efa0e98547a7aaeefe92a6b00329314c78b12dc4 Mon Sep 17 00:00:00 2001 From: shadowabi <50265741+shadowabi@users.noreply.github.com> Date: Mon, 17 Jun 2024 11:23:11 +0800 Subject: [PATCH] Update 3_cloud.sh for check_cvm Added connection timeout Settings and fixed wget syntax errors for check_cvm --- linPEAS/builder/linpeas_parts/3_cloud.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linPEAS/builder/linpeas_parts/3_cloud.sh b/linPEAS/builder/linpeas_parts/3_cloud.sh index e6ede29..6a69577 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud.sh @@ -168,9 +168,9 @@ echo "" if [ "$is_tencent_cvm" = "Yes" ]; then tencent_req="" if [ "$(command -v curl)" ]; then - tencent_req='curl -sfkG' + tencent_req='curl --connect-timeout 2 -sfkG' elif [ "$(command -v wget)" ]; then - tencent_req='wget -q -O ' + tencent_req='wget -q --timeout 2 --tries 1 -O -' else echo "Neither curl nor wget were found, I can't enumerate the metadata service :(" fi