Merge pull request #3 from illegitimate-egg/main

Add exclusion for system/'root' accounts from the filtering
This commit is contained in:
K9T33NwthTookThis 2025-06-28 13:59:01 +01:00 committed by GitHub
commit 76cbd24160
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

5
info-dumper.sh Normal file → Executable file
View File

@ -30,6 +30,11 @@ uptime >> /tmp/rpc-dump.txt
# Remove all user names on system
getent passwd | while IFS=: read -r name password uid gid gecos home shell; do
# System accounts shouldn't be redacted, as well as some user accounts
if (( $uid < 1000 )); then
continue
fi
cat /tmp/rpc-dump.txt | awk -v user="$name" '{gsub(user, "[REDACTED]"); print}' | tee /tmp/rpc-dump.txt &>/dev/null
done