mirror of
https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite.git
synced 2026-01-06 06:39:05 +00:00
fix linpeas not getting EC2 metadata
This commit is contained in:
@@ -31,13 +31,10 @@ execBin() {
|
||||
|
||||
# ---------------- 120‑second wall‑clock timeout ----------------
|
||||
if command -v timeout >/dev/null 2>&1; then # GNU/BSD timeout
|
||||
print_info "Running $TOOL_NAME with 120s timeout"
|
||||
timeout --preserve-status -s 9 120 "$TMP_BIN" $PARAMS
|
||||
elif command -v gtimeout >/dev/null 2>&1; then # Homebrew coreutils (macOS)
|
||||
print_info "Running $TOOL_NAME with 120s gtimeout"
|
||||
gtimeout --preserve-status 120 "$TMP_BIN" $PARAMS
|
||||
gtimeout --preserve-status -s 9 120 "$TMP_BIN" $PARAMS
|
||||
else # POSIX fall‑back
|
||||
print_info "Running $TOOL_NAME with 120s custom timeout"
|
||||
(
|
||||
"$TMP_BIN" $PARAMS & # run in background
|
||||
cmdpid=$!
|
||||
|
||||
Reference in New Issue
Block a user