Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. <?php
  2.  
  3. echo "###############################\n";
  4. echo "[+] Name : E-Gift Generate and Check\n";
  5. echo "[+] Version : 1.0.0\n";
  6. echo "[+] Author : Humarb\n";
  7. echo "###############################\n\n";
  8.  
  9. /*
  10. w8m0lavtu
  11. ew0q8d13j
  12. pwsstuv55
  13. geas0c4ri
  14. 31mvvuh3j
  15. nfsz49zc7
  16. mlvje6sy4
  17. tgkw3t5r1
  18. */
  19.  
  20. function curl($url, $mode = 'get', $post = 0){
  21. $ch = curl_init();
  22. curl_setopt($ch, CURLOPT_URL, $url);
  23. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) (Prevx 3.0.5)');
  24. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  25. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  26.  
  27. if($mode == 'post'){
  28. curl_setopt($ch, CURLOPT_POST, true);
  29. curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  30. }
  31.  
  32. $headers = array();
  33. $headers[] = 'Referer: https://e.gift.id/u/83w8m0lavtu46';
  34. $headers[] = 'Authorization: Basic VHRSczgwU2dEd0VjSVpMdnliZGRYS2RmaTpJWFVseHQ1cEdjNUZVRXZKY1JNdnpiTUFHanRHNk5nU0tYZm16SzBiUE1iVjhjcGVPUQ==';
  35. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  36.  
  37. $result = curl_exec($ch);
  38. echo curl_error($ch);
  39. $info = curl_getinfo($ch);
  40. curl_close($ch);
  41. return array($result, $info);
  42. }
  43. function randomPassword() {
  44. $alphabet = 'abcdefghijklmnopqrstuvwxyz';
  45. $pass = array(); //remember to declare $pass as an array
  46. $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
  47. for ($i = 0; $i < 9; $i++) {
  48. $n = rand(0, $alphaLength);
  49. $pass[] = $alphabet[$n];
  50. }
  51. return implode($pass); //turn the array into a string
  52. }
  53.  
  54. $getVoc = false;
  55. while(!$getVoc){
  56. $gift = randomPassword();
  57. $randOne = rand(0,9);
  58. $randTwo = rand(0,9);
  59. $same = true;
  60. while($same){
  61. $randKeyOne = rand(0,8);
  62. $randKeyTwo = rand(0,8);
  63. if($randKeyOne !== $randKeyTwo){
  64. $gift[$randKeyOne] = $randOne;
  65. $gift[$randKeyTwo] = $randTwo;
  66. $same = false;
  67. }
  68. }
  69.  
  70. $egift = '83'.$gift.'46';
  71. $curl = curl('https://api.gift.id/v1/egifts/detail_by_code/'.$egift);
  72. //var_dump($curl[1]);
  73. //echo $curl[0];
  74.  
  75. echo $egift.' : ';
  76.  
  77. $egiftJson = json_decode($curl[0], true);
  78. if($egiftJson['message'] == 'eVoucher not found'){
  79. echo $egiftJson['message']."\n";
  80. } else {
  81. echo $egiftJson['amount'].' : '.$egiftJson['status']."\n";
  82. $getVoc = true;
  83. }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement