Created
February 24, 2013 13:08
-
-
Save najlepsiwebdesigner/5023781 to your computer and use it in GitHub Desktop.
Javascript bruteforce password attack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bruteforce!</title> | |
</head> | |
<body> | |
<script> | |
var password = '89p8zk', | |
passwordLength = 4, | |
alphabetLength = 36, | |
numberOfTries = 30000, | |
printAfter = 1000, | |
startFrom = 500000000; | |
count = Math.pow(passwordLength, alphabetLength); | |
document.write('<strong>Number of required tries in worst case:</strong> ' + count + '<br>'); | |
document.write('<strong>Print every</strong> ' + printAfter + 'th try:' + '<br><br>'); | |
var thing = []; | |
for (i = startFrom; i < (numberOfTries+startFrom); i++){ | |
if (i % printAfter == 0){ | |
thing.push("" + i.toString(alphabetLength) + " "); | |
} | |
if (password == i.toString(alphabetLength)){ | |
alert('Found password on ' + i + 'th try! Here it is: ' + i.toString(alphabetLength)); | |
} | |
} | |
document.write(thing.join('')); | |
document.write('<br><br>Last is: a' + i.toString(alphabetLength)); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where do we put the URL/Username of the account I want to attack?? I'm going to make a login and create a password that Brute Force will have trouble guessing.