Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- error_reporting(32757);
- include_once 'async.php';
- include_once 'function.php';
- include_once 'datastore.php';
- include_once 'provision.php';
- include_once 'wbxml.php';
- define('catASync', 12);
- init_global_account();
- global $_ACCOUNT;
- init_global_api();
- global $_API;
- $_GET['LogLevel'] = $_API->GetProperty('C_System_Log_Services_ActiveSync');
- if (!$_API->GetProperty('C_ActiveSync_Active')) {
- do_log('!!! Forbidden !!! (EAS is disabled)', 2, true);
- header('HTTP/1.1 403 Forbidden');
- exit();
- }
- if (!isset($_SERVER['PHP_AUTH_USER'])) {
- do_log('!!! Unauthorized !!! (User identification cannot found)', 2, true);
- header('HTTP/1.1 401 Unauthorized');
- header('WWW-Authenticate: Basic realm="ASync"');
- exit();
- }
- icewarp_getlock('EAS_PHP', 1);
- if (icewarp_getlock('EAS_MIGRATION', 0)) {
- icewarp_releaselock('EAS_MIGRATION');
- icewarp_releaselock('EAS_PHP');
- }
- else {
- icewarp_releaselock('EAS_PHP');
- do_log('!!! Service unavailable !!! (DB migration)', 2, true);
- header('HTTP/1.1 503 Service Unavailable');
- exit();
- }
- $username = $_SERVER['PHP_AUTH_USER'];
- $pos = strpos($username, chr(92));
- if ($pos !== false) {
- $username = substr($username, $pos + 1);
- if (!strpos($username, '@') && $pos) {
- $username .= '@' . substr($_SERVER['PHP_AUTH_USER'], 0, $pos);
- }
- }
- $_GET['PolicyKey'] = $_SERVER['HTTP_X_MS_POLICYKEY'];
- if (strlen($_SERVER['QUERY_STRING']) && !strlen($_GET['DeviceId']) && !strlen($_GET['DeviceType'])) {
- $commands = ['Sync', 'SendMail', 'SmartForward', 'SmartReply', 'GetAttachment', 'GetHierarchy', 'CreateCollection', 'DeleteCollection', 'MoveCollection', 'FolderSync', 'FolderCreate', 'FolderDelete', 'FolderUpdate', 'MoveItems', 'GetItemEstimate', 'MeetingResponse', 'Search', 'Settings', 'Ping', 'ItemOperations', 'Provision', 'ResolveRecipients', 'ValidateCert'];
- $parameters = ['AttachmentName', 'CollectionId', 'CollectionName', 'ItemId', 'LongId', 'ParentId', 'Occurence', 'Options', 'RoundTripId'];
- $query = base64_decode($_SERVER['QUERY_STRING']);
- $_SERVER['HTTP_MS_ASPROTOCOLVERSION'] = ord($query[0]) / 10;
- $_GET['Cmd'] = $commands[ord($query[1])];
- $len = ord($query[4]);
- $_GET['DeviceId'] = bin2hex(substr($query, 5, $len));
- ................................................................
- ...........................................
- ................
Add Comment
Please, Sign In to add comment