1
mirror of https://github.com/carlospolop/PEASS-ng synced 2025-02-17 21:41:25 +01:00

root check

This commit is contained in:
Carlos Polop 2021-10-24 07:04:37 -04:00
parent 33b89dabbf
commit 93fd84a1d0

View File

@ -6,7 +6,7 @@ ADVISORY="This script should be used for authorized penetration testing and/or e
###########################################
#-------) Checks pre-everything (---------#
###########################################
if [ "$(/usr/bin/id -u)" -eq "0" ]; then
if ([ -f /usr/bin/id ] && [ "$(/usr/bin/id -u)" -eq "0" ]) || [ "`whoami 2>/dev/null`" = "root" ]; then
IAMROOT="1"
MAXPATH_FIND_W="3"
else