403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/webservice/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/webservice/stssync.js
;(function(){
	if(!!BX.StsSync)
	{
		return;
	}

	BX.StsSync = {
		sync: function(type, base_url, list_url, list_prefix, list_name, guid, port)
		{
			var
				maxLinkLen = 500,
				maxNameLen = 20,
				host = window.location.host;

			if(!!port)
			{
				host = host.replace(/:\d+/, '') + ':' + port;
			}

			base_url = window.location.protocol + "//" + host + base_url;

			BX.ajax({
				'url': '/bitrix/tools/stssync.php',
				'dataType': 'json',
				'method': 'POST',
				'data': {
					action: 'stssync_auth',
					type: type,
					sessid: BX.bitrix_sessid()
				},
				'onsuccess': function(result)
				{
					if(!result.ap)
					{
						alert('Error!');
						return;
					}

					base_url += '/' + BX.message('USER_ID') + '/' + result.ap;

					guid = guid.replace(/{/g, '%7B').replace(/}/g, '%7D').replace(/-/g, '%2D');

					var link = "stssync://sts/?ver=1.1"
						+ "&type=" + type
						+ "&cmd=add-folder"
						+ "&base-url=" + encode(base_url)
						+ "&list-url=" + encode(list_url)
						+ "&guid=" + guid;

					var names = "&site-name=" + encode(list_prefix) + "&list-name=" + encode(list_name);

					if(
						link.length + names.length > maxLinkLen
						&&
						(list_prefix.length > maxNameLen || list_name.length > maxNameLen)
					)
					{
						if(list_prefix.length > maxNameLen)
							list_prefix = list_prefix.substring(0, maxNameLen - 1) + "...";
						if(list_name.length > maxNameLen)
							list_name = list_name.substring(0, maxNameLen - 1) + "...";

						names = "&site-name=" + encode(list_prefix) + "&list-name=" + encode(list_name);
					}

					link += names;

					try
					{
						window.location.href = link;
					}
					catch(e)
					{
					}
				}
			});
		}
	};

	function encode(str)
	{
		var
			i, len = str.length, cur_chr, cur_chr_code,
			out = "",
			bUnicode = false,
			symb_escape = "&\\[]|";

		for(i = 0; i < len; i++)
		{
			cur_chr = str.charAt(i);
			cur_chr_code = cur_chr.charCodeAt(0);

			if(bUnicode && cur_chr_code <= 0x7F)
			{
				out += "]";
				bUnicode = false;
			}
			if(!bUnicode && cur_chr_code > 0x7F)
			{
				out += "[";
				bUnicode = true;
			}

			if(symb_escape.indexOf(cur_chr) >= 0)
				out += "|";

			if(
				(cur_chr_code >= 0x61 && cur_chr_code <= 0x7A)
				|| (cur_chr_code >= 0x41 && cur_chr_code <= 0x5A)
				|| (cur_chr_code >= 0x30 && cur_chr_code <= 0x39)
			)
				out += cur_chr;
			else if(cur_chr_code <= 0x0F)
				out += "%0" + cur_chr_code.toString(16).toUpperCase();
			else if(cur_chr_code <= 0x7F)
				out += "%" + cur_chr_code.toString(16).toUpperCase();
			else if(cur_chr_code <= 0x00FF)
				out += "00" + cur_chr_code.toString(16).toUpperCase();
			else if(cur_chr_code <= 0x0FFF)
				out += "0" + cur_chr_code.toString(16).toUpperCase();
			else
				out += cur_chr_code.toString(16).toUpperCase();
		}

		if(bUnicode)
			out += "]";

		return out;
	}

})();

Youez - 2016 - github.com/yon3zu
LinuXploit