Compare commits

..

3 Commits

Author SHA1 Message Date
K9T33NwthTookThis
b38929a9f7
Update info-dumper.sh 2025-06-28 14:00:14 +01:00
K9T33NwthTookThis
76cbd24160
Merge pull request #3 from illegitimate-egg/main
Add exclusion for system/'root' accounts from the filtering
2025-06-28 13:59:01 +01:00
4cead9f433 Add exclusion for system/'root' accounts from the filtering 2025-06-28 13:56:45 +01:00

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

@ -28,8 +28,13 @@ lspci >> /tmp/rpc-dump.txt
printf "\n uptime:" >> /tmp/rpc-dump.txt printf "\n uptime:" >> /tmp/rpc-dump.txt
uptime >> /tmp/rpc-dump.txt uptime >> /tmp/rpc-dump.txt
# Remove all user names on system # Remove non system user names on system
getent passwd | while IFS=: read -r name password uid gid gecos home shell; do 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 cat /tmp/rpc-dump.txt | awk -v user="$name" '{gsub(user, "[REDACTED]"); print}' | tee /tmp/rpc-dump.txt &>/dev/null
done done