Advertisement
Guest User

Untitled

a guest
Nov 27th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.62 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['submit']))
  3. {
  4. function get_cookie()
  5. {
  6. $ch = curl_init('https://www.spotify.com/fr/signup/');
  7. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  8. curl_setopt($ch, CURLOPT_HEADER, 1);
  9. $result = curl_exec($ch);
  10. preg_match('/^Set-Cookie:\s*([^;]*)/mi', $result, $m);
  11. parse_str($m[1], $cookies);
  12. return $cookies["sp_csrf"];
  13. }
  14.  
  15. function randomPassword() {
  16. $alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789";
  17. $pass = array(); //remember to declare $pass as an array
  18. $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
  19. for ($i = 0; $i < 8; $i++) {
  20. $n = rand(0, $alphaLength);
  21. $pass[] = $alphabet[$n];
  22. }
  23. return implode($pass); //turn the array into a string
  24. }
  25.  
  26. //name generation
  27. $ext = array('.gov','.be', '.biz', '.ch', '.com', '.co', '.co.uk', '.de', '.es', '.eu', '.fr', '.gr', '.im', '.info', '.io', '.it', '.lu', '.lt', '.me', '.mobi', '.mx', '.net', '.nl', '.org', '.pro', '.pt', '.re', '.ru', '.se', '.tel', '.tv', '.aero', '.biz', '.com', '.coop', '.info', '.mobi', '.name', '.net', '.org', '.pro', '.tel', '.travel', '.xxx', '.ag', '.ar.com', '.br.com', '.bz', '.ca', '.cc', '.co', '.gd', '.gs', '.gy', '.hn', '.ht', '.la', '.lc', '.ms', '.mx', '.pe', '.pm', '.qc.com', '.sx', '.tc', '.us', '.us.com', '.us.org', '.uy.com', '.vc', '.vg', '.at', '.be', '.cat', '.ch', '.co.uk', '.com.de', '.de', '.de.com', '.dk', '.es', '.eu', '.eu.com', '.fi', '.fr', '.gb.com', '.gb.net', '.gg', '.gr', '.gr.com', '.hu.com', '.hu.net', '.im', '.it', '.je', '.li', '.lt', '.lu', '.lv', '.me', '.me.uk', '.nl', '.no', '.no.com', '.nu', '.org.uk', '.pl', '.pt', '.ro', '.ru', '.ru.com', '.se', '.se.com', '.se.net', '.uk.com', '.uk.net', '.ru', '.ae.org', '.af', '.am', '.asia', '.cn', '.cn.com', '.cx', '.fm', '.hk', '.in', '.in.net', '.io', '.jp', '.jp.net', '.jpn.com', '.ki', '.kr.com', '.mn', '.nf', '.nz', '.ph', '.pw', '.sa.com', '.sb', '.tl', '.tv', '.tw', '.wf', '.ws', '.cm', '.mg', '.mu', '.re', '.sc', '.so', '.tf', '.yt', '.za', '.za.com' );
  28. $names = array ('tony','lea','mary','bruce','Annabel', 'Asher', 'Atticus', 'August', 'Butch', 'Clementine', 'Daisy', 'Dashiell', 'Delilah', 'Dexter', 'Dixie', 'Duke', 'Edie', 'Elvis', 'Flora', 'Frances', 'Frank', 'Georgia', 'Gus', 'Hazel', 'Homer', 'Hopper', 'Hudson', 'Hugo', 'Ike', 'India', 'Ione', 'Iris', 'Isla', 'Ivy', 'June', 'Kai', 'Kingston', 'Lennon', 'Leonora', 'Leopold', 'Levi', 'Lila', 'Lionel', 'Lola', 'Luca', 'Lulu', 'Magnus', 'Mamie', 'Matilda', 'Millie', 'Milo', 'Minnie', 'Moses', 'Olive', 'Orson', 'Oscar', 'Otis', 'Pearl', 'Piper', 'Poppy', 'Ray', 'Roman', 'Romy', 'Roscoe', 'Ruby', 'Rufus', 'Sadie', 'Scarlett', 'Sebastian', 'Stella', 'Stellan', 'Sullivan', 'Talullah', 'Theo', 'Violet');
  29. $names2 = array('gordon','wayne','gates','clinton','washington','carlson','wolowitz','stark','simpson','Jacka','Hackett','Buzzigoli','Mossmann','Hamm','Solano','Huntington','Fath','Goncalves','Decristoforo','Ellsworth','Alonsogarcia','Bullough','Bankhead','Swank','Rickels','Book','Dicks','Guo','Margolin','Mcdermott','Ciannavei','Buccianti','Lamb','Rzepka','Lovegreen');
  30. $domain1 = array('Babble', 'Buzz', 'Blog', 'Blue', 'Brain', 'Bright', 'Browse', 'Bubble', 'Chat', 'Chatter', 'Dab', 'Dazzle', 'Dev', 'Digi', 'Edge', 'Feed', 'Five', 'Flash', 'Flip', 'Gab', 'Giga', 'Inno', 'Jabber', 'Jax', 'Jet', 'Jump', 'Link', 'Live', 'My', 'N', 'Photo', 'Pod', 'Real', 'Riff', 'Shuffle', 'Snap', 'Skip', 'Tag', 'Tek', 'Thought', 'Top', 'Topic', 'Twitter', 'Word', 'You', 'Zoom');
  31. $domain2 = array('bean', 'beat', 'bird', 'blab', 'box', 'bridge', 'bug', 'buzz', 'cast', 'cat', 'chat', 'club', 'cube', 'dog', 'drive', 'feed', 'fire', 'fish', 'fly', 'ify', 'jam', 'links', 'list', 'lounge', 'mix', 'nation', 'opia', 'pad', 'path', 'pedia', 'point', 'pulse', 'set', 'space', 'span', 'share', 'shots', 'sphere', 'spot', 'storm', 'ster', 'tag', 'tags', 'tube', 'tune', 'type', 'verse', 'vine', 'ware', 'wire', 'works', 'XS', 'Z', 'zone', 'zoom');
  32. $separators = array('-','_','.','');
  33.  
  34. shuffle($ext);
  35. shuffle($names);
  36. shuffle($names2);
  37. shuffle($separators);
  38. shuffle($domain1);
  39. shuffle($domain2);
  40. $randomExt = $ext[0];
  41. $randomName = $names[0];
  42. $randomName2 = $names2[0];
  43. $randomSeparator = $separators[0];
  44. $randomDomain1 = $domain1[0];
  45. $randomDomain2 = $domain2[0];
  46.  
  47. $mail = $randomName.$randomSeparator.$randomName2.'@'.$randomDomain1.$randomDomain2.$randomExt;
  48. $username = $_POST['username'];
  49. $day = mt_rand(1, 28);
  50. $month = mt_rand(1, 12);
  51. $year = mt_rand(1940, 1999);
  52. $ch = curl_init();
  53. $password = randomPassword();
  54.  
  55. curl_setopt($ch, CURLOPT_URL,"https://www.spotify.com/fr/xhr/json/sign-up-for-spotify.php");
  56. curl_setopt($ch, CURLOPT_POST, 1);
  57. curl_setopt($ch, CURLOPT_POSTFIELDS,
  58. "sp_csrf=".get_cookie()."&form_token=850042dc3631b8f7288e6441fa2def5e&forward_url=%2Ffr%2Fdownload%2F&signup_pre_tick_eula=true&username=".$username."&password=".$password."&email=".$mail."&confirm_email=".$mail."&dob_day=".$day."&dob_month=".$month."&dob_year=".$year."&gender=male");
  59.  
  60. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  61. $server_output = curl_exec ($ch);
  62. $result = json_decode($server_output);
  63.  
  64. curl_close ($ch);
  65.  
  66. // further processing ....
  67. if ($result->status == "1")
  68. {
  69. echo '<b>Account created !</b><br /><p>Username: '.$username.'<br />E-Mail: '.$mail.'<br />Password: '.$password.'<br /></p>';
  70. }
  71. else
  72. {
  73. echo 'I don\'t know, error or whatever...';
  74. }
  75. }else{
  76. ?>
  77. <form method="post">
  78. <label>Username:</label>
  79. <input type="text" name="username">
  80. <input type="submit" name="submit" value="Submit Username" >
  81. </form>
  82. <?php
  83. }
  84. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement