Compare commits

..

12 Commits

Author SHA1 Message Date
K9T33NwthTookThis
4a3ce5593a
Update info-dumper.sh 2025-07-15 23:29:21 +01:00
K9T33NwthTookThis
e1162eacb4
Merge pull request #5 from K9T33NwthTookThis/K9T33NwthTookThis-patch-2
Add option to print data
2025-07-15 23:15:37 +01:00
K9T33NwthTookThis
1ebb5e44ff
Merge pull request #6 from illegitimate-egg/k9patch2
Fix stream issues
2025-07-15 23:11:06 +01:00
59d38e0bc4 Fix stream issues 2025-07-15 23:06:36 +01:00
K9T33NwthTookThis
e6e521ab31
Update info-dumper.sh 2025-07-15 22:26:30 +01:00
K9T33NwthTookThis
b56872ae50
Update info-dumper.sh 2025-07-15 22:12:23 +01:00
K9T33NwthTookThis
e21bfdd7a8
Update info-dumper.sh 2025-07-15 22:09:06 +01:00
K9T33NwthTookThis
bdb492f5cf
Update info-dumper.sh 2025-07-15 22:08:03 +01:00
K9T33NwthTookThis
414f6d259b
Update info-dumper.sh
Fix errors
2025-07-15 22:03:40 +01:00
K9T33NwthTookThis
504fcd06bb
Update info-dumper.sh 2025-07-15 21:50:01 +01:00
K9T33NwthTookThis
73b415d729
Update info-dumper.sh
Add option to print output
2025-07-15 21:45:32 +01:00
K9T33NwthTookThis
003084c8da
Update info-dumper.sh
Allow users to see the actual data being sent (remove # before cat)
2025-07-13 23:26:33 +01:00
3 changed files with 72 additions and 51 deletions

View File

@ -9,5 +9,9 @@ The script is also available as a redirect from https://dukesyndicate.org/info-d
| Transfer method | Command | | Transfer method | Command |
|-----------------|-------------------------------------------------------------------| |-----------------|-------------------------------------------------------------------|
| curl | `curl -sSL https://dukesyndicate.org/info-dumper.sh \| sudo bash` | | curl | `curl -sSL https://dukesyndicate.org/info-dumper.sh \| sudo bash` |
| wget | `wget -qO- https://dukesyndicate.org/info-dumper.sh \| sudo bash` |
Deprecated transfer methods:
| Transfer method | Command | Deprecation reason |
|-----------------|-------------------------------------------------------------------|-----------------------------|
| wget | `wget -qO- https://dukesyndicate.org/info-dumper.sh \| sudo bash` | Program now depends on curl |

View File

@ -1,54 +1,13 @@
#!/bin/bash #!/bin/bash
if [[ $EUID -ne 0 ]]; then ###
printf "This script must be run as root" # This is the Raspberry Pi Community info dumper entry point. The additional file is necessary as another pipe is needed for user input,
exit 1 # it is easier to have bash use a file pipe than it is to use named pipes. This will also help for future expansion. - illegitimate-egg (2025-07-15)
fi ###
printf "version info:\n" >/tmp/rpc-dump.txt # Acquire script
{ curl -sSL https://raw.githubusercontent.com/K9T33NwthTookThis/RPC-info-dumper/refs/heads/main/main.sh > /tmp/rpc-info-dumper.sh
# pi model/device chmod +x /tmp/rpc-info-dumper.sh
uname -a
printf "\n"
cat /proc/version
printf "\n\n journalctl:\n" # Launch that thing
journalctl -n 50 --no-pager exec sudo bash /tmp/rpc-info-dumper.sh </dev/tty
printf "\n\n dmesg:\n"
dmesg -H | tail -50
printf "\n\n storage:\n"
df -h
printf "\n\n cpu info:\n"
lscpu
printf "\n\n pci:\n"
lspci
printf "\n\n uptime:\n"
uptime
} >>/tmp/rpc-dump.txt
# Remove non system user names on system
getent passwd | while IFS=: read -r name _ uid _ _ _ _; do
# System accounts shouldn't be redacted, as well as some user accounts
if ((uid < 1000)); then
continue
fi
awk -v user="$name" '{gsub(user, "[REDACTED]"); print}' /tmp/rpc-dump.txt | tee /tmp/rpc-dump-stripped.txt &>/dev/null
done
# cat /tmp/rpc-dump-stripped.txt
rm /tmp/rpc-dump.txt
printf "
__
_____ _____ _____ ____ _____ _____ __ _____ _ _ _| |
| __ | __| _ | \ | __ | __| | | | | | | |
| -| __| | | | | __ -| __| |__| | | | | |__|
|__|__|_____|__|__|____/ |_____|_____|_____|_____|_____|__|\n"
printf "\nSend this link to the person who asked you to run this:\n"
curl -F'file=@/tmp/rpc-dump-stripped.txt' -A "raspberry-pi-community info reporter, <cameron@humaneyestudio.co.uk>" https://0x0.st

58
main.sh Executable file
View File

@ -0,0 +1,58 @@
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
printf "This script must be run as root"
exit 1
fi
printf "version info:\n" >/tmp/rpc-dump.txt
{
# pi model/device
uname -a
printf "\n"
cat /proc/version
printf "\n\n journalctl:\n"
journalctl -n 50 --no-pager
printf "\n\n dmesg:\n"
dmesg -H | tail -50
printf "\n\n storage:\n"
df -h
printf "\n\n cpu info:\n"
lscpu
printf "\n\n pci:\n"
lspci
printf "\n\n uptime:\n"
uptime
} >>/tmp/rpc-dump.txt
# Remove non system user names on system
getent passwd | while IFS=: read -r name _ uid _ _ _ _; do
# System accounts shouldn't be redacted, as well as some user accounts
if ((uid < 1000)); then
continue
fi
awk -v user="$name" '{gsub(user, "[REDACTED]"); print}' /tmp/rpc-dump.txt | tee /tmp/rpc-dump-stripped.txt &>/dev/null
done
read -rp "Print output? [y, N]: " -t 8 output
if [[ $output == y ]]; then
cat /tmp/rpc-dump-stripped.txt
fi
rm /tmp/rpc-dump.txt
printf "
__
_____ _____ _____ ____ _____ _____ __ _____ _ _ _| |
| __ | __| _ | \ | __ | __| | | | | | | |
| -| __| | | | | __ -| __| |__| | | | | |__|
|__|__|_____|__|__|____/ |_____|_____|_____|_____|_____|__|\n"
printf "\nSend this link to the person who asked you to run this:\n"
curl -F'file=@/tmp/rpc-dump-stripped.txt' -A "raspberry-pi-community info reporter, <cameron@humaneyestudio.co.uk>" https://0x0.st