6 ms·
This guy must be the most dangerous criminal alive: https://github.com/aaronryank/fork-bomb https://github.com/aaronryank/fork-bomb
by ______-_-______ 5y ago
This guy must be the most dangerous criminal alive: https://github.com/aaronryank/fork-bomb https://github.com/aaronryank/fork-bomb
- account42 5y agoThe Bash example is simply wrong: #!/bin/bash ./$0|./$0& # $0 is the name of the shell script itself There is no need for the leading ./ if the script was invoked via a relative path ($0 will already have it) and adding it will break it if the script is invoked via an absolute path or name that is resolved against $PATH. Further, what $0 holds is only a convention and up to the caller. If you are already restricting yourself to Bash, used ${BASH_SOURCE[0]} to always get the path to the script file. But really, there is no need for a separate Bash version when the classic POSIX sh fork bomb already covers it (included in the repo as fork-bomb.sh): :(){:|:&};:
- archduck 5y agoYou'll get a syntax error if you try to run that - braces need spaces. https://stackoverflow.com/questions/21186724/why-is-whitespace-sometimes-needed-around-metacharacters https://stackoverflow.com/questions/21186724/why-is-whitespa... (The link here doubles as an explanation and as a warning to anyone thinking about getting a forkbomb tattoo.)
- WithinReason 5y agoI had to try the batch file fork bomb, this is the whole thing: %0|%0 Now my computer is just smoke and rubble.
- nunez 5y agoPURE FUCKING EVIL.
- WithinReason 5y agotold ya
- skrebbel 5y agoStrictly put that's a CreateProcess bomb though
- btilly 5y agoI came up with a nastier fork bomb about 20 years ago. This also tries to eat your memory. It at least used to reliably hose any *nix system I tried it on, even ones where people had tried to put various process limits in place. #!/bin/sh perl -e 'push @big, 1 while 1' &; $0 &; $0
- stjohnswarts 5y agoI wrote a c program that would slowly eat up memory over the course of about 15 minutes and use it to anger fellow college students progressively as the machine became slowly less and less reactive (rather than all at once with fork bombs and such) of course it would back off after a couple minute and start doing it again. After a couple of hours it would exit waiting for the next reboot. I'm glad I'm a lot more mature these days, and my pranks are less about enraging people in student labs. It's my understanding that most of these machine have programs that constantly sweep and delete such things in modern college labs, so that is a good change. Fortunately I grew weary of it after a week or two and deleted it off the few machines I put it on.
- belter 5y agoOne word for you: 42.zip