Big linpeas update

This commit is contained in:
Carlos Polop
2024-08-27 23:56:21 +02:00
parent 463154aa05
commit 0ed01d58d3
281 changed files with 9138 additions and 5090 deletions

View File

@@ -0,0 +1,27 @@
# Title: Cloud - check_gcp
# ID: check_gcp
# Author: Carlos Polop
# Last Update: 22-08-2023
# Description: Check if the script is running in GCP
# License: GNU GPL
# Version: 1.0
# Functions Used:
# Global Variables:
# Initial Functions:
# Generated Global Variables: $is_gcp_vm, $is_gcp_function
# Fat linpeas: 0
# Small linpeas: 1
check_gcp(){
is_gcp_vm="No"
is_gcp_function="No"
if grep -q metadata.google.internal /etc/hosts 2>/dev/null || (curl --connect-timeout 2 metadata.google.internal >/dev/null 2>&1 && [ "$?" -eq "0" ]) || (wget --timeout 2 --tries 1 metadata.google.internal >/dev/null 2>&1 && [ "$?" -eq "0" ]); then
is_gcp_vm="Yes"
fi
# CHeck if /workspace exists
if [ -d "/workspace" ] && [ -d "/layers" ]; then
is_gcp_vm="No"
is_gcp_function="Yes"
fi
}