HEX
Server: nginx/1.18.0
System: Linux iZj6c1ieg2jrpk1z5tzi19Z 6.3.9-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 21 22:18:40 EDT 2023 x86_64
User: www (1001)
PHP: 8.2.4
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.cytocare.cn/wp-content/plugins/peakshops-plugin/inc/misc.php
<?php
// Encoding.
if ( ! function_exists( 'thb_decode' ) ) {
	function thb_decode( $value ) {
		$func = 'base64' . '_decode';
		return $func( $value );
	}
}
// Remove Empty P tags.
function thb_remove_p( $content ) {
	$to_remove = array(
		'<p>['    => '[',
		']</p>'   => ']',
		']<br />' => ']',
	);

	$content = strtr( $content, $to_remove );
	return $content;
}
add_filter( 'the_content', 'thb_remove_p' );


// Remove VC-added P tags.
function thb_remove_vc_added_p( $content ) {
	if ( substr( $content, 0, 4 ) === '</p>' ) {
		$content = substr( $content, 4 );
	}
	if ( substr( $content, -3 ) === '<p>' ) {
		$content = substr( $content, 0, -3 );
	}
	return $content;
}

// P tag fix for certain shortcodes.
function thb_shortcode_empty_paragraph_fix( $content ) {
	$block = join( '|', array( 'thb_slidetype', 'thb_fadetype' ) );

	// opening tag.
	$rep = preg_replace( "/(<p>)?(\n|\r)?\[($block)(\s[^\]]+)?\](<\/p>|<br \/>)?/", '[$3$4]', $content );

	// closing tag.
	$rep = preg_replace( "/(<p>)?(\n|\r)?\[\/($block)](<\/p>|<br \/>)?/", '[/$3]', $rep );

	return $rep;
}
add_filter( 'the_content', 'thb_shortcode_empty_paragraph_fix' );

// Download Emails.
function thb_csv_export() {
	$download = filter_input( INPUT_GET, 'thb_download_emails', FILTER_SANITIZE_STRING );
	if ( $download && current_user_can( 'manage_options' ) ) {
		$filename = 'thb_subcribed_emails_' . time() . '.csv';

		// emails.
		$stack = get_option( 'subscribed_emails' );
		$fh    = @fopen( 'php://output', 'w' );

		header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
		header( 'Content-Description: File Transfer' );
		header( 'Content-type: text/csv' );
		header( "Content-Disposition: attachment; filename={$filename}" );
		header( 'Expires: 0' );
		header( 'Pragma: public' );

		foreach ( $stack as $line ) {
			$val = explode( ',', $line );
			fputcsv( $fh, $val );
		}

		fclose( $fh );
		die();
	}

}
add_action( 'admin_init', 'thb_csv_export' );