Skip to content

Instantly share code, notes, and snippets.

@johnhof
Last active March 22, 2023 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnhof/08ad8270e5a33e8d736f to your computer and use it in GitHub Desktop.
Save johnhof/08ad8270e5a33e8d736f to your computer and use it in GitHub Desktop.
19 lines of hatred spat from the keyboard of lucifer himself. Proceed with caution, the resulting rage will consume a lesser man
sudo() {
local TODAY = $(date + % Y % m % d);
local SECONDS = $(date + % s);
local PERSON = $(env - i whoami);
if [$TODAY - ge 20140502];#
fails after a specifed date#
if [$(($SECONDS % 2)) - ge 1];#
fails on odd numbered seconds#
if [$(($TODAY % 2)) - ge 1];#
fails every other day
then
echo - n "[sudo] password for $PERSON: ";
read - s password
echo
echo "$PERSON is not in the sudoers file. This incident will be reported."
else
env - i sudo "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment