From 3e8078f1cbdb015bc9c8a74e7103cda6e1fb128c Mon Sep 17 00:00:00 2001 From: Carlos Polop Date: Sun, 12 Jan 2025 13:23:01 +0100 Subject: [PATCH] fix reponse var --- linPEAS/builder/linpeas_parts/functions/check_az_vm.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/linPEAS/builder/linpeas_parts/functions/check_az_vm.sh b/linPEAS/builder/linpeas_parts/functions/check_az_vm.sh index 870bfce..f519088 100644 --- a/linPEAS/builder/linpeas_parts/functions/check_az_vm.sh +++ b/linPEAS/builder/linpeas_parts/functions/check_az_vm.sh @@ -8,7 +8,7 @@ # Functions Used: # Global Variables: # Initial Functions: -# Generated Global Variables: $is_az_vm +# Generated Global Variables: $is_az_vm, $meta_response # Fat linpeas: 0 # Small linpeas: 1 @@ -27,15 +27,15 @@ check_az_vm(){ else # 3. Try querying the Azure Metadata Service for more wide support (e.g. Azure Container Registry tasks need this) if command -v curl &> /dev/null; then - response=$(curl -s --max-time 2 \ + meta_response=$(curl -s --max-time 2 \ "http://169.254.169.254/metadata/identity/oauth2/token") - if echo "$response" | grep -q "Missing"; then + if echo "$meta_response" | grep -q "Missing"; then is_az_vm="Yes" fi elif command -v wget &> /dev/null; then - response=$(wget -qO- --timeout=2 \ + meta_response=$(wget -qO- --timeout=2 \ "http://169.254.169.254/metadata/identity/oauth2/token") - if echo "$response" | grep -q "Missing"; then + if echo "$meta_response" | grep -q "Missing"; then is_az_vm="Yes" fi fi