Comment on: Evil Coding Incantations
It's a bash function called a fork bomb, the idea is that it self references and forks each time spawning more and more of it's self. lets rename the function from : to "bomb" to make it more human readable
1: bomb(){
2: bomb | bomb &
3: };
4: bomb
Line 1: is the creation of the bash function named Bomb originally named ":"
Line 2: the contents/commands for the function Bomb (originally ":"), these commands are a self reference, so it runs it's self and pipes it's output into it's self and then the key to it all "&" forks that command into a new process
Line 3: ending the function
Line 4: running the function for the first time
The idea behind this is each time the function is called it spawns 2 more versions of it's self and compounds so.. 1>2>4>8>16 and so on, this all happens insanely fast and after a short time will overwhelm what ever system the command was run on. now some systems do have fork bomb prevention that will actually stop this command from working, but in most cases it will work. if you do run it, make sure your ready to reboot because it's going to grind your system to a halt.
and remember kids, never run some random code from some AWhole on the net :-)
Comment on: Evil Coding Incantations
my heart still flutters when i see the most beautiful bash command of all
:(){ :|: & };:
it won't exactly be an infinite loop, the first loop will run and complete... It will still spawn out of control, just at a very slow rate, their is a chance it will bring the system down but it will take much longer and might actually get restricted to just overloading one cpu core.. the & is really the magic part that lets it spin out of control, it's what fork's the process and why it's known as a fork bomb.