Skip to content

Commit

Permalink
curl follow redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospolop committed Sep 19, 2024
1 parent 7979c47 commit cb39091
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion linPEAS/builder/linpeas_parts/3_cloud/10_IBM_Cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linPEAS/builder/linpeas_parts/3_cloud/11_Ali_Cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
Expand Down
2 changes: 1 addition & 1 deletion linPEAS/builder/linpeas_parts/3_cloud/2_AWS_EC2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linPEAS/builder/linpeas_parts/3_cloud/7_Azure_VM.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linPEAS/builder/linpeas_parts/3_cloud/9_DO_Droplet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb39091

Please sign in to comment.