Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


Show other level

goto jQmMQ;
 mfabF: $conn->close();
 goto YaAD9;
	 j2apo: if (!$stmt) {
	 echo "Error preparing SQL statement: " . $conn->error;
	 
}
	 else {
	 $stmt->bind_param("s", $start_date);
	 $stmt->execute();
	 $stmt->bind_result($user_id, $total_amount);
	 $referralUsers2 = array();
		 while ($stmt->fetch()) {
		 $referralUsers2[] = array("user_id" => $user_id, "total_amount" => $total_amount);
		 
	}
		 if (!empty($referralUsers2)) {
		 applyRewards($referralUsers2, $rewards, $conn);
		 
	}
		 else {
		 echo "No top activity users found.<br>";
		 
	}
	 $stmt->close();
	 
}
 goto xUBer;
	 GhRq5: if ($conn->connect_error) {
	 die("Connection failed: " . $conn->connect_error);
	 
}
 goto wqdPO;
 bQbqu: $username = "khanifau_fauc225";
 goto yktPh;
 X3Ifb: $database = "khanifau_fauc225";
 goto jUPz8;
 bs1Ez: $sqlTopActivity = "SELECT user_id, SUM(amount) AS total_amount FROM (SELECT user_id, amount FROM autofaucet_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM faucet_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM link_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM offerwall_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM ptc_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM task_history WHERE claim_time >= ? AND user_id <> 0) AS combined_history GROUP BY user_id ORDER BY total_amount DESC LIMIT 7";
 goto qNXzE;
 yktPh: $password = "9F1Rc!GeMWC1";
 goto X3Ifb;
 Mgn9m: $sqlTopReferralLINK = "SELECT user_id, SUM(amount) as total_amount FROM link_history WHERE claim_time >= ? AND user_id <> 0 GROUP BY user_id ORDER BY total_amount DESC LIMIT 7";
 goto J8XVN;
	 m2mBe: if ($conn->query($sqlUpdate) === TRUE) {
	 echo "Leaderboard time updated successfully.";
	 
}
	 else {
	 echo "Error updating leaderboard time: " . $conn->error . "<br>";
	 
}
 goto mfabF;
	 cC7Tz: if (!$stmt) {
	 echo "Error preparing SQL statement: " . $conn->error;
	 
}
	 else {
	 $stmt->bind_param("s", $start_date);
	 $stmt->execute();
	 $stmt->bind_result($user_id, $total_amount);
	 $referralUsers = array();
		 while ($stmt->fetch()) {
		 $referralUsers[] = array("user_id" => $user_id, "total_amount" => $total_amount);
		 
	}
		 if (!empty($referralUsers)) {
		 applyRewards($referralUsers, $rewards, $conn);
		 
	}
		 else {
		 echo "No top link users found.<br>";
		 
	}
	 $stmt->close();
	 
}
 goto waqNf;
 wqdPO: $sqlStartDate = "SELECT value FROM settings WHERE name = 'leaderboard_time'";
 goto s05Rs;
	 ERPxH: if (!$stmt) {
	 echo "Error preparing SQL statement: " . $conn->error;
	 
}
	 else {
	 $stmt->bind_param("s", $start_date);
	 $stmt->execute();
	 $stmt->bind_result($referred_by, $total_referral);
	 $earnerUsers = array();
		 while ($stmt->fetch()) {
		 $earnerUsers[] = array("referred_by" => $referred_by, "total_referral" => $total_referral);
		 
	}
		 if (!empty($earnerUsers)) {
		 applyRewards2($earnerUsers, $rewards, $conn);
		 
	}
		 else {
		 echo "No top referral users found.<br>";
		 
	}
	 $stmt->close();
	 
}
 goto bs1Ez;
	 jsPDe: function applyRewards2($users, $rewards, $conn) {
		 foreach ($users as $index => $user) {
			 if (isset($rewards[$index])) {
			 $rewardAmount = $rewards[$index];
			 $userId = $user["referred_by"];
			 $sqlUpdateReward = "UPDATE users SET balance = balance + ? WHERE id = ?";
			 $stmt = $conn->prepare($sqlUpdateReward);
				 if ($stmt) {
				 $stmt->bind_param("di", $rewardAmount, $userId);
					 if ($stmt->execute()) {
						 echo "Reward applied to User ID {
						$userId
					}
						: {
						$rewardAmount
					}
						 coins for referring {
						$user["total_referral"]
					}
					 users<br>";
					 
				}
					 else {
						 echo "Error applying reward to User ID {
						$userId
					}
					: " . $stmt->error . "<br>";
					 
				}
				 $stmt->close();
				 
			}
				 else {
				 echo "Error preparing SQL statement: " . $conn->error . "<br>";
				 
			}
			 
		}
			 else {
				 echo "User at position {
				$index
			}
			 does not have a reward defined for total_referral<br>";
			 
		}
		 
	}
	 
}
 goto Mgn9m;
 jQmMQ: $servername = "localhost";
 goto bQbqu;
	 MurWA: function applyRewards($users, $rewards, $conn) {
		 foreach ($users as $index => $user) {
			 if (isset($rewards[$index])) {
			 $rewardAmount = $rewards[$index];
			 $userId = $user["user_id"];
				 $sqlUpdateReward = "UPDATE users SET balance = balance + {
				$rewardAmount
			}
				 WHERE id = {
				$userId
			}
			";
				 if ($conn->query($sqlUpdateReward) === TRUE) {
					 echo "Reward applied to User ID {
					$user["user_id"]
				}
					: {
					$rewardAmount
				}
				 coins for user_id <br>";
				 
			}
				 else {
					 echo "Error applying reward to User ID {
					$user["user_id"]
				}
				: for user_id " . $conn->error . "<br>";
				 
			}
			 
		}
			 else {
				 echo "User at position {
				$index
			}
			 does not have a reward defined for user_id <br>";
			 
		}
		 
	}
	 
}
 goto jsPDe;
 waqNf: $sqlTopEarnerReferral = "SELECT referred_by, COUNT(*) as total_referral FROM users WHERE registered_at >= ? AND referred_by IS NOT NULL AND referred_by <> 0 GROUP BY referred_by ORDER BY total_referral DESC LIMIT 7";
 goto U5H_n;
 oog3B: require "amounts.php";
 goto MurWA;
	 VQGL8: $sqlUpdate = "UPDATE settings SET value = {
	$currentTimestamp
}
 WHERE name = 'leaderboard_time'";
 goto m2mBe;
 jUPz8: $startDate = date("d m y");
 goto YzPpe;
	 lm_m7: if ($resultStartDate->num_rows > 0) {
	 $rowStartDate = $resultStartDate->fetch_assoc();
	 $start_date = $rowStartDate["value"];
	 
}
	 else {
	 die("Start date not found in settings table.");
	 
}
 goto oog3B;
 qNXzE: $stmt = $conn->prepare($sqlTopActivity);
 goto j2apo;
 U5H_n: $stmt = $conn->prepare($sqlTopEarnerReferral);
 goto ERPxH;
 s05Rs: $resultStartDate = $conn->query($sqlStartDate);
 goto lm_m7;
 J8XVN: $stmt = $conn->prepare($sqlTopReferralLINK);
 goto cC7Tz;
 YzPpe: $conn = new mysqli($servername, $username, $password, $database);
 goto GhRq5;
 xUBer: $currentTimestamp = time();
 goto VQGL8;
 YaAD9:

