Advertisement
Guest User

Untitled

a guest
Jan 10th, 2018
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.38 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. set_time_limit(0);
  4.  
  5. class curl {
  6. var $ch, $agent, $error, $info, $cookiefile, $savecookie;
  7. function curl() {
  8. $this->agent = $this->get_agent(rand(0,44));
  9. $this->ch = curl_init();
  10. curl_setopt ($this->ch, CURLOPT_USERAGENT, $this->agent);
  11. curl_setopt ($this->ch, CURLOPT_HEADER, 1);
  12. curl_setopt ($this->ch, CURLOPT_RETURNTRANSFER, 1);
  13. curl_setopt ($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
  14. curl_setopt ($this->ch, CURLOPT_SSL_VERIFYHOST, 1);
  15. curl_setopt ($this->ch, CURLOPT_FOLLOWLOCATION,true);
  16. curl_setopt ($this->ch, CURLOPT_TIMEOUT, 30);
  17. curl_setopt ($this->ch, CURLOPT_CONNECTTIMEOUT,30);
  18. }
  19. function timeout($time){
  20. curl_setopt ($this->ch, CURLOPT_TIMEOUT, $time);
  21. curl_setopt ($this->ch, CURLOPT_CONNECTTIMEOUT,$time);
  22. }
  23. function ssl($veryfyPeer, $verifyHost){
  24. curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $veryfyPeer);
  25. curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $verifyHost);
  26. }
  27. function header($header) {
  28. curl_setopt ($this->ch, CURLOPT_HTTPHEADER, $header);
  29. }
  30. function login($user, $pass) {
  31. curl_setopt ($this->ch, CURLOPT_USERPWD, "$user:$pass");
  32. }
  33. function cookies($cookie_file_path) {
  34. $this->cookiefile = $cookie_file_path;;
  35. $fp = fopen($this->cookiefile,'wb');fclose($fp);
  36. curl_setopt ($this->ch, CURLOPT_COOKIEJAR, $this->cookiefile);
  37. curl_setopt ($this->ch, CURLOPT_COOKIEFILE, $this->cookiefile);
  38. }
  39. function ref($ref) {
  40. curl_setopt ($this->ch, CURLOPT_REFERER,$ref);
  41. }
  42. function socks($sock) {
  43. curl_setopt ($this->ch, CURLOPT_HTTPPROXYTUNNEL, true);
  44. curl_setopt ($this->ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
  45. curl_setopt ($this->ch, CURLOPT_PROXY, $sock);
  46. }
  47. function post($url, $data) {
  48. curl_setopt($this->ch, CURLOPT_POST, 1);
  49. curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
  50. return $this->getPage($url);
  51. }
  52. function data($url, $data, $hasHeader=true, $hasBody=true) {
  53. curl_setopt ($this->ch, CURLOPT_POST, 1);
  54. curl_setopt ($this->ch, CURLOPT_POSTFIELDS, http_build_query($data));
  55. return $this->getPage($url, $hasHeader, $hasBody);
  56. }
  57. function get($url, $hasHeader=true, $hasBody=true) {
  58. curl_setopt ($this->ch, CURLOPT_POST, 0);
  59. return $this->getPage($url, $hasHeader, $hasBody);
  60. }
  61. function getPage($url, $hasHeader=true, $hasBody=true) {
  62. curl_setopt($this->ch, CURLOPT_HEADER, $hasHeader ? 1 : 0);
  63. curl_setopt($this->ch, CURLOPT_NOBODY, $hasBody ? 0 : 1);
  64. curl_setopt ($this->ch, CURLOPT_URL, $url);
  65. $data = curl_exec ($this->ch);
  66. $this->error = curl_error ($this->ch);
  67. $this->info = curl_getinfo ($this->ch);
  68. return $data;
  69. }
  70. function close() {
  71. unlink($this->cookiefile);
  72. curl_close ($this->ch);
  73. }
  74. function get_agent($z){
  75. switch ($z){
  76. case 0: $agent= "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0"; break;
  77. case 1: $agent= "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1"; break;
  78. case 2: $agent= "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; break;
  79. case 3: $agent= "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"; break;
  80. case 4: $agent= "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)"; break;
  81. case 5: $agent= "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; break;
  82. case 6: $agent= "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a8) Gecko/2007100619 GranParadiso/3.0a8"; break;
  83. case 7: $agent= "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3"; break;
  84. case 8: $agent= "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4325)"; break;
  85. case 9: $agent= "Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 6.0)"; break;
  86. case 10: $agent= "Mozilla/4.0 (compatible; MSIE 5.5b1; Mac_PowerPC)"; break;
  87. case 11: $agent= "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"; break;
  88. case 12: $agent= "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; MS-RTC LM 8)"; break;
  89. case 13: $agent= "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30)"; break;
  90. case 14: $agent= "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1)"; break;
  91. case 15: $agent= "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"; break;
  92. case 16: $agent= "Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.5; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"; break;
  93. case 17: $agent= "Mozilla/5.0 (X11; U; Linux; it-IT) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.4 (Change: 413 12f13f8)"; break;
  94. case 18: $agent= "Mozilla/5.0 (X11; U; Linux; en-GB) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 239 52c6958)"; break;
  95. case 19: $agent= "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2 (Change: 189 35c14e0)"; break;
  96. case 20: $agent= "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Avant Browser; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)"; break;
  97. case 21: $agent= "Mozilla/5.0 (Windows; U; WinNT; en; rv:1.0.2) Gecko/20030311 Beonex/0.8.2-stable"; break;
  98. case 22: $agent= "Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1b1) Gecko/20060601 BonEcho/2.0b1 (Ubuntu-edgy)"; break;
  99. case 23: $agent= "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.4pre) Gecko/20070521 Camino/1.6a1pre"; break;
  100. case 24: $agent= "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko, Safari/419.3) Cheshire/1.0.ALPHA"; break;
  101. case 25: $agent= "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021216 Chimera/0.6"; break;
  102. case 26: $agent= "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.164.0 Safari/530.1"; break;
  103. case 27: $agent= "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 1.1.4322; Crazy Browser 3.0.0 Beta2)"; break;
  104. case 28: $agent= "Mozilla/5.0 (X11; U; Linux i686; en; rv:1.8.1.12) Gecko/20080208 (Debian-1.8.1.12-2) Epiphany/2.20"; break;
  105. case 29: $agent= "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1"; break;
  106. case 30: $agent= "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031212 Firebird/0.7+"; break;
  107. case 31: $agent= "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.9.0.2) Gecko/2008092313 Ubuntu/9.04 (jaunty) Firefox/3.5"; break;
  108. case 32: $agent= "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3"; break;
  109. case 33: $agent= "Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9"; break;
  110. case 34: $agent= "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5"; break;
  111. case 35: $agent= "Mozilla/4.76 [en] (X11; U; Linux 2.4.9-34 i686)"; break;
  112. case 36: $agent= "Mozilla/4.75 [fr] (WinNT; U)"; break;
  113. case 37: $agent= "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.52 [en]"; break;
  114. case 38: $agent= "Mozilla/4.0 (compatible; MSIE 6.0; ; Linux i686) Opera 7.50 [en]"; break;
  115. case 39: $agent= "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081212 Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/526.9 (KHTML, like Gecko) Version/4.0dp1 Safari/526.8"; break;
  116. case 40: $agent= "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8.0.2) Gecko/20060309 SeaMonkey/1.0"; break;
  117. case 41: $agent= "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.6) Gecko/20050405 Epiphany/1.6.1 (Ubuntu) (Ubuntu package 1.0.2)"; break;
  118. case 42: $agent= "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5 Flock/0.7.4.1"; break;
  119. case 43: $agent= "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/0.2.153.1 Safari/525.19 "; break;
  120. case 44: $agent= "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 "; break;
  121. }
  122. return $agent;
  123. }
  124. }
  125.  
  126.  
  127. for ($x = 0; $x <= 100; $x++) {
  128. $curl = new curl();
  129. $curl->cookies('cookies/'.md5($_SERVER['REMOTE_ADDR']).'.txt');
  130. $curl->ssl(0, 2);
  131.  
  132. $url2 = "https://next.exchange/?ref=MTQ0OWQyNjQ3OA";
  133. $ref = $curl->get($url2);
  134.  
  135. if($ref == true) {
  136. $url = "https://next.exchange/register";
  137. $page = $curl->get($url);
  138. if($page == true) {
  139.  
  140. $content = file_get_contents("https://api.randomuser.me/");
  141. $request = json_decode($content);
  142.  
  143. $tokenKey = getStr($page,'<input type="hidden" name="_token" value="','"');
  144. $data = '_token='.$tokenKey.'&name='.$request->results[0]->login->username.'&email='.$request->results[0]->login->username.'@gmail.com&password='.$request->results[0]->login->password.'&password_confirmation='.$request->results[0]->login->password.'&phone_country_code=62&phone_number=0812280553945';
  145. $page = $curl->post($url, $data);
  146.  
  147. if (inStr($page, "You are currently on the members page of NEXT.exchange.")) {
  148. echo "REGISTER OK!".PHP_EOL;
  149. } else {
  150. echo "REGISTER FAIL!".PHP_EOL;
  151. }
  152. }
  153. }
  154. }
  155. sleep(2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement