No description
This repository has been archived on 2021-01-15. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2016-08-06 19:01:07 +02:00
astley-rm-config.sh Added files 2016-08-06 17:36:23 +02:00
astley-rm.install Added files 2016-08-06 17:36:23 +02:00
astley-rm.sh Added files 2016-08-06 17:36:23 +02:00
LICENSE Initial commit 2016-08-06 17:35:37 +02:00
PKGBUILD Updated AUR link and PKGBUILD to match with what is in the AUR 2016-08-06 19:01:07 +02:00
README.md Updated AUR link and PKGBUILD to match with what is in the AUR 2016-08-06 19:01:07 +02:00

astley-rm

Rickroll whoever tries to desert your *NIX system, even root.

How it works

An alias that redirects each call of rm to astley-rm.sh is set in the global rc file of your console. This step is automatically made by the astley-rm-config.sh script, that edits by default /etc/profile and /etc/bash.bashrc. If you want to do this manually, here is the code:

# lines added by /usr/bin/astley-rm-config
alias rm='/usr/bin/astley-rm'
alias sudo='sudo '

astley-rm.sh then checks if the rm call is "malicious", namely if the recursive and the force options are used at the same time. If that happens, the rickroll() function in the script is called, causing http://youtu.be/dQw4w9WgXcQ to be opened in the default browser. You can always edit the function to achieve a different behaviour.

Installation

If you are using Arch Linux based distro, here is the link to the AUR package. However, the PKGBUILD is also in this repository.

If you are on a different type of system, you need to download or clone this repository, cd into it and:

  • Set up the aliases above or give execute permissions and execute astley-rm-config.sh as above (-h flag prints help).
  • Give execute permissions to astley-rm.sh and place it in /usr/bin, as astley-rm.