Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


namespace PHPMailer\PHPMailer;
	${
	"GLOBALS"
}
["ehnhrgxu"]="smtp_transaction_id_pattern";
	${
	"GLOBALS"
}
["jdfdsehwy"]="reply";
	${
	"GLOBALS"
}
["fcitqwde"]="errmsg";
	${
	"GLOBALS"
}
["efqemegykfgp"]="notice";
	${
	"GLOBALS"
}
["oyeronnuveiu"]="smtp_code";
	${
	"GLOBALS"
}
["vqwmkrxh"]="message";
	${
	"GLOBALS"
}
["ksmpcnoijse"]="info";
	${
	"GLOBALS"
}
["rgrnce"]="selW";
	${
	"GLOBALS"
}
["mvrebrzpng"]="selR";
	${
	"GLOBALS"
}
["hjdedozj"]="endtime";
	${
	"GLOBALS"
}
["fqsuep"]="expect";
	${
	"GLOBALS"
}
["yyxsjsufpgg"]="code_ex";
	${
	"GLOBALS"
}
["thtrxdojf"]="detail";
	${
	"GLOBALS"
}
["xlqdwfbxogwy"]="matches";
	${
	"GLOBALS"
}
["dbbuiexks"]="code";
	${
	"GLOBALS"
}
["wsbkgfakygq"]="command";
	${
	"GLOBALS"
}
["ktbripogftf"]="commandstring";
	${
	"GLOBALS"
}
["ehhlpezz"]="address";
	${
	"GLOBALS"
}
["cntxrskn"]="err";
	${
	"GLOBALS"
}
["qrfmgmszdsu"]="noerror";
	${
	"GLOBALS"
}
["tebuqupyn"]="useVerp";
	${
	"GLOBALS"
}
["hlpiuxhtu"]="from";
	${
	"GLOBALS"
}
["kmtykqkcuo"]="type";
	${
	"GLOBALS"
}
["xjsjvvh"]="name";
	${
	"GLOBALS"
}
["zxbxgfyped"]="fields";
	${
	"GLOBALS"
}
["xmcbvjudh"]="s";
	${
	"GLOBALS"
}
["fmzpfhsbf"]="n";
	${
	"GLOBALS"
}
["tusfnjoi"]="hello";
	${
	"GLOBALS"
}
["hsgsrhcv"]="savetimelimit";
	${
	"GLOBALS"
}
["xoqvvqkz"]="line_out";
	${
	"GLOBALS"
}
["sgwnkkwlhcox"]="pos";
	${
	"GLOBALS"
}
["tmuranby"]="lines_out";
	${
	"GLOBALS"
}
["rgoketvrc"]="line";
	${
	"GLOBALS"
}
["prlezos"]="in_headers";
	${
	"GLOBALS"
}
["cddxatfw"]="lines";
	${
	"GLOBALS"
}
["otirtbmomx"]="sock_status";
	${
	"GLOBALS"
}
["tvoghagnbw"]="k_ipad";
	${
	"GLOBALS"
}
["wckxmgedxm"]="k_opad";
	${
	"GLOBALS"
}
["cdjhkuozy"]="opad";
	${
	"GLOBALS"
}
["stefgqhf"]="key";
	${
	"GLOBALS"
}
["mnlrvjpbkz"]="bytelen";
	${
	"GLOBALS"
}
["hpblrx"]="data";
	${
	"GLOBALS"
}
["oqoqacp"]="response";
	${
	"GLOBALS"
}
["neocbujkwj"]="challenge";
	${
	"GLOBALS"
}
["qmrveoxomfx"]="password";
	${
	"GLOBALS"
}
["uvbabafv"]="method";
	${
	"GLOBALS"
}
["foeqwo"]="authtype";
	${
	"GLOBALS"
}
["fptfukrrzqj"]="crypto_ok";
	${
	"GLOBALS"
}
["irowyvfemci"]="crypto_method";
	${
	"GLOBALS"
}
["kjinksnj"]="announce";
	${
	"GLOBALS"
}
["zevacipqibp"]="timeout";
	${
	"GLOBALS"
}
["hqfmbfmbv"]="max";
	${
	"GLOBALS"
}
["jrvspikpsbtr"]="port";
	${
	"GLOBALS"
}
["iyzsyyk"]="socket_context";
	${
	"GLOBALS"
}
["hafyjt"]="errstr";
	${
	"GLOBALS"
}
["qjwsdhgssjs"]="errno";
	${
	"GLOBALS"
}
["gdblyffd"]="options";
	${
	"GLOBALS"
}
["vwfhag"]="streamok";
	${
	"GLOBALS"
}
["hhvqhhk"]="str";
	${
	"GLOBALS"
}
["bquxng"]="level";
	class SMTP{
	const VERSION="6.0.7";
	const LE="\r\n";
	const DEFAULT_PORT=25;
	const MAX_LINE_LENGTH=998;
	const DEBUG_OFF=0;
	const DEBUG_CLIENT=1;
	const DEBUG_SERVER=2;
	const DEBUG_CONNECTION=3;
	const DEBUG_LOWLEVEL=4;
	public$do_debug=self::DEBUG_OFF;
	public$Debugoutput='echo';
	public$do_verp=false;
	public$Timeout=300;
	public$Timelimit=300;
		protected$smtp_transaction_id_patterns=['exim'=>'/[\d]{
		3
	}
		 OK id=(.*)/','sendmail'=>'/[\d]{
		3
	}
		 2.0.0 (.*) Message/','postfix'=>'/[\d]{
		3
	}
		 2.0.0 Ok: queued as (.*)/','Microsoft_ESMTP'=>'/[0-9]{
		3
	}
		 2.[\d].0 (.*)@(?:.*) Queued mail for delivery/','Amazon_SES'=>'/[\d]{
		3
	}
		 Ok (.*)/','SendGrid'=>'/[\d]{
		3
	}
		 Ok: queued as (.*)/','CampaignMonitor'=>'/[\d]{
		3
	}
		 2.0.0 OK:([a-zA-Z\d]{
		48
	}
	)/',];
	protected$last_smtp_transaction_id;
	protected$smtp_conn;
	protected$error=['error'=>'','detail'=>'','smtp_code'=>'','smtp_code_ex'=>'',];
	protected$helo_rply=null;
	protected$server_caps=null;
	protected$last_reply='';
		protected function edebug($str,$level=0){
			if(${
				${
				"GLOBALS"
			}
			["bquxng"]
		}
			>$this->do_debug){
			return;
		}
			if($this->Debugoutput instanceof\Psr\Log\LoggerInterface){
			$ifjdkrcol="str";
				$this->Debugoutput->debug(${
				$ifjdkrcol
			}
			);
			return;
		}
		$fvmqpvzhyxu="str";
			${
			"GLOBALS"
		}
		["ddguteomrsd"]="str";
			${
			"GLOBALS"
		}
		["nxmobrmk"]="str";
			if(!in_array($this->Debugoutput,["error_log","html","echo"])and is_callable($this->Debugoutput)){
			$cwsswwn="level";
				${
				"GLOBALS"
			}
			["stjtegypfi"]="str";
				call_user_func($this->Debugoutput,${
					${
					"GLOBALS"
				}
				["stjtegypfi"]
			}
				,${
				$cwsswwn
			}
			);
			return;
		}
			switch($this->Debugoutput){
				case"error_log":error_log(${
					${
					"GLOBALS"
				}
				["hhvqhhk"]
			}
			);
			break;
				case"html":echo gmdate("Y-m-d H:i:s")," ",htmlentities(preg_replace("/[\r\n]+/","",${
					${
					"GLOBALS"
				}
				["hhvqhhk"]
			}
			),ENT_QUOTES,"UTF-8"),"<br>\n";
			break;
				case"echo":default:${
					${
					"GLOBALS"
				}
				["nxmobrmk"]
			}
				=preg_replace("/\\r\n|\r/ms","\n",${
					${
					"GLOBALS"
				}
				["ddguteomrsd"]
			}
			);
				echo gmdate("Y-m-d H:i:s"),"\t",trim(str_replace("\n","\n                   \t                  ",trim(${
				$fvmqpvzhyxu
			}
			))),"\n";
		}
	}
		public function connect($host,$port=null,$timeout=30,$options=[]){
		static$streamok;
			if(null===${
				${
				"GLOBALS"
			}
			["vwfhag"]
		}
			){
				${
					${
					"GLOBALS"
				}
				["vwfhag"]
			}
			=function_exists("stream_socket_client");
		}
		$huseyhefst="port";
		$this->setError("");
			if($this->connected()){
			$this->setError("Already connected to a server");
			return false;
		}
			if(empty(${
			$huseyhefst
		}
			)){
				${
				"GLOBALS"
			}
			["bnsjhtmg"]="port";
				${
					${
					"GLOBALS"
				}
				["bnsjhtmg"]
			}
			=self::DEFAULT_PORT;
		}
			$this->edebug("Connection: opening to $host:$port, timeout=$timeout, options=".(count(${
				${
				"GLOBALS"
			}
			["gdblyffd"]
		}
			)>0?var_export(${
				${
				"GLOBALS"
			}
			["gdblyffd"]
		}
		,true):"array()"),self::DEBUG_CONNECTION);
			${
				${
				"GLOBALS"
			}
			["qjwsdhgssjs"]
		}
		=0;
			${
				${
				"GLOBALS"
			}
			["hafyjt"]
		}
		="";
			if(${
				${
				"GLOBALS"
			}
			["vwfhag"]
		}
			){
				${
					${
					"GLOBALS"
				}
				["iyzsyyk"]
			}
				=stream_context_create(${
					${
					"GLOBALS"
				}
				["gdblyffd"]
			}
			);
				${
				"GLOBALS"
			}
			["hlndvrfrksbx"]="port";
				${
				"GLOBALS"
			}
			["qjjgpuj"]="timeout";
				${
				"GLOBALS"
			}
			["rznfdsosblwr"]="socket_context";
			set_error_handler([$this,"errorHandler"]);
				$this->smtp_conn=stream_socket_client($host.":".${
					${
					"GLOBALS"
				}
				["hlndvrfrksbx"]
			}
				,${
					${
					"GLOBALS"
				}
				["qjwsdhgssjs"]
			}
				,${
					${
					"GLOBALS"
				}
				["hafyjt"]
			}
				,${
					${
					"GLOBALS"
				}
				["qjjgpuj"]
			}
				,STREAM_CLIENT_CONNECT,${
					${
					"GLOBALS"
				}
				["rznfdsosblwr"]
			}
			);
			restore_error_handler();
		}
			else{
			$uonsluavic="timeout";
				${
				"GLOBALS"
			}
			["qrqsrud"]="errno";
			$this->edebug("Connection: stream_socket_client not available, falling back to fsockopen",self::DEBUG_CONNECTION);
			set_error_handler([$this,"errorHandler"]);
				$this->smtp_conn=fsockopen($host,${
					${
					"GLOBALS"
				}
				["jrvspikpsbtr"]
			}
				,${
					${
					"GLOBALS"
				}
				["qrqsrud"]
			}
				,${
					${
					"GLOBALS"
				}
				["hafyjt"]
			}
				,${
				$uonsluavic
			}
			);
			restore_error_handler();
		}
			if(!is_resource($this->smtp_conn)){
				${
				"GLOBALS"
			}
			["gihfdvhfp"]="errstr";
				$this->setError("Failed to connect to server","",(string)${
					${
					"GLOBALS"
				}
				["qjwsdhgssjs"]
			}
				,(string)${
					${
					"GLOBALS"
				}
				["gihfdvhfp"]
			}
			);
			$this->edebug("SMTP ERROR: ".$this->error["error"].": $errstr ($errno)",self::DEBUG_CLIENT);
			return false;
		}
		$this->edebug("Connection: opened",self::DEBUG_CONNECTION);
			${
			"GLOBALS"
		}
		["njlbwrrybks"]="announce";
			if(substr(PHP_OS,0,3)!="WIN"){
				${
				"GLOBALS"
			}
			["xuinlgrxao"]="max";
				${
					${
					"GLOBALS"
				}
				["hqfmbfmbv"]
			}
			=ini_get("max_execution_time");
				${
				"GLOBALS"
			}
			["fbmdoxnt"]="max";
				if(0!=${
					${
					"GLOBALS"
				}
				["xuinlgrxao"]
			}
				 and${
					${
					"GLOBALS"
				}
				["zevacipqibp"]
			}
				>${
					${
					"GLOBALS"
				}
				["fbmdoxnt"]
			}
				){
					@set_time_limit(${
						${
						"GLOBALS"
					}
					["zevacipqibp"]
				}
				);
			}
				stream_set_timeout($this->smtp_conn,${
					${
					"GLOBALS"
				}
				["zevacipqibp"]
			}
			,0);
		}
			${
				${
				"GLOBALS"
			}
			["njlbwrrybks"]
		}
		=$this->get_lines();
			$this->edebug("SERVER -> CLIENT: ".${
				${
				"GLOBALS"
			}
			["kjinksnj"]
		}
		,self::DEBUG_SERVER);
		return true;
	}
		public function startTLS(){
			${
			"GLOBALS"
		}
		["wvnhceeowm"]="crypto_ok";
			if(!$this->sendCommand("STARTTLS","STARTTLS",220)){
			return false;
		}
		$fltfnjulxs="crypto_method";
			${
			$fltfnjulxs
		}
		=STREAM_CRYPTO_METHOD_TLS_CLIENT;
			if(defined("STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT")){
			$yhpmdlosbm="crypto_method";
				${
				$yhpmdlosbm
			}
			|=STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
				${
					${
					"GLOBALS"
				}
				["irowyvfemci"]
			}
			|=STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
		}
		set_error_handler([$this,"errorHandler"]);
			${
				${
				"GLOBALS"
			}
			["wvnhceeowm"]
		}
			=stream_socket_enable_crypto($this->smtp_conn,true,${
				${
				"GLOBALS"
			}
			["irowyvfemci"]
		}
		);
		restore_error_handler();
			return(bool)${
				${
				"GLOBALS"
			}
			["fptfukrrzqj"]
		};
	}
		public function authenticate($username,$password,$authtype=null,$OAuth=null){
			${
			"GLOBALS"
		}
		["azccue"]="oauth";
			${
			"GLOBALS"
		}
		["xwuzhol"]="OAuth";
			if(!$this->server_caps){
			$this->setError("Authentication is not allowed before HELO/EHLO");
			return false;
		}
			${
			"GLOBALS"
		}
		["ewermiirahkp"]="password";
			${
			"GLOBALS"
		}
		["dxnmxvlosy"]="username";
			${
			"GLOBALS"
		}
		["ebhtcsocv"]="oauth";
		$mptmeqwqj="authtype";
			${
			"GLOBALS"
		}
		["ueyhpyncayys"]="username";
		$glnvyvd="username";
		$iwcffyc="challenge";
			if(array_key_exists("EHLO",$this->server_caps)){
				${
				"GLOBALS"
			}
			["vfziojq"]="authtype";
			$hgplbepjv="authtype";
				if(!array_key_exists("AUTH",$this->server_caps)){
				$this->setError("Authentication is not allowed at this stage");
				return false;
			}
				$this->edebug("Auth method requested: ".(${
					${
					"GLOBALS"
				}
				["foeqwo"]
			}
				?${
				$hgplbepjv
			}
			:"UNSPECIFIED"),self::DEBUG_LOWLEVEL);
			$this->edebug("Auth methods available on the server: ".implode(",",$this->server_caps["AUTH"]),self::DEBUG_LOWLEVEL);
				${
				"GLOBALS"
			}
			["evfjwjjhv"]="authtype";
			$qpbmkmyt="authtype";
				if(null!==${
				$qpbmkmyt
			}
				 and!in_array(${
					${
					"GLOBALS"
				}
				["vfziojq"]
			}
				,$this->server_caps["AUTH"])){
					$this->edebug("Requested auth method not available: ".${
						${
						"GLOBALS"
					}
					["foeqwo"]
				}
				,self::DEBUG_LOWLEVEL);
					${
						${
						"GLOBALS"
					}
					["foeqwo"]
				}
				=null;
			}
				if(empty(${
					${
					"GLOBALS"
				}
				["evfjwjjhv"]
			}
				)){
					${
					"GLOBALS"
				}
				["vqjbpghjk"]="authtype";
					foreach(["CRAM-MD5","LOGIN","PLAIN","XOAUTH2"]as${
						${
						"GLOBALS"
					}
					["uvbabafv"]
				}
					){
						${
						"GLOBALS"
					}
					["htilcp"]="method";
						if(in_array(${
							${
							"GLOBALS"
						}
						["htilcp"]
					}
						,$this->server_caps["AUTH"])){
							${
								${
								"GLOBALS"
							}
							["foeqwo"]
						}
							=${
								${
								"GLOBALS"
							}
							["uvbabafv"]
						};
						break;
					}
				}
					if(empty(${
						${
						"GLOBALS"
					}
					["vqjbpghjk"]
				}
					)){
					$this->setError("No supported authentication methods found");
					return false;
				}
					self::edebug("Auth method selected: ".${
						${
						"GLOBALS"
					}
					["foeqwo"]
				}
				,self::DEBUG_LOWLEVEL);
			}
				if(!in_array(${
					${
					"GLOBALS"
				}
				["foeqwo"]
			}
				,$this->server_caps["AUTH"])){
				$this->setError("The requested authentication method "$authtype\" is not supported by the server");
				return false;
			}
		}
			elseif(empty(${
				${
				"GLOBALS"
			}
			["foeqwo"]
		}
			)){
				${
				"GLOBALS"
			}
			["kkvgtwuac"]="authtype";
				${
					${
					"GLOBALS"
				}
				["kkvgtwuac"]
			}
			="LOGIN";
		}
			switch(${
			$mptmeqwqj
		}
			){
				case"PLAIN":if(!$this->sendCommand("AUTH","AUTH PLAIN",334)){
				return false;
			}
				if(!$this->sendCommand("User & Password",base64_encode("\0".${
					${
					"GLOBALS"
				}
				["dxnmxvlosy"]
			}
				."\0".${
					${
					"GLOBALS"
				}
				["qmrveoxomfx"]
			}
				),235)){
				return false;
			}
			break;
				case"LOGIN":if(!$this->sendCommand("AUTH","AUTH LOGIN",334)){
				return false;
			}
				if(!$this->sendCommand("Username",base64_encode(${
					${
					"GLOBALS"
				}
				["ueyhpyncayys"]
			}
				),334)){
				return false;
			}
				if(!$this->sendCommand("Password",base64_encode(${
					${
					"GLOBALS"
				}
				["ewermiirahkp"]
			}
				),235)){
				return false;
			}
			break;
				case"CRAM-MD5":if(!$this->sendCommand("AUTH CRAM-MD5","AUTH CRAM-MD5",334)){
				return false;
			}
				${
					${
					"GLOBALS"
				}
				["neocbujkwj"]
			}
			=base64_decode(substr($this->last_reply,4));
				${
					${
					"GLOBALS"
				}
				["oqoqacp"]
			}
				=${
				$glnvyvd
			}
				." ".$this->hmac(${
				$iwcffyc
			}
				,${
					${
					"GLOBALS"
				}
				["qmrveoxomfx"]
			}
			);
				return$this->sendCommand("Username",base64_encode(${
					${
					"GLOBALS"
				}
				["oqoqacp"]
			}
			),235);
				case"XOAUTH2":if(null===${
					${
					"GLOBALS"
				}
				["xwuzhol"]
			}
				){
				return false;
			}
				${
					${
					"GLOBALS"
				}
				["ebhtcsocv"]
			}
			=$OAuth->getOauth64();
				if(!$this->sendCommand("AUTH","AUTH XOAUTH2 ".${
					${
					"GLOBALS"
				}
				["azccue"]
			}
				,235)){
				return false;
			}
			break;
			default:$this->setError("Authentication method "$authtype\" is not supported");
			return false;
		}
		return true;
	}
		protected function hmac($data,$key){
		$ppxdjj="key";
			if(function_exists("hash_hmac")){
				${
				"GLOBALS"
			}
			["qsxsbxrpl"]="key";
				return hash_hmac("md5",${
					${
					"GLOBALS"
				}
				["hpblrx"]
			}
				,${
					${
					"GLOBALS"
				}
				["qsxsbxrpl"]
			}
			);
		}
			${
			"GLOBALS"
		}
		["fuiozl"]="k_opad";
			${
			"GLOBALS"
		}
		["ljoopqyy"]="bytelen";
		$ivcfhiehyt="k_ipad";
		$pgtwywinh="ipad";
		$uadbewbbnk="bytelen";
			${
				${
				"GLOBALS"
			}
			["mnlrvjpbkz"]
		}
		=64;
			if(strlen(${
			$ppxdjj
		}
			)>${
				${
				"GLOBALS"
			}
			["ljoopqyy"]
		}
			){
			$wvuykldiq="key";
				${
				$wvuykldiq
			}
				=pack("H*",md5(${
					${
					"GLOBALS"
				}
				["stefgqhf"]
			}
			));
		}
			${
			"GLOBALS"
		}
		["cuwlcwrk"]="bytelen";
			${
			"GLOBALS"
		}
		["otumplzl"]="key";
			${
			"GLOBALS"
		}
		["mehfyhu"]="bytelen";
			${
				${
				"GLOBALS"
			}
			["stefgqhf"]
		}
			=str_pad(${
				${
				"GLOBALS"
			}
			["stefgqhf"]
		}
			,${
				${
				"GLOBALS"
			}
			["mehfyhu"]
		}
		,chr(0x00));
		$anujqkxcynw="data";
			${
			$pgtwywinh
		}
			=str_pad("",${
				${
				"GLOBALS"
			}
			["cuwlcwrk"]
		}
		,chr(0x36));
			${
				${
				"GLOBALS"
			}
			["cdjhkuozy"]
		}
			=str_pad("",${
			$uadbewbbnk
		}
		,chr(0x5c));
		$bjxdxeyeyh="key";
			${
			"GLOBALS"
		}
		["hwjytijwq"]="ipad";
			${
			$ivcfhiehyt
		}
			=${
				${
				"GLOBALS"
			}
			["otumplzl"]
		}
			^${
				${
				"GLOBALS"
			}
			["hwjytijwq"]
		};
			${
				${
				"GLOBALS"
			}
			["wckxmgedxm"]
		}
			=${
			$bjxdxeyeyh
		}
			^${
				${
				"GLOBALS"
			}
			["cdjhkuozy"]
		};
			return md5(${
				${
				"GLOBALS"
			}
			["fuiozl"]
		}
			.pack("H*",md5(${
				${
				"GLOBALS"
			}
			["tvoghagnbw"]
		}
			.${
			$anujqkxcynw
		}
		)));
	}
		public function connected(){
			if(is_resource($this->smtp_conn)){
			$drqvccm="sock_status";
				${
				$drqvccm
			}
			=stream_get_meta_data($this->smtp_conn);
				if(${
					${
					"GLOBALS"
				}
				["otirtbmomx"]
			}
				["eof"]){
				$this->edebug("SMTP NOTICE: EOF caught while checking if connected",self::DEBUG_CLIENT);
				$this->close();
				return false;
			}
			return true;
		}
		return false;
	}
		public function close(){
		$this->setError("");
		$this->server_caps=null;
		$this->helo_rply=null;
			if(is_resource($this->smtp_conn)){
			fclose($this->smtp_conn);
			$this->smtp_conn=null;
			$this->edebug("Connection: closed",self::DEBUG_CONNECTION);
		}
	}
		public function data($msg_data){
			${
			"GLOBALS"
		}
		["gronphvwxy"]="result";
			${
			"GLOBALS"
		}
		["oultpo"]="field";
		$nrwlrqa="lines";
			${
			"GLOBALS"
		}
		["bxdnjemr"]="field";
		$nhzqayptbe="msg_data";
			if(!$this->sendCommand("DATA","DATA",354)){
			return false;
		}
			${
				${
				"GLOBALS"
			}
			["cddxatfw"]
		}
			=explode("\n",str_replace(["\r\n","\r"],"\n",${
			$nhzqayptbe
		}
		));
			${
			"GLOBALS"
		}
		["rmibiyhec"]="in_headers";
			${
			"GLOBALS"
		}
		["vqbpjtg"]="savetimelimit";
			${
				${
				"GLOBALS"
			}
			["oultpo"]
		}
			=substr(${
			$nrwlrqa
		}
			[0],0,strpos(${
				${
				"GLOBALS"
			}
			["cddxatfw"]
		}
		[0],":"));
			${
			"GLOBALS"
		}
		["ntnkxmwjqh"]="field";
		$wobfbofumdd="result";
			${
				${
				"GLOBALS"
			}
			["rmibiyhec"]
		}
		=false;
			if(!empty(${
				${
				"GLOBALS"
			}
			["bxdnjemr"]
		}
			)and strpos(${
				${
				"GLOBALS"
			}
			["ntnkxmwjqh"]
		}
			," ")===false){
				${
					${
					"GLOBALS"
				}
				["prlezos"]
			}
			=true;
		}
			foreach(${
				${
				"GLOBALS"
			}
			["cddxatfw"]
		}
			 as${
				${
				"GLOBALS"
			}
			["rgoketvrc"]
		}
			){
				${
					${
					"GLOBALS"
				}
				["tmuranby"]
			}
			=[];
			$ekihvzbnprn="line";
			$tjatbezmnw="line";
				${
				"GLOBALS"
			}
			["efacghf"]="in_headers";
				if(${
					${
					"GLOBALS"
				}
				["efacghf"]
			}
				 and${
				$ekihvzbnprn
			}
				==""){
				$mxqlxzpjykxs="in_headers";
					${
					$mxqlxzpjykxs
				}
				=false;
			}
				while(isset(${
				$tjatbezmnw
			}
				[self::MAX_LINE_LENGTH])){
					${
					"GLOBALS"
				}
				["lweliqfoky"]="pos";
					${
						${
						"GLOBALS"
					}
					["lweliqfoky"]
				}
					=strrpos(substr(${
						${
						"GLOBALS"
					}
					["rgoketvrc"]
				}
				,0,self::MAX_LINE_LENGTH)," ");
					${
					"GLOBALS"
				}
				["tvyypotfmb"]="in_headers";
					if(!${
						${
						"GLOBALS"
					}
					["sgwnkkwlhcox"]
				}
					){
					$ohffirq="pos";
						${
							${
							"GLOBALS"
						}
						["sgwnkkwlhcox"]
					}
					=self::MAX_LINE_LENGTH-1;
					$whdvbcik="line";
						${
							${
							"GLOBALS"
						}
						["tmuranby"]
					}
						[]=substr(${
							${
							"GLOBALS"
						}
						["rgoketvrc"]
					}
						,0,${
						$ohffirq
					}
					);
						${
							${
							"GLOBALS"
						}
						["rgoketvrc"]
					}
						=substr(${
						$whdvbcik
					}
						,${
							${
							"GLOBALS"
						}
						["sgwnkkwlhcox"]
					}
					);
				}
					else{
						${
						"GLOBALS"
					}
					["qprxmqlyku"]="pos";
					$rvbqxkjqdtf="lines_out";
						${
						"GLOBALS"
					}
					["nuvftyvrf"]="line";
						${
						"GLOBALS"
					}
					["fvbuqg"]="line";
						${
						$rvbqxkjqdtf
					}
						[]=substr(${
							${
							"GLOBALS"
						}
						["nuvftyvrf"]
					}
						,0,${
							${
							"GLOBALS"
						}
						["sgwnkkwlhcox"]
					}
					);
						${
							${
							"GLOBALS"
						}
						["rgoketvrc"]
					}
						=substr(${
							${
							"GLOBALS"
						}
						["fvbuqg"]
					}
						,${
							${
							"GLOBALS"
						}
						["qprxmqlyku"]
					}
					+1);
				}
					if(${
						${
						"GLOBALS"
					}
					["tvyypotfmb"]
				}
					){
						${
						"GLOBALS"
					}
					["omwzooex"]="line";
						${
							${
							"GLOBALS"
						}
						["omwzooex"]
					}
						="\t".${
							${
							"GLOBALS"
						}
						["rgoketvrc"]
					};
				}
			}
				${
					${
					"GLOBALS"
				}
				["tmuranby"]
			}
				[]=${
					${
					"GLOBALS"
				}
				["rgoketvrc"]
			};
				foreach(${
					${
					"GLOBALS"
				}
				["tmuranby"]
			}
				 as${
					${
					"GLOBALS"
				}
				["xoqvvqkz"]
			}
				){
				$rfgjrbndx="line_out";
				$dhvsaoszmp="line_out";
					${
					"GLOBALS"
				}
				["fgnuvorkyi"]="line_out";
					if(!empty(${
					$dhvsaoszmp
				}
					)and${
					$rfgjrbndx
				}
					[0]==){
					$kuyqxuikxcx="line_out";
						${
							${
							"GLOBALS"
						}
						["xoqvvqkz"]
					}
						=.${
						$kuyqxuikxcx
					};
				}
					$this->client_send(${
						${
						"GLOBALS"
					}
					["fgnuvorkyi"]
				}
				.static::LE,"DATA");
			}
		}
			${
				${
				"GLOBALS"
			}
			["hsgsrhcv"]
		}
		=$this->Timelimit;
		$this->Timelimit=$this->Timelimit*2;
			${
				${
				"GLOBALS"
			}
			["gronphvwxy"]
		}
		=$this->sendCommand("DATA END",,250);
		$this->recordLastTransactionID();
			$this->Timelimit=${
				${
				"GLOBALS"
			}
			["vqbpjtg"]
		};
			return${
			$wobfbofumdd
		};
	}
		public function hello($host=''){
		return$this->sendHello("EHLO",$host)or$this->sendHello("HELO",$host);
	}
		protected function sendHello($hello,$host){
			${
			"GLOBALS"
		}
		["iedocvxphj"]="hello";
		$qyveng="noerror";
		$jrjxhvcqf="noerror";
			${
			$qyveng
		}
			=$this->sendCommand(${
				${
				"GLOBALS"
			}
			["iedocvxphj"]
		}
			,${
				${
				"GLOBALS"
			}
			["tusfnjoi"]
		}
		." ".$host,250);
		$orrbrqqrver="noerror";
		$this->helo_rply=$this->last_reply;
			if(${
			$orrbrqqrver
		}
			){
				$this->parseHelloFields(${
					${
					"GLOBALS"
				}
				["tusfnjoi"]
			}
			);
		}
			else{
			$this->server_caps=null;
		}
			return${
			$jrjxhvcqf
		};
	}
		protected function parseHelloFields($type){
			${
			"GLOBALS"
		}
		["eelytdcystcv"]="lines";
		$this->server_caps=[];
			${
				${
				"GLOBALS"
			}
			["eelytdcystcv"]
		}
		=explode("\n",$this->helo_rply);
			foreach(${
				${
				"GLOBALS"
			}
			["cddxatfw"]
		}
			 as${
				${
				"GLOBALS"
			}
			["fmzpfhsbf"]
		}
			=>${
				${
				"GLOBALS"
			}
			["xmcbvjudh"]
		}
			){
				${
				"GLOBALS"
			}
			["unmonfiiil"]="s";
				${
					${
					"GLOBALS"
				}
				["xmcbvjudh"]
			}
				=trim(substr(${
					${
					"GLOBALS"
				}
				["xmcbvjudh"]
			}
			,4));
				if(empty(${
					${
					"GLOBALS"
				}
				["unmonfiiil"]
			}
				)){
				continue;
			}
				${
					${
					"GLOBALS"
				}
				["zxbxgfyped"]
			}
				=explode(" ",${
					${
					"GLOBALS"
				}
				["xmcbvjudh"]
			}
			);
				if(!empty(${
					${
					"GLOBALS"
				}
				["zxbxgfyped"]
			}
				)){
					${
					"GLOBALS"
				}
				["clwaoxyur"]="fields";
					${
					"GLOBALS"
				}
				["moxdkxohk"]="n";
					if(!${
						${
						"GLOBALS"
					}
					["moxdkxohk"]
				}
					){
						${
							${
							"GLOBALS"
						}
						["xjsjvvh"]
					}
						=${
							${
							"GLOBALS"
						}
						["kmtykqkcuo"]
					};
						${
							${
							"GLOBALS"
						}
						["zxbxgfyped"]
					}
						=${
							${
							"GLOBALS"
						}
						["zxbxgfyped"]
					}
					[0];
				}
					else{
						${
							${
							"GLOBALS"
						}
						["xjsjvvh"]
					}
						=array_shift(${
							${
							"GLOBALS"
						}
						["zxbxgfyped"]
					}
					);
					$dhkespdeegg="fields";
					$dfqijncqqbjn="fields";
						${
						"GLOBALS"
					}
					["eycidgnrxt"]="fields";
						${
						"GLOBALS"
					}
					["tcxbqhxgqr"]="name";
						switch(${
							${
							"GLOBALS"
						}
						["tcxbqhxgqr"]
					}
						){
							case"SIZE":${
								${
								"GLOBALS"
							}
							["eycidgnrxt"]
						}
							=(${
							$dhkespdeegg
						}
							?${
							$dfqijncqqbjn
						}
						[0]:0);
						break;
							case"AUTH":if(!is_array(${
								${
								"GLOBALS"
							}
							["zxbxgfyped"]
						}
							)){
								${
								"GLOBALS"
							}
							["tbeasj"]="fields";
								${
									${
									"GLOBALS"
								}
								["tbeasj"]
							}
							=[];
						}
						break;
							default:${
								${
								"GLOBALS"
							}
							["zxbxgfyped"]
						}
						=true;
					}
				}
					$this->server_caps[${
						${
						"GLOBALS"
					}
					["xjsjvvh"]
				}
					]=${
						${
						"GLOBALS"
					}
					["clwaoxyur"]
				};
			}
		}
	}
		public function mail($from){
		$ponmtemj="useVerp";
			${
			$ponmtemj
		}
		=($this->do_verp?" XVERP":"");
			return$this->sendCommand("MAIL FROM","MAIL FROM:<".${
				${
				"GLOBALS"
			}
			["hlpiuxhtu"]
		}
			.">".${
				${
				"GLOBALS"
			}
			["tebuqupyn"]
		}
		,250);
	}
		public function quit($close_on_error=true){
		$cmvsybfdi="noerror";
			${
				${
				"GLOBALS"
			}
			["qrfmgmszdsu"]
		}
		=$this->sendCommand("QUIT","QUIT",221);
		$uvxjloqsecw="noerror";
			${
				${
				"GLOBALS"
			}
			["cntxrskn"]
		}
		=$this->error;
			${
			"GLOBALS"
		}
		["wxvekurhphg"]="close_on_error";
			if(${
			$uvxjloqsecw
		}
			 or${
				${
				"GLOBALS"
			}
			["wxvekurhphg"]
		}
			){
			$this->close();
			$xvrsbeo="err";
				$this->error=${
				$xvrsbeo
			};
		}
			return${
			$cmvsybfdi
		};
	}
		public function recipient($address){
			return$this->sendCommand("RCPT TO","RCPT TO:<".${
				${
				"GLOBALS"
			}
			["ehhlpezz"]
		}
		.">",[250,251]);
	}
		public function reset(){
		return$this->sendCommand("RSET","RSET",250);
	}
		protected function sendCommand($command,$commandstring,$expect){
		$itivvnzro="commandstring";
			${
			"GLOBALS"
		}
		["ugqhllxq"]="matches";
		$cqycnptubou="matches";
		$euqxkaslsjm="commandstring";
			if(!$this->connected()){
			$this->setError("Called $command without being connected");
			return false;
		}
			if(strpos(${
			$itivvnzro
		}
			,"\n")!==false or strpos(${
			$euqxkaslsjm
		}
			,"\r")!==false){
			$this->setError("Command '$command' contained line breaks");
			return false;
		}
			$this->client_send(${
				${
				"GLOBALS"
			}
			["ktbripogftf"]
		}
			.static::LE,${
				${
				"GLOBALS"
			}
			["wsbkgfakygq"]
		}
		);
		$this->last_reply=$this->get_lines();
			${
				${
				"GLOBALS"
			}
			["ugqhllxq"]
		}
		=[];
			if(preg_match("/^([0-9]{
			3
		}
			)[ -](?:([0-9]\.[0-9]\\.[0-9]) )?/",$this->last_reply,${
			$cqycnptubou
		}
			)){
				${
				"GLOBALS"
			}
			["nsjjstp"]="code_ex";
				${
				"GLOBALS"
			}
			["gfprgkn"]="matches";
				${
					${
					"GLOBALS"
				}
				["dbbuiexks"]
			}
				=${
					${
					"GLOBALS"
				}
				["xlqdwfbxogwy"]
			}
			[1];
				${
				"GLOBALS"
			}
			["hnxscpdlwk"]="code_ex";
			$bifdqdikp="code_ex";
				${
				$bifdqdikp
			}
				=(count(${
					${
					"GLOBALS"
				}
				["gfprgkn"]
			}
				)>2?${
					${
					"GLOBALS"
				}
				["xlqdwfbxogwy"]
			}
			[2]:null);
				${
					${
					"GLOBALS"
				}
				["thtrxdojf"]
			}
				=preg_replace("/{
				$code
			}
				[ -]".(${
					${
					"GLOBALS"
				}
				["hnxscpdlwk"]
			}
				?str_replace(,"\\.",${
					${
					"GLOBALS"
				}
				["nsjjstp"]
			}
			)." ":"")."/m","",$this->last_reply);
		}
			else{
				${
				"GLOBALS"
			}
			["fvhgximbt"]="code";
				${
					${
					"GLOBALS"
				}
				["fvhgximbt"]
			}
			=substr($this->last_reply,0,3);
				${
					${
					"GLOBALS"
				}
				["yyxsjsufpgg"]
			}
			=null;
				${
					${
					"GLOBALS"
				}
				["thtrxdojf"]
			}
			=substr($this->last_reply,4);
		}
		$this->edebug("SERVER -> CLIENT: ".$this->last_reply,self::DEBUG_SERVER);
			if(!in_array(${
				${
				"GLOBALS"
			}
			["dbbuiexks"]
		}
			,(array)${
				${
				"GLOBALS"
			}
			["fqsuep"]
		}
			)){
			$fjjdaxioczb="code";
				$this->setError("$command command failed",${
					${
					"GLOBALS"
				}
				["thtrxdojf"]
			}
				,${
				$fjjdaxioczb
			}
				,${
					${
					"GLOBALS"
				}
				["yyxsjsufpgg"]
			}
			);
			$this->edebug("SMTP ERROR: ".$this->error["error"].": ".$this->last_reply,self::DEBUG_CLIENT);
			return false;
		}
		$this->setError("");
		return true;
	}
		public function sendAndMail($from){
		return$this->sendCommand("SAML","SAML FROM:$from",250);
	}
		public function verify($name){
		return$this->sendCommand("VRFY","VRFY $name",[250,251]);
	}
		public function noop(){
		return$this->sendCommand("NOOP","NOOP",250);
	}
		public function turn(){
		$this->setError("The SMTP TURN command is not implemented");
		$this->edebug("SMTP NOTICE: ".$this->error["error"],self::DEBUG_CLIENT);
		return false;
	}
		public function client_send($data,$command=''){
		$iydnttyljc="command";
			${
			"GLOBALS"
		}
		["guysowfmosq"]="result";
			if(self::DEBUG_LOWLEVEL>$this->do_debug and in_array(${
			$iydnttyljc
		}
			,["User & Password","Username","Password"],true)){
			$this->edebug("CLIENT -> SERVER: <credentials hidden>",self::DEBUG_CLIENT);
		}
			else{
				${
				"GLOBALS"
			}
			["ptijwbxdnva"]="data";
				$this->edebug("CLIENT -> SERVER: ".${
					${
					"GLOBALS"
				}
				["ptijwbxdnva"]
			}
			,self::DEBUG_CLIENT);
		}
		$qdxgpvxmdc="result";
		set_error_handler([$this,"errorHandler"]);
			${
			$qdxgpvxmdc
		}
			=fwrite($this->smtp_conn,${
				${
				"GLOBALS"
			}
			["hpblrx"]
		}
		);
		restore_error_handler();
			return${
				${
				"GLOBALS"
			}
			["guysowfmosq"]
		};
	}
		public function getError(){
		return$this->error;
	}
		public function getServerExtList(){
		return$this->server_caps;
	}
		public function getServerExt($name){
		$bgchkyiiazlo="name";
			if(!$this->server_caps){
			$this->setError("No HELO/EHLO was sent");
			return;
		}
			if(!array_key_exists(${
			$bgchkyiiazlo
		}
			,$this->server_caps)){
				if("HELO"==${
					${
					"GLOBALS"
				}
				["xjsjvvh"]
			}
				){
				return$this->server_caps["EHLO"];
			}
				if("EHLO"==${
					${
					"GLOBALS"
				}
				["xjsjvvh"]
			}
				||array_key_exists("EHLO",$this->server_caps)){
				return false;
			}
			$this->setError("HELO handshake was used;
			 No information about server extensions available");
			return;
		}
			return$this->server_caps[${
				${
				"GLOBALS"
			}
			["xjsjvvh"]
		}
		];
	}
		public function getLastReply(){
		return$this->last_reply;
	}
		protected function get_lines(){
			if(!is_resource($this->smtp_conn)){
			return"";
		}
		$psnpojpzoa="data";
			${
				${
				"GLOBALS"
			}
			["hpblrx"]
		}
		="";
			${
				${
				"GLOBALS"
			}
			["hjdedozj"]
		}
		=0;
		stream_set_timeout($this->smtp_conn,$this->Timeout);
			if($this->Timelimit>0){
				${
					${
					"GLOBALS"
				}
				["hjdedozj"]
			}
			=time()+$this->Timelimit;
		}
			${
				${
				"GLOBALS"
			}
			["mvrebrzpng"]
		}
		=[$this->smtp_conn];
			${
				${
				"GLOBALS"
			}
			["rgrnce"]
		}
		=null;
			while(is_resource($this->smtp_conn)and!feof($this->smtp_conn)){
			$vsdutqwc="selR";
			$kahjnbi="str";
				${
				"GLOBALS"
			}
			["ialyehmif"]="endtime";
				if(!stream_select(${
				$vsdutqwc
			}
				,${
					${
					"GLOBALS"
				}
				["rgrnce"]
			}
				,${
					${
					"GLOBALS"
				}
				["rgrnce"]
			}
				,$this->Timelimit)){
				$this->edebug("SMTP -> get_lines(): timed-out (".$this->Timeout." sec)",self::DEBUG_LOWLEVEL);
				break;
			}
				${
				"GLOBALS"
			}
			["ojibghy"]="info";
			$jjjanc="str";
				${
				$jjjanc
			}
			=@fgets($this->smtp_conn,515);
				$this->edebug("SMTP INBOUND: "".trim(${
					${
					"GLOBALS"
				}
				["hhvqhhk"]
			}
			)."\"",self::DEBUG_LOWLEVEL);
				${
					${
					"GLOBALS"
				}
				["hpblrx"]
			}
				.=${
					${
					"GLOBALS"
				}
				["hhvqhhk"]
			};
			$plqktjyr="str";
				if(!isset(${
				$plqktjyr
			}
				[3])or(isset(${
				$kahjnbi
			}
				[3])and${
					${
					"GLOBALS"
				}
				["hhvqhhk"]
			}
				[3]==" ")){
				break;
			}
				${
					${
					"GLOBALS"
				}
				["ojibghy"]
			}
			=stream_get_meta_data($this->smtp_conn);
				if(${
					${
					"GLOBALS"
				}
				["ksmpcnoijse"]
			}
				["timed_out"]){
				$this->edebug("SMTP -> get_lines(): timed-out (".$this->Timeout." sec)",self::DEBUG_LOWLEVEL);
				break;
			}
				if(${
					${
					"GLOBALS"
				}
				["ialyehmif"]
			}
				 and time()>${
					${
					"GLOBALS"
				}
				["hjdedozj"]
			}
				){
				$this->edebug("SMTP -> get_lines(): timelimit reached (".$this->Timelimit." sec)",self::DEBUG_LOWLEVEL);
				break;
			}
		}
			return${
			$psnpojpzoa
		};
	}
		public function setVerp($enabled=false){
			${
			"GLOBALS"
		}
		["ibrlwjkdpd"]="enabled";
			$this->do_verp=${
				${
				"GLOBALS"
			}
			["ibrlwjkdpd"]
		};
	}
		public function getVerp(){
		return$this->do_verp;
	}
		protected function setError($message,$detail='',$smtp_code='',$smtp_code_ex=''){
		$lfdcclsl="smtp_code_ex";
			${
			"GLOBALS"
		}
		["wkqkmye"]="detail";
			$this->error=["error"=>${
				${
				"GLOBALS"
			}
			["vqwmkrxh"]
		}
			,"detail"=>${
				${
				"GLOBALS"
			}
			["wkqkmye"]
		}
			,"smtp_code"=>${
				${
				"GLOBALS"
			}
			["oyeronnuveiu"]
		}
			,"smtp_code_ex"=>${
			$lfdcclsl
		}
		,];
	}
		public function setDebugOutput($method='echo'){
			${
			"GLOBALS"
		}
		["uxchivkms"]="method";
			$this->Debugoutput=${
				${
				"GLOBALS"
			}
			["uxchivkms"]
		};
	}
		public function getDebugOutput(){
		return$this->Debugoutput;
	}
		public function setDebugLevel($level=0){
			$this->do_debug=${
				${
				"GLOBALS"
			}
			["bquxng"]
		};
	}
		public function getDebugLevel(){
		return$this->do_debug;
	}
		public function setTimeout($timeout=0){
			$this->Timeout=${
				${
				"GLOBALS"
			}
			["zevacipqibp"]
		};
	}
		public function getTimeout(){
		return$this->Timeout;
	}
		protected function errorHandler($errno,$errmsg,$errfile='',$errline=0){
			${
				${
				"GLOBALS"
			}
			["efqemegykfgp"]
		}
		="Connection failed.";
			$this->setError(${
				${
				"GLOBALS"
			}
			["efqemegykfgp"]
		}
			,${
				${
				"GLOBALS"
			}
			["fcitqwde"]
		}
			,(string)${
				${
				"GLOBALS"
			}
			["qjwsdhgssjs"]
		}
		);
		$this->edebug("$notice Error #$errno: $errmsg [$errfile line $errline]",self::DEBUG_CONNECTION);
	}
		protected function recordLastTransactionID(){
			${
			"GLOBALS"
		}
		["tvdrdpsze"]="reply";
			${
				${
				"GLOBALS"
			}
			["jdfdsehwy"]
		}
		=$this->getLastReply();
			if(empty(${
				${
				"GLOBALS"
			}
			["tvdrdpsze"]
		}
			)){
			$this->last_smtp_transaction_id=null;
		}
			else{
			$this->last_smtp_transaction_id=false;
				foreach($this->smtp_transaction_id_patterns as${
					${
					"GLOBALS"
				}
				["ehnhrgxu"]
			}
				){
				$vfjuesjyg="matches";
					if(preg_match(${
						${
						"GLOBALS"
					}
					["ehnhrgxu"]
				}
					,${
						${
						"GLOBALS"
					}
					["jdfdsehwy"]
				}
					,${
					$vfjuesjyg
				}
					)){
						$this->last_smtp_transaction_id=trim(${
							${
							"GLOBALS"
						}
						["xlqdwfbxogwy"]
					}
					[1]);
					break;
				}
			}
		}
		return$this->last_smtp_transaction_id;
	}
		public function getLastTransactionID(){
		return$this->last_smtp_transaction_id;
	}
}



© 2023 Quttera Ltd. All rights reserved.