From cb39091bfa0605c176bfcb36c20cf312b699f9f3 Mon Sep 17 00:00:00 2001 From: Carlos Polop Date: Thu, 19 Sep 2024 11:57:19 +0200 Subject: [PATCH] curl follow redirects --- linPEAS/builder/linpeas_parts/3_cloud/10_IBM_Cloud.sh | 2 +- linPEAS/builder/linpeas_parts/3_cloud/11_Ali_Cloud.sh | 2 +- linPEAS/builder/linpeas_parts/3_cloud/2_AWS_EC2.sh | 2 +- .../builder/linpeas_parts/3_cloud/6_Google_cloud_function.sh | 2 +- linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_vm.sh | 2 +- linPEAS/builder/linpeas_parts/3_cloud/7_Azure_VM.sh | 2 +- linPEAS/builder/linpeas_parts/3_cloud/8_Azure_app_service.sh | 2 +- linPEAS/builder/linpeas_parts/3_cloud/9_DO_Droplet.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/linPEAS/builder/linpeas_parts/3_cloud/10_IBM_Cloud.sh b/linPEAS/builder/linpeas_parts/3_cloud/10_IBM_Cloud.sh index eb4538e..f8d3370 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/10_IBM_Cloud.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/10_IBM_Cloud.sh @@ -26,7 +26,7 @@ if [ "$is_ibm_vm" = "Yes" ]; then ibm_req="" if [ "$(command -v curl || echo -n '')" ]; then - ibm_req="curl -s -f -H '$TOKEN_HEADER' -H '$ACCEPT_HEADER'" + ibm_req="curl -s -f -L -H '$TOKEN_HEADER' -H '$ACCEPT_HEADER'" elif [ "$(command -v wget || echo -n '')" ]; then ibm_req="wget -q -O - -H '$TOKEN_HEADER' -H '$ACCEPT_HEADER'" else diff --git a/linPEAS/builder/linpeas_parts/3_cloud/11_Ali_Cloud.sh b/linPEAS/builder/linpeas_parts/3_cloud/11_Ali_Cloud.sh index 8d6cdc6..6c6bff6 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/11_Ali_Cloud.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/11_Ali_Cloud.sh @@ -19,7 +19,7 @@ if [ "$is_aliyun_ecs" = "Yes" ]; then aliyun_token="" if [ "$(command -v curl)" ]; then aliyun_token=$(curl -X PUT "http://100.100.100.200/latest/api/token" -H "X-aliyun-ecs-metadata-token-ttl-seconds:1000") - aliyun_req='curl -s -f -H "X-aliyun-ecs-metadata-token: $aliyun_token"' + aliyun_req='curl -s -f -L -H "X-aliyun-ecs-metadata-token: $aliyun_token"' elif [ "$(command -v wget)" ]; then aliyun_token=$(wget -q -O - --method PUT "http://100.100.100.200/latest/api/token" --header "X-aliyun-ecs-metadata-token-ttl-seconds:1000") aliyun_req='wget -q -O --header "X-aliyun-ecs-metadata-token: $aliyun_token"' diff --git a/linPEAS/builder/linpeas_parts/3_cloud/2_AWS_EC2.sh b/linPEAS/builder/linpeas_parts/3_cloud/2_AWS_EC2.sh index b4c0a9c..5b50efd 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/2_AWS_EC2.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/2_AWS_EC2.sh @@ -21,7 +21,7 @@ if [ "$is_aws_ec2" = "Yes" ]; then aws_req="" if [ "$(command -v curl || echo -n '')" ]; then - aws_req="curl -s -f -H '$HEADER'" + aws_req="curl -s -f -L -H '$HEADER'" elif [ "$(command -v wget || echo -n '')" ]; then aws_req="wget -q -O - -H '$HEADER'" else diff --git a/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_function.sh b/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_function.sh index 9e44f81..fe3931e 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_function.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_function.sh @@ -16,7 +16,7 @@ if [ "$is_gcp_function" = "Yes" ]; then gcp_req="" if [ "$(command -v curl)" ]; then - gcp_req='curl -s -f -H "Metadata-Flavor: Google"' + gcp_req='curl -s -f -L -H "Metadata-Flavor: Google"' elif [ "$(command -v wget)" ]; then gcp_req='wget -q -O - --header "Metadata-Flavor: Google"' else diff --git a/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_vm.sh b/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_vm.sh index 53c4e39..cbcf2a9 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_vm.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_vm.sh @@ -16,7 +16,7 @@ if [ "$is_gcp_vm" = "Yes" ]; then gcp_req="" if [ "$(command -v curl || echo -n '')" ]; then - gcp_req='curl -s -f -H "Metadata-Flavor: Google"' + gcp_req='curl -s -f -L -H "Metadata-Flavor: Google"' elif [ "$(command -v wget || echo -n '')" ]; then gcp_req='wget -q -O - --header "Metadata-Flavor: Google"' else diff --git a/linPEAS/builder/linpeas_parts/3_cloud/7_Azure_VM.sh b/linPEAS/builder/linpeas_parts/3_cloud/7_Azure_VM.sh index 7c1f8a9..84e81af 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/7_Azure_VM.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/7_Azure_VM.sh @@ -22,7 +22,7 @@ if [ "$is_az_vm" = "Yes" ]; then az_req="" if [ "$(command -v curl || echo -n '')" ]; then - az_req="curl -s -f -H '$HEADER'" + az_req="curl -s -f -L -H '$HEADER'" elif [ "$(command -v wget || echo -n '')" ]; then az_req="wget -q -O - -H '$HEADER'" else diff --git a/linPEAS/builder/linpeas_parts/3_cloud/8_Azure_app_service.sh b/linPEAS/builder/linpeas_parts/3_cloud/8_Azure_app_service.sh index 2aef9b8..c5b3489 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/8_Azure_app_service.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/8_Azure_app_service.sh @@ -23,7 +23,7 @@ if [ "$is_az_app" = "Yes" ]; then az_req="" if [ "$(command -v curl || echo -n '')" ]; then - az_req="curl -s -f -H '$HEADER'" + az_req="curl -s -f -L -H '$HEADER'" elif [ "$(command -v wget || echo -n '')" ]; then az_req="wget -q -O - -H '$HEADER'" else diff --git a/linPEAS/builder/linpeas_parts/3_cloud/9_DO_Droplet.sh b/linPEAS/builder/linpeas_parts/3_cloud/9_DO_Droplet.sh index a06dc1f..b935c13 100644 --- a/linPEAS/builder/linpeas_parts/3_cloud/9_DO_Droplet.sh +++ b/linPEAS/builder/linpeas_parts/3_cloud/9_DO_Droplet.sh @@ -18,7 +18,7 @@ if [ "$is_do" = "Yes" ]; then do_req="" if [ "$(command -v curl || echo -n '')" ]; then - do_req='curl -s -f ' + do_req='curl -s -f -L ' elif [ "$(command -v wget || echo -n '')" ]; then do_req='wget -q -O - ' else