wahjoedi

thebestbitcoinfaucet

Jan 28th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. <?php
  2. date_default_timezone_set("Asia/Bangkok");
  3. error_reporting(0);
  4.  
  5.  
  6. function call($addr) {
  7. $data= "address=$addr&sponsor=10507";
  8. $cok = tempnam('tmp','avo'.rand(1000000,9999999).'tmp.txt');
  9. $c = curl_init("https://thebestbitcoinfaucet.com/");
  10. curl_setopt($c, CURLOPT_REFERER, "https://thebestbitcoinfaucet.com/");
  11. curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
  12. curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
  13. curl_setopt($c, CURLOPT_POSTFIELDS, $data);
  14. curl_setopt($c, CURLOPT_POST, true);
  15. curl_setopt($c, CURLOPT_ENCODING, 'gzip, deflate');
  16. //curl_setopt($c, CURLOPT_VERBOSE, true);
  17. curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
  18. curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
  19. curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
  20. curl_setopt($c, CURLOPT_HEADER, true);
  21. curl_setopt($c, CURLOPT_COOKIEJAR, $cok);
  22. curl_setopt($c, CURLOPT_COOKIEFILE, $cok);
  23. //curl_setopt($c, CURLOPT_COOKIEFILE, $cookie);
  24. $response = curl_exec($c);
  25. $httpcode = curl_getinfo($c);
  26. //$error = curl_strerror($c);
  27. if (!$httpcode)
  28. return false;
  29. else {
  30. $header = substr($response, 0, curl_getinfo($c, CURLINFO_HEADER_SIZE));
  31. $body = substr($response, curl_getinfo($c, CURLINFO_HEADER_SIZE));
  32. }
  33.  
  34. $data= "faucetclaim=$addr";
  35.  
  36. $c = curl_init("https://thebestbitcoinfaucet.com/");
  37. curl_setopt($c, CURLOPT_REFERER, "https://thebestbitcoinfaucet.com/");
  38. curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
  39. curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
  40. curl_setopt($c, CURLOPT_POSTFIELDS, $data);
  41. curl_setopt($c, CURLOPT_POST, true);
  42. curl_setopt($c, CURLOPT_ENCODING, 'gzip, deflate');
  43. //curl_setopt($c, CURLOPT_VERBOSE, true);
  44. curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
  45. curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
  46. curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
  47. curl_setopt($c, CURLOPT_HEADER, true);
  48. curl_setopt($c, CURLOPT_COOKIEJAR, $cok);
  49. curl_setopt($c, CURLOPT_COOKIEFILE, $cok);
  50. $response = curl_exec($c);
  51. $httpcode = curl_getinfo($c);
  52. //$error = curl_strerror($c);
  53. if (!$httpcode)
  54. return false;
  55. else {
  56. $header = substr($response, 0, curl_getinfo($c, CURLINFO_HEADER_SIZE));
  57. $body = substr($response, curl_getinfo($c, CURLINFO_HEADER_SIZE));
  58. }
  59. preg_match_all('~(<h2 style="color:#CE224D"><b>(.*?)</h2>)~', $body, $bal);
  60. preg_match_all("~(</h3> <p align='left'>(.*?)</p>)~", $body, $claim);
  61. preg_match_all('~(<div class="panel-body">(.*?) </div>)~', $body, $ava);
  62. //print_r($bal).print_r($ava);
  63. $claim = $claim[2][0];
  64. $bal = $bal[2][0];
  65. $ava = $ava[2][1];
  66. //echo $body;
  67. $res['info'] = "Wallet: $addr".PHP_EOL."$bal".PHP_EOL."$ava";
  68. if(!preg_match("/Error/", $body)){
  69. $res['status'] = true;
  70. $res['message'] = $claim;
  71. }elseif(preg_match("/Only one account is allowed/", $body)){
  72. $res['status'] = false;
  73. $res['message'] = "Your IP is Banned!";
  74. }else{
  75. $res['status'] = false;
  76. $res['message'] = $claim;
  77. }
  78. return $res;
  79. }
  80.  
  81. $CY="\e[36m"; $GR="\e[2;32m"; $OG="\e[92m"; $WH="\e[37m"; $RD="\e[31m"; $YL="\e[33m"; $BF="\e[34m"; $DF="\e[39m"; $OR="\e[33m"; $PP="\e[35m"; $B="\e[1m"; $CC="\e[0m";
  82. echo "Input Your BTC Address: ";
  83. $btc = trim(fgets(STDIN));
  84. //if ($cookies == false) exit($time . "No such file!");
  85. for($i=0; $i<99; $i++) {
  86. echo "[" . date("H:i:s") . "] Claiming...\n";
  87. $claim = call($btc);
  88. //print_r($claim);
  89. //$response = @json_decode($claim, 1);
  90. if (isset($claim['info'])) {
  91. echo "[" . date("H:i:s") . "] SabarBroo:\n";
  92. echo $PP . $claim['info'] . $CC . "\n";
  93. if ($claim['status'] == 1) {
  94. echo $GR . "[" . date("H:i:s") . "] MasukMass...! " . $claim['message'] . $CC . "\n";
  95. } elseif ($response['status'] == 0) {
  96. echo $RD . "[" . date("H:i:s") . "] GatotLae! " . $claim['message'] . $CC . "\n";
  97. }
  98. } else {
  99. exit("[" . date("H:i:s") . "] " . $RD . "Invalid cookies!" . $CC);
  100. }
  101. echo "[" . date("H:i:s") . "] Sleep for 60sec...\n";
  102. sleep(60);
  103. }
Add Comment
Please, Sign In to add comment