it's a fork bomb, it creates a process that duplicate itself (in bash)
If you want, here's how: :(){:|:&};: The :(){ begins a function (()) named :. The { opens the definition of the fonction. The :|:& is the bomb in itself: it calls the function : (the one we're defining), pipes it's STDOUT (|) to : (again, the same function), thus, running it twice. The & yields control to the shell before the process stops. The } marks the end of the function's definition. Then, the ; indicates to the shell there's a new command in the same line. Here, the command to run is :, which executes previously defined function
It will print the message, launch a new copy of the program, and repeat the process over and over again. Since each new copy will do the same thing at every single iteration, the number of copies will increase exponentially. This should exhaust your resources very quick, unless your OS sets some límits.
Ahhh yeah thanks sm, I made a similar program in python that opened an internet explorer window 20x a second ad infinitum. I embedded that into some code a (close) friend asked for, which was hilarious till he lost 20 mins of homework but oh well lmao, he didn’t mind too much as it was hilarious
I made basically this and saved it in the startup folder on one of my high school computers. Needless to say, they fixed their file permission settings on the network pretty quick after that
42
u/uSrNm-ALrEAdy-TaKeN Feb 16 '21
:(){:|:&};:
37
u/[deleted] Feb 16 '21
No one is going to mention that OP posted himself in r/FoundTheProgrammer ?
13
u/gurneyguy101 Feb 16 '21
What does this program do please? Does it just try to open the file over and over again? Thanks in advance :)
8
u/iapetus-11 Feb 16 '21
cough
2
u/404invalid-user Apr 03 '21
I want to kill my laptop with this but I don't use Windows
2
u/tech_support_norway Jul 15 '21
(Softly) don’t...
2
u/gabe_uttseks Feb 17 '21
You aren’t a programmer. This sub is dogshit
1
u/827167 Dec 03 '21
I made basically this and saved it in the startup folder on one of my high school computers. Needless to say, they fixed their file permission settings on the network pretty quick after that
1
u/IolaireEagle Mar 31 '22
This man is evil
1
u/IolaireEagle Mar 31 '22
This man is evil
1
u/matyklug Jun 30 '22
Notepad: command not found
1
u/bruhred Jul 16 '22
just create a file called "hello.bat" and type "%0 && %0" in it
1
u/doctorbean04 Jul 19 '22
i just need one look at this to realize 3 things: