From 756b27181e5b152dfb911264597c916e156caa80 Mon Sep 17 00:00:00 2001 From: jeff-cycode <163135025+jeff-cycode@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:47:14 -0500 Subject: [PATCH] Create jeff-high.php --- jeff-high.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 jeff-high.php 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}
"; +} + +?>