10d9 < if (strpos($_SERVER['HTTP_REFERER'], "/php_listener.php") !== false) { 12d10 < } 14d11 < if (strpos($_SERVER['HTTP_REFERER'], "/php_listener.php") !== false) { 16,20d12 < } < } < while (strlen($enduring) < 35) { < $wase=$enduring; < $enduring='0' . $wase; 178,180d169 < if (file_exists('x_' . str_replace('+',' ',urldecode($_POST['nomore'])) . '.htm')) { < unlink('x_' . str_replace('+',' ',urldecode($_POST['nomore'])) . '.htm'); < } 254,255c243,244 < sleep(19); //sleep(9); < //if (file_exists("x_" . $enduring . ".htm")) { unlink("x_" . $enduring . ".htm"); } --- > sleep(9); > if (file_exists("x_" . $enduring . ".htm")) { unlink("x_" . $enduring . ".htm"); } 296d284 < 303,313d290 < // escape a string for display in html < // see also: < // polyfill for String.prototype.codePointAt < // https://raw.githubusercontent.com/mathiasbynens/String.prototype.codePointAt/master/codepointat.js < // how to convert characters to html entities < // http://stackoverflow.com/a/1354491/347508 < // html overrides from < // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides / http://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript/23831239#comment36668052_1354098 < < var _escape_overrides = { 0x00:'\uFFFD',0x80:'\u20AC',0x82:'\u201A',0x83:'\u0192',0x84:'\u201E',0x85:'\u2026',0x86:'\u2020',0x87:'\u2021',0x88:'\u02C6',0x89:'\u2030',0x8A:'\u0160',0x8B:'\u2039',0x8C:'\u0152',0x8E:'\u017D',0x91:'\u2018',0x92:'\u2019',0x93:'\u201C',0x94:'\u201D',0x95:'\u2022',0x96:'\u2013',0x97:'\u2014',0x98:'\u02DC',0x99:'\u2122',0x9A:'\u0161',0x9B:'\u203A',0x9C:'\u0153',0x9E:'\u017E',0x9F:'\u0178' }; < 399,428d375 < < function encodeHTML(str) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < var aStr = str.split(''), < i = aStr.length, < aRet = []; < < while (i--) { < var iC = aStr[i].charCodeAt(); < if (iC < 65 || iC > 127 || (iC>90 && iC<97)) { < aRet.push('&#'+iC+';'); < } else { < aRet.push(aStr[i]); < } < } < return aRet.reverse().join(''); < } < < function escapeHtml(str) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < return str.replace(/([\u0000-\uD799]|[\uD800-\uDBFF][\uDC00-\uFFFF])/g, function(c) { < var c1 = c.charCodeAt(0); < // ascii character, use override or escape < if (c1 <= 0xFF) { return (c1=_escape_overrides[c1])?c1:escape(c).replace(/%(..)/g,'&#x$1;'); } < // utf8/16 character < if (c.length == 1) { return '&#' + c1 + ';'; } < // surrogate pair < if (c.length == 2 && c1 >= 0xD800 && c1 <= 0xDBFF ) { return '&#' + ((c1-0xD800)*0x400 + c.charCodeAt(1) - 0xDC00 + 0x10000) + ';'; } < // no clue .. < return ''; < }); < } 431d377 < var htmlone='', htmltwo=''; 433,439c379 < //htmlone = document.getElementById('ichat').value.replace(/[\u00A0-\u2666]/g, function(c) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < // return '&#'+c.charCodeAt(0)+';'; < //}); < //htmlone = encodeHTML(document.getElementById('ichat').value); < //htmlone = escape(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < htmlone = escapeHtml(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('isms').value + '#') + '&ipaddress=' + encodeURIComponent('" . $sra . "') + '&ichat=' + encodeURIComponent(htmlone); //document.getElementById('ichat').value); --- > document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('isms').value + '#') + '&ipaddress=' + encodeURIComponent('" . $sra . "') + '&ichat=' + encodeURIComponent(document.getElementById('ichat').value); 449,455c389 < //htmltwo = document.getElementById('ichat').value.replace(/[\u00A0-\u2666]/g, function(c) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < // return '&#'+c.charCodeAt(0)+';'; < //}); < //htmltwo = encodeHTML(document.getElementById('ichat').value); < //htmltwo = escape(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < htmltwo = escapeHtml(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('iemail').value) + '&ipaddress=' + encodeURIComponent('" . $sra . "') + '&ichat=' + encodeURIComponent(htmltwo); //document.getElementById('ichat').value); --- > document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('iemail').value) + '&ipaddress=' + encodeURIComponent('" . $sra . "') + '&ichat=' + encodeURIComponent(document.getElementById('ichat').value); 544d477 < 552d484 < 559,569d490 < // escape a string for display in html < // see also: < // polyfill for String.prototype.codePointAt < // https://raw.githubusercontent.com/mathiasbynens/String.prototype.codePointAt/master/codepointat.js < // how to convert characters to html entities < // http://stackoverflow.com/a/1354491/347508 < // html overrides from < // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides / http://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript/23831239#comment36668052_1354098 < < var _escape_overrides = { 0x00:'\uFFFD',0x80:'\u20AC',0x82:'\u201A',0x83:'\u0192',0x84:'\u201E',0x85:'\u2026',0x86:'\u2020',0x87:'\u2021',0x88:'\u02C6',0x89:'\u2030',0x8A:'\u0160',0x8B:'\u2039',0x8C:'\u0152',0x8E:'\u017D',0x91:'\u2018',0x92:'\u2019',0x93:'\u201C',0x94:'\u201D',0x95:'\u2022',0x96:'\u2013',0x97:'\u2014',0x98:'\u02DC',0x99:'\u2122',0x9A:'\u0161',0x9B:'\u203A',0x9C:'\u0153',0x9E:'\u017E',0x9F:'\u0178' }; < 678,708c599 < < function encodeHTML(str) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < var aStr = str.split(''), < i = aStr.length, < aRet = []; < < while (i--) { < var iC = aStr[i].charCodeAt(); < if (iC < 65 || iC > 127 || (iC>90 && iC<97)) { < aRet.push('&#'+iC+';'); < } else { < aRet.push(aStr[i]); < } < } < return aRet.reverse().join(''); < } < < function escapeHtml(str) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < return str.replace(/([\u0000-\uD799]|[\uD800-\uDBFF][\uDC00-\uFFFF])/g, function(c) { < var c1 = c.charCodeAt(0); < // ascii character, use override or escape < if (c1 <= 0xFF) { return (c1=_escape_overrides[c1])?c1:escape(c).replace(/%(..)/g,'&#x$1;'); } < // utf8/16 character < if (c.length == 1) { return '&#' + c1 + ';'; } < // surrogate pair < if (c.length == 2 && c1 >= 0xD800 && c1 <= 0xDBFF ) { return '&#' + ((c1-0xD800)*0x400 + c.charCodeAt(1) - 0xDC00 + 0x10000) + ';'; } < // no clue .. < return ''; < }); < } < --- > 710d600 < var htmlone='', htmltwo=''; 714,720c604 < //htmlone = document.getElementById('ichat').value.replace(/[\u00A0-\u2666]/g, function(c) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < // return '&#'+c.charCodeAt(0)+';'; < //}); < //htmlone = encodeHTML(document.getElementById('ichat').value); < //htmlone = escape(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < htmlone = escapeHtml(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('isms').value + '#') + '&ipaddress=' + encodeURIComponent('" . server_remote_addr() . "') + '&ichat=' + encodeURIComponent(htmlone); //document.getElementById('ichat').value); --- > document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('isms').value + '#') + '&ipaddress=' + encodeURIComponent('" . server_remote_addr() . "') + '&ichat=' + encodeURIComponent(document.getElementById('ichat').value); 735,741c619 < //htmltwo = document.getElementById('ichat').value.replace(/[\u00A0-\u2666]/g, function(c) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript < // return '&#'+c.charCodeAt(0)+';'; < //}); < //htmltwo = encodeHTML(document.getElementById('ichat').value); < //htmltwo = escape(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < htmltwo = escapeHtml(document.getElementById('ichat').value).replace(/%(..)/g,'&#x$1;'); < document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('iemail').value) + '&ipaddress=' + encodeURIComponent('" . server_remote_addr() . "') + '&ichat=' + encodeURIComponent(htmltwo); //document.getElementById('ichat').value); --- > document.getElementById('jchild').src=document.URL.split('#')[0].split('?')[0] + '?sid=" . $enduring . "&address=' + encodeURIComponent(document.getElementById('iemail').value) + '&ipaddress=' + encodeURIComponent('" . server_remote_addr() . "') + '&ichat=' + encodeURIComponent(document.getElementById('ichat').value); 835d712 <