Exploit databaseDownload repository ZIP
GH-3a2ea64b82c348498847602b64555475
aherrer1/webapptest1
Sources for CVE-2023-39848
53 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
aherrer1/webapptest1Revision 8d6233ec1ab8
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
vulnerabilities/exec/source/medium.php
PHP · 600 bytes<?php
if( isset( $_POST[ 'Submit' ] ) ) {
// Get input
$target = $_REQUEST[ 'ip' ];
// Set blacklist
$substitutions = array(
'&&' => '',
';' => '',
);
// 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 ' . $target );
}
else {
// *nix
$cmd = shell_exec( 'ping -c 4 ' . $target );
}
// Feedback for the end user
$html .= "<pre>{$cmd}</pre>";
}
?>