Ben bu denedim:
<?php
$r = shell_exec('sudo -u root -S /etc/init.d/apache2 restart < /home/$user/passfile');
echo $rin;
?>
(Passfile parola) alamadım
<?php
(php$output4=shell_exec('echo "$x" | whoami 1>/dev/null && sudo /etc/init.d/ssh restart');
?>
<html>
<body>
<script type="text/javascript">
x=prompt("entr");
</script>
<body>
</html>
<html>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="b1" value="click" />
</form>
</html>
<?php
if(isset($_POST['b1'])) {
echo "<pre>$output4</pre>";
}
?>
Lütfen yardım edin.