From dbd8b5f9c91d35e26b668e457f2ed7f60ae0c30e Mon Sep 17 00:00:00 2001 From: whatever127 Date: Sat, 27 Jul 2019 19:43:02 +0200 Subject: [PATCH] Reject the existence of corpnet updates, some minor changes --- fetchupd.php | 7 ++++++- get.php | 2 +- shared/main.php | 4 ++-- shared/requests.php | 5 ++++- shared/utils.php | 17 +++++++++++++++-- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/fetchupd.php b/fetchupd.php index d87844d..6d5c6d9 100644 --- a/fetchupd.php +++ b/fetchupd.php @@ -109,7 +109,7 @@ function uupFetchUpd( if(!$cached) { consoleLogger('Fetching information from the server...'); $postData = composeFetchUpdRequest(uupDevice(), uupEncryptedData(), $arch, $flight, $ring, $build, $sku); - $out = sendWuPostRequest('https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx', $postData); + $out = sendWuPostRequest('https://fe3cr.delivery.mp.microsoft.com/ClientWebService/client.asmx', $postData); $out = html_entity_decode($out); consoleLogger('Information has been successfully fetched.'); @@ -264,6 +264,11 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku consoleLogger("Update ID: ".$updateString); consoleLogger("--- UPDATE INFORMATION ---"); + if(preg_match('/Corpnet Required/i', $updateTitle)) { + consoleLogger('Skipping corpnet only update...'); + return array('error' => 'CORPNET_ONLY_UPDATE'); + } + $fileWrite = 'NO_SAVE'; if(!file_exists('fileinfo/'.$updateString.'.json')) { consoleLogger('WARNING: This build is NOT in the database. It will be saved now.'); diff --git a/get.php b/get.php index 0bb2d32..9956a64 100644 --- a/get.php +++ b/get.php @@ -271,7 +271,7 @@ function uupGetOnlineFiles($updateId, $rev, $info, $cacheRequests) { $fetchTime = time(); consoleLogger('Fetching information from the server...'); $postData = composeFileGetRequest($updateId, uupDevice(), $info, $rev); - $out = sendWuPostRequest('https://fe3.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured', $postData); + $out = sendWuPostRequest('https://fe3cr.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured', $postData); consoleLogger('Information has been successfully fetched.'); if($cacheRequests == 1) { diff --git a/shared/main.php b/shared/main.php index cd4b451..d10fcae 100644 --- a/shared/main.php +++ b/shared/main.php @@ -1,6 +1,6 @@ FileUrl FileDecryption + EsrpDecryptionInformation + PiecesHashUrl + BlockMapUrl $deviceAttributes diff --git a/shared/utils.php b/shared/utils.php index b5789c3..5d59a64 100644 --- a/shared/utils.php +++ b/shared/utils.php @@ -1,6 +1,6 @@ + +function uupDumpApiGetDebug() { + if(!file_exists('debug.ini')) { + return null; + } + + $data = parse_ini_file('debug.ini'); + return $data; +}