goto jQmMQ;
 mfabF: $conn->close();
 goto YaAD9;
	 j2apo: if (!$stmt) {
	 echo "Error preparing SQL statement: " . $conn->error;
	 
}
	 else {
	 $stmt->bind_param("s", $start_date);
	 $stmt->execute();
	 $stmt->bind_result($user_id, $total_amount);
	 $referralUsers2 = array();
		 while ($stmt->fetch()) {
		 $referralUsers2[] = array("user_id" => $user_id, "total_amount" => $total_amount);
		 
	}
		 if (!empty($referralUsers2)) {
		 applyRewards($referralUsers2, $rewards, $conn);
		 
	}
		 else {
		 echo "No top activity users found.<br>";
		 
	}
	 $stmt->close();
	 
}
 goto xUBer;
	 GhRq5: if ($conn->connect_error) {
	 die("Connection failed: " . $conn->connect_error);
	 
}
 goto wqdPO;
 bQbqu:  goto yktPh;
 X3Ifb:  goto jUPz8;
 bs1Ez: $sqlTopActivity = "SELECT user_id, SUM(amount) AS total_amount FROM (SELECT user_id, amount FROM autofaucet_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM faucet_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM link_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM offerwall_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM ptc_history WHERE claim_time >= ? AND user_id <> 0 UNION ALL SELECT user_id, amount FROM task_history WHERE claim_time >= ? AND user_id <> 0) AS combined_history GROUP BY user_id ORDER BY total_amount DESC LIMIT 7";
 goto qNXzE;
 yktPh: $password = "9F1Rc!GeMWC1";
 goto X3Ifb;
 Mgn9m: $sqlTopReferralLINK = "SELECT user_id, SUM(amount) as total_amount FROM link_history WHERE claim_time >= ? AND user_id <> 0 GROUP BY user_id ORDER BY total_amount DESC LIMIT 7";
 goto J8XVN;
	 m2mBe: if ($conn->query($sqlUpdate) === TRUE) {
	 echo "Leaderboard time updated successfully.";
	 
}
	 else {
	 echo "Error updating leaderboard time: " . $conn->error . "<br>";
	 
}
 goto mfabF;
	 cC7Tz: if (!$stmt) {
	 echo "Error preparing SQL statement: " . $conn->error;
	 
}
	 else {
	 $stmt->bind_param("s", $start_date);
	 $stmt->execute();
	 $stmt->bind_result($user_id, $total_amount);
	 $referralUsers = array();
		 while ($stmt->fetch()) {
		 $referralUsers[] = array("user_id" => $user_id, "total_amount" => $total_amount);
		 
	}
		 if (!empty($referralUsers)) {
		 applyRewards($referralUsers, $rewards, $conn);
		 
	}
		 else {
		 echo "No top link users found.<br>";
		 
	}
	 $stmt->close();
	 
}
 goto waqNf;
 wqdPO: $sqlStartDate = "SELECT value FROM settings WHERE name = 'leaderboard_time'";
 goto s05Rs;
	 ERPxH: if (!$stmt) {
	 echo "Error preparing SQL statement: " . $conn->error;
	 
}
	 else {
	 $stmt->bind_param("s", $start_date);
	 $stmt->execute();
	 $stmt->bind_result($referred_by, $total_referral);
	 $earnerUsers = array();
		 while ($stmt->fetch()) {
		 $earnerUsers[] = array("referred_by" => $referred_by, "total_referral" => $total_referral);
		 
	}
		 if (!empty($earnerUsers)) {
		 applyRewards2($earnerUsers, $rewards, $conn);
		 
	}
		 else {
		 echo "No top referral users found.<br>";
		 
	}
	 $stmt->close();
	 
}
 goto bs1Ez;
	 jsPDe: function applyRewards2($users, $rewards, $conn) {
		 foreach ($users as $index => $user) {
			 if (isset($rewards[$index])) {
			 $rewardAmount = $rewards[$index];
			 $userId = $user["referred_by"];
			 $sqlUpdateReward = "UPDATE users SET balance = balance + ? WHERE id = ?";
			 $stmt = $conn->prepare($sqlUpdateReward);
				 if ($stmt) {
				 $stmt->bind_param("di", $rewardAmount, $userId);
					 if ($stmt->execute()) {
						 echo "Reward applied to User ID {
						$userId
					}
						: {
						$rewardAmount
					}
						 coins for referring {
						$user["total_referral"]
					}
					 users<br>";
					 
				}
					 else {
						 echo "Error applying reward to User ID {
						$userId
					}
					: " . $stmt->error . "<br>";
					 
				}
				 $stmt->close();
				 
			}
				 else {
				 echo "Error preparing SQL statement: " . $conn->error . "<br>";
				 
			}
			 
		}
			 else {
				 echo "User at position {
				$index
			}
			 does not have a reward defined for total_referral<br>";
			 
		}
		 
	}
	 
}
 goto Mgn9m;
 jQmMQ:  goto bQbqu;
	 MurWA: function applyRewards($users, $rewards, $conn) {
		 foreach ($users as $index => $user) {
			 if (isset($rewards[$index])) {
			 $rewardAmount = $rewards[$index];
			 $userId = $user["user_id"];
				 $sqlUpdateReward = "UPDATE users SET balance = balance + {
				$rewardAmount
			}
				 WHERE id = {
				$userId
			}
			";
				 if ($conn->query($sqlUpdateReward) === TRUE) {
					 echo "Reward applied to User ID {
					$user["user_id"]
				}
					: {
					$rewardAmount
				}
				 coins for user_id <br>";
				 
			}
				 else {
					 echo "Error applying reward to User ID {
					$user["user_id"]
				}
				: for user_id " . $conn->error . "<br>";
				 
			}
			 
		}
			 else {
				 echo "User at position {
				$index
			}
			 does not have a reward defined for user_id <br>";
			 
		}
		 
	}
	 
}
 goto jsPDe;
 waqNf: $sqlTopEarnerReferral = "SELECT referred_by, COUNT(*) as total_referral FROM users WHERE registered_at >= ? AND referred_by IS NOT NULL AND referred_by <> 0 GROUP BY referred_by ORDER BY total_referral DESC LIMIT 7";
 goto U5H_n;
 oog3B: require "amounts.php";
 goto MurWA;
	 VQGL8: $sqlUpdate = "UPDATE settings SET value = {
	$currentTimestamp
}
 WHERE name = 'leaderboard_time'";
 goto m2mBe;
 jUPz8: $startDate = date("d m y");
 goto YzPpe;
	 lm_m7: if ($resultStartDate->num_rows > 0) {
	 $rowStartDate = $resultStartDate->fetch_assoc();
	 $start_date = $rowStartDate["value"];
	 
}
	 else {
	 die("Start date not found in settings table.");
	 
}
 goto oog3B;
 qNXzE: $stmt = $conn->prepare($sqlTopActivity);
 goto j2apo;
 U5H_n: $stmt = $conn->prepare($sqlTopEarnerReferral);
 goto ERPxH;
 s05Rs: $resultStartDate = $conn->query($sqlStartDate);
 goto lm_m7;
 J8XVN: $stmt = $conn->prepare($sqlTopReferralLINK);
 goto cC7Tz;
 YzPpe: $conn = new mysqli("localhost", "khanifau_fauc225", $password, "khanifau_fauc225");
 goto GhRq5;
 xUBer: $currentTimestamp = time();
 goto VQGL8;
 YaAD9:



© 2023 Quttera Ltd. All rights reserved.