From 8ce392c4ae4007fcccb2f1e1123b6fa7c0a4cb39 Mon Sep 17 00:00:00 2001 From: Carlos Polop Date: Thu, 21 Oct 2021 08:52:42 -0400 Subject: [PATCH] impr --- linPEAS/builder/linpeas_base.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linPEAS/builder/linpeas_base.sh b/linPEAS/builder/linpeas_base.sh index fd0728f..b2bdf56 100755 --- a/linPEAS/builder/linpeas_base.sh +++ b/linPEAS/builder/linpeas_base.sh @@ -2748,7 +2748,7 @@ if echo $CHECKS | grep -q IntFiles; then echo_not_found "strace" fi suids_files=$(find / -perm -4000 -type f ! -path "/dev/*" 2>/dev/null) - printf "%s\n" "$suids_files" | while read s; do + for s in $suids_files; do s=$(ls -lahtr "$s") #If starts like "total 332K" then no SUID bin was found and xargs just executed "ls" in the current folder if echo "$s" | grep -qE "^total"; then break; fi @@ -2814,7 +2814,7 @@ if echo $CHECKS | grep -q IntFiles; then print_2title "SGID" print_info "https://book.hacktricks.xyz/linux-unix/privilege-escalation#sudo-and-suid" sgids_files=$(find / -perm -2000 -type f ! -path "/dev/*" 2>/dev/null) - printf "%s\n" "$sgids_files" | while read s; do + for s in $sgids_files; do s=$(ls -lahtr "$s") #If starts like "total 332K" then no SUID bin was found and xargs just executed "ls" in the current folder if echo "$s" | grep -qE "^total";then break; fi