Code: Select all
<?php
//Store the output of the executed command
$output1 = exec('sngrep');
//Print the return value
echo $output1;
echo "<br/>";
?>
Couldn't open device any: any: You don't have permission to capture on that device (socket: Operation not permitted)
I tried a cgi script
Code: Select all
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html><head><title>Bash as CGI"
echo "</title></head><body>"
echo "<h1>SNGrep Terminal</h1>"
echo "<pre> $(sngrep) </pre>"
echo "</body></html>"
Is there anyway to do this? Not having to ssh into the system would be a big help.
Thanks