Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const crypto = require('crypto');
- var hash = function(data){
- var hashed = crypto.createHash('md5').update(data).digest("hex");
- return hashed
- }
- var generatePassword = function(length){
- var letters = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890!@#$%^&*()"
- var lettersArray = letters.split("")
- var password = []
- for (var i = length - 1; i >= 0; i--) {
- password.push(lettersArray[Math.floor(Math.random()*letters.length)])
- }
- return password.join("")
- }
- var passArray = []
- var hashArray = []
- for (var i = 0; i < 10000000; i++) {
- var pass = generatePassword(3)
- passArray.push(pass)
- hashArray.push(hash(pass))
- }
- var crack = "5571b48683d107962f269df4fcac9261"
- for (var i = 0; i < hashArray.length; i++) {
- if(hashArray[i] == crack){
- console.log(passArray[i])
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement