A Fork Bomb is a denial of service attack in the computer field using a system call fork (or other equivalent). The fork bomb creates a large number of processes at an extremely fast rate (the number of processes is exponentially increasing by 2), and the system is allocated to the available space of the process to saturate the process and the system can not run after the process table is saturated New procedures, unless the process of a process in the termination, it can be used in Windows/Linux and other systems.
Linux
:() #Define the function, the function name is “:”, that is, whenever you enter “:” will automatically call {} code
{ # “:” function starting characters
: #Recursively call “:” function itself
| #And using pipelines (pipe) outputs lead to … (because there is a pipeline operation character, and therefore will generate a new process)
: # Another recursive call: the function # mechanized, “” “: |: “Means that each time the function is called”: “, there will be two copies of the call between the calls, so that the original”: “function is closed after the call to the two”: “function also Can continue to execute
} # “:” function terminating character
; # “:” function after the end of the definition of the operation will be done
:: # call “:” function, “detonated” fork bomb
Code:
Windows
Code:
%0 is to output their own, that is, .bat, in the cmd that is running. Bat
|%0 is to open their own program and then open
Using Python:
Using Java: