diff --git a/jeff-high.php b/jeff-high.php new file mode 100644 index 0000000..37fd739 --- /dev/null +++ b/jeff-high.php @@ -0,0 +1,37 @@ + '', + ';' => '', + '| ' => '', + '-' => '', + '$' => '', + '(' => '', + ')' => '', + '`' => '', + '||' => '', + ); + + // Remove any of the characters in the array (blacklist). + $target = str_replace( array_keys( $substitutions ), $substitutions, $target ); + + // Determine OS and execute the ping command. + if( stristr( php_uname( 's' ), 'Windows NT' ) ) { +// Windows + $cmd = shell_exec( 'ping ' . escapeshellarg($target) ); + } + else { + // *nix + $cmd = shell_exec( 'ping -c 4 ' . escapeshellarg($target) ); + } + + // Feedback for the end user + $html .= "
{$cmd}
"; +} + +?>