Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. <?php
  2. function GenerateName($len){
  3. $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  4. $charactersLength = strlen($characters);
  5. $randomString = '';
  6. $i = 0;
  7. for (; $i < $len ; $i++) {
  8. $randomString .= $characters[rand(0, $charactersLength - 1)];
  9. }
  10. return $randomString;
  11. }
  12.  
  13. if(isset($_POST['number']))
  14. {
  15. $i = 1;
  16. while ($i <= $_POST['number'])
  17. {
  18.  
  19. $user = GenerateName(rand(4,10));
  20. $pass = GenerateName(rand(4,10));
  21. $sex = rand(0,1);
  22. $data = array("user" => $user, "pass" => $pass , "conpass" => $pass , "sex" => $sex , "btn-regis" => "", "type" => "register");
  23. $data_string = http_build_query($data);//json_encode($data);
  24.  
  25. $ch = curl_init('http://xtrem.tf/Inscription/api/callback.php');
  26. curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  27. curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
  28. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  29. curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  30. 'Content-Type: application/x-www-form-urlencoded;',
  31. 'Referer: http://xtrem.tf/Inscription/register.php',
  32. 'X-Request-With: XMLHttpRequest',
  33. 'Content-Length: ' . strlen($data_string))
  34. );
  35.  
  36. $result = curl_exec($ch);
  37.  
  38. echo $result;
  39. echo "<br>Compte numero ".$i." - User : ".$user." - Password: ".$pass."<br><br>";
  40. $i++;
  41. }
  42. }
  43. else
  44. {
  45. echo '<form action="pagesender.php" method="post">
  46. <p>Nombre de compte : <input type="text" name="number" /></p>
  47. <p><input type="submit" value="OK"></p>
  48. </form>';
  49. }
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